diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h
index cfb91e0f13..365a2fbc92 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -6,7 +6,7 @@
// Enable this is you have a raptor 2.
// Selects pin file, runout sensor and stock TMC Drivers automatically
-#define RAPTOR2
+//#define RAPTOR2
/**
* Enable if you replace the stepper drivers with TMC 2208. Be sure to remove MS3 jumper
@@ -15,14 +15,14 @@
* you require Linear Advance with a TMC2208 on the extruder!
* If you have used a UART connection to program the driver to SpreadCycle mode, pease seect that as well
*/
-//#define X_2208
-//#define X_SpreadCycle
-//#define Y_2208
-//#define Y_SpreadCycle // Highly recommended as large prints with high mass can cause layer shifts with stealthchop at high speed
+#define X_2208
+#define X_SpreadCycle
+#define Y_2208
+#define Y_SpreadCycle // Highly recommended as large prints with high mass can cause layer shifts with stealthchop at high speed
//#define Y_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
//#define Z_2208 // NOT Recommended! Dual stepper current draw is above the recommended limit for this driver
//#define Z_SpreadCycle
-//#define Z_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
+#define Z_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
//#define E_2208 // Not Recommended! Stealthchop mode faults with linear advance
//#define E_SpreadCycle
@@ -33,18 +33,18 @@
/**
* Enable if you install a KEENOVO AC BED with Solid State Relay
*/
-//#define BED_AC
+#define BED_AC
-//#define HotendAllMetal
+#define HotendAllMetal
/**
* Enable if you install a filament runout sensor from www.formbotusa.com
*/
-//#define RunoutSensor
+#define RunoutSensor
/**
* Enable if you wish to change the auto level strategy to Unified Bed Leveling. Under CUSTOM COMMANDS, run Step 1 and 2 before setting Z Offset
*/
-//#define UBL
+#define UBL
//ONLY MAKE CHANGES ABOVE FOR RELIABLE FUNCTION
//ONLY MAKE CHANGES ABOVE FOR RELIABLE FUNCTION
@@ -61,7 +61,7 @@
#endif
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -80,6 +80,7 @@
* along with this program. If not, see .
*
*/
+#pragma once
/**
* Configuration.h
@@ -96,8 +97,6 @@
* Advanced settings can be found in Configuration_adv.h
*
*/
-#ifndef CONFIGURATION_H
-#define CONFIGURATION_H
#define CONFIGURATION_H_VERSION 020000
//===========================================================================
@@ -212,7 +211,7 @@
// @section extruder
// This defines the number of extruders
-// :[1, 2, 3, 4, 5]
+// :[1, 2, 3, 4, 5, 6]
#define EXTRUDERS 1
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
@@ -240,6 +239,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -250,40 +259,87 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
- #define PARKING_EXTRUDER_SECURITY_RAISE 5 // Z-raise before parking
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
+#endif
+
+/**
+ * Switching Toolhead
+ *
+ * Support for swappable and dockable toolheads, such as
+ * the E3D Tool Changer. Toolheads are locked with a servo.
+ */
+//#define SWITCHING_TOOLHEAD
+#if ENABLED(SWITCHING_TOOLHEAD)
+ #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector
+ #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock
+ #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock
+ #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis
+ #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis
+ #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders
#endif
/**
* "Mixing Extruder"
- * - Adds a new code, M165, to set the current mix factors.
+ * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
* - Extends the stepping routines to move multiple steppers in proportion to the mix.
- * - Optional support for Repetier Firmware M163, M164, and virtual extruder.
- * - This implementation supports only a single extruder.
- * - Enable DIRECT_MIXING_IN_G1 for Pia Taubert's reference implementation
+ * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
+ * - This implementation supports up to two mixing extruders.
+ * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
*/
//#define MIXING_EXTRUDER
#if ENABLED(MIXING_EXTRUDER)
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -293,7 +349,6 @@
//#define HOTEND_OFFSET_Y {0.0, 5.00} // (mm) relative Y-offset for each nozzle
//#define HOTEND_OFFSET_Z {0.0, 0.00} // (mm) relative Z-offset for each nozzle
-
// @section machine
/**
@@ -356,6 +411,7 @@
* 15 : 100k thermistor calibration for JGAurora A5 hotend
* 20 : the PT100 circuit found in the Ultimainboard V2.x
* 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
* 66 : 4.7M High Temperature thermistor from Dyze Design
* 70 : the 100K thermistor found in the bq Hephestos 2
* 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
@@ -375,7 +431,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
- * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
@@ -416,6 +472,7 @@
#define HEATER_2_MINTEMP 5
#define HEATER_3_MINTEMP 5
#define HEATER_4_MINTEMP 5
+#define HEATER_5_MINTEMP 5
#define BED_MINTEMP 5
// When temperature exceeds max temp, your heater will be switched off.
@@ -443,10 +500,11 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
- //#define PID_DEBUG // Sends debug data to the serial port.
- //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
- //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
//#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
// Set/get with gcode: M301 E[extruder number, 0-2]
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
@@ -646,8 +704,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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']
*/
#if ENABLED(X_2208)
#define X_DRIVER_TYPE TMC2208_STANDALONE
@@ -690,21 +749,18 @@
//#define ENDSTOP_INTERRUPTS_FEATURE
/**
- * Endstop Noise Filter
+ * Endstop Noise Threshold
*
- * Enable this option if endstops falsely trigger due to noise.
- * NOTE: Enabling this feature means adds an error of +/-0.2mm, so homing
- * will end up at a slightly different position on each G28. This will also
- * reduce accuracy of some bed probes.
- * For mechanical switches, the better approach to reduce noise is to install
- * a 100 nanofarads ceramic capacitor in parallel with the switch, making it
- * essentially noise-proof without sacrificing accuracy.
- * This option also increases MCU load when endstops or the probe are enabled.
- * So this is not recommended. USE AT YOUR OWN RISK.
- * (This feature is not required for common micro-switches mounted on PCBs
- * based on the Makerbot design, since they already include the 100nF capacitor.)
+ * Enable if your probe or endstops falsely trigger due to noise.
+ *
+ * - Higher values may affect repeatability or accuracy of some bed probes.
+ * - To fix noise install a 100nF ceramic capacitor inline with the switch.
+ * - This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, which already have the 100nF capacitor.
+ *
+ * :[2,3,4,5,6,7]
*/
-//#define ENDSTOP_NOISE_FILTER
+//#define ENDSTOP_NOISE_THRESHOLD 2
//=============================================================================
//============================== Movement Settings ============================
@@ -729,7 +785,7 @@
/**
* Default Axis Steps Per Unit (steps/mm)
* Override with M92
- * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/
#if(ENABLED(Y_2208) || ENABLED(Y_4988))
@@ -749,7 +805,7 @@
/**
* Default Max Feed Rate (mm/s)
* Override with M203
- * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/
#define DEFAULT_MAX_FEEDRATE { 250, 120, 5, 25 }
@@ -757,7 +813,7 @@
* 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]]]]
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/
#if(ENABLED(X_2208))
#if(ENABLED(X_SpreadCycle))
@@ -792,6 +848,14 @@
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
/**
* Default Jerk (mm/s)
* Override with M205 X Y Z E
@@ -822,7 +886,7 @@
*
* See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
*/
-//#define S_CURVE_ACCELERATION
+#define S_CURVE_ACCELERATION
//===========================================================================
//============================= Z Probe Options =============================
@@ -896,20 +960,6 @@
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
#endif
-/**
- * Enable one or more of the following if probing seems unreliable.
- * Heaters and/or fans can be disabled during probing to minimize electrical
- * noise. A delay can also be added to allow noise and vibration to settle.
- * These options are most useful for the BLTouch probe, but may also improve
- * readings with inductive probes and piezo sensors.
- */
-//#define PROBING_HEATERS_OFF // Turn heaters off when probing
-#if ENABLED(PROBING_HEATERS_OFF)
- //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
-#endif
-//#define PROBING_FANS_OFF // Turn fans off when probing
-//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
-
// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE
@@ -917,6 +967,13 @@
//#define Z_PROBE_SLED
//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice.
+//#define RACK_AND_PINION_PROBE
+#if ENABLED(RACK_AND_PINION_PROBE)
+ #define Z_PROBE_DEPLOY_X X_MIN_POS
+ #define Z_PROBE_RETRACT_X X_MAX_POS
+#endif
+
//
// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
//
@@ -943,7 +1000,7 @@
#define X_PROBE_OFFSET_FROM_EXTRUDER -22 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -1.5 // Z offset: -below +above [the nozzle]
-#define MIN_PROBE_EDGE 10
+#define MIN_PROBE_EDGE 3
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 8000
@@ -976,7 +1033,7 @@
#define Z_CLEARANCE_DEPLOY_PROBE 5 // Z Clearance for Deploy/Stow
#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
-//#define Z_AFTER_PROBING 5 // Z position after probing is done
+#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -3 // Farthest distance below the trigger-point to go before stopping
@@ -987,6 +1044,24 @@
// Enable the M48 repeatability test to test probe accuracy
#define Z_MIN_PROBE_REPEATABILITY_TEST
+// Before deploy/stow pause for user confirmation
+//#define PAUSE_BEFORE_DEPLOY_STOW
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
// :{ 0:'Low', 1:'High' }
#define X_ENABLE_ON 0
@@ -999,13 +1074,14 @@
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
+
// Warn on display about possibly reduced accuracy
//#define DISABLE_REDUCED_ACCURACY_WARNING
// @section extruder
-#define DISABLE_E false // For all extruders
-#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled.
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
// @section machine
@@ -1040,6 +1116,7 @@
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
#define INVERT_E4_DIR false
+#define INVERT_E5_DIR false
// @section homing
@@ -1068,7 +1145,11 @@
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
-#define Z_MAX_POS 500
+#if(ENABLED(tallVersion))
+ #define Z_MAX_POS 700
+#else
+ #define Z_MAX_POS 500
+#endif
/**
* Software Endstops
@@ -1120,7 +1201,22 @@
#endif
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // After a runout is detected, continue printing this length of filament
+ // before executing the runout script. Useful for a sensor at the end of
+ // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
+ #define FILAMENT_RUNOUT_DISTANCE_MM 5
+
+ #ifdef FILAMENT_RUNOUT_DISTANCE_MM
+ // Enable this option to use an encoder disc that toggles the runout pin
+ // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
+ // large enough to avoid false positives.)
+ //#define FILAMENT_MOTION_SENSOR
+ #endif
#endif
//===========================================================================
@@ -1212,17 +1308,14 @@
#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
// Set the number of grid points per dimension.
- #define GRID_MAX_POINTS_X 6
+ #define GRID_MAX_POINTS_X 11
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
// Set the boundaries for probing (where the probe can reach).
- #define LEFT_PROBE_BED_POSITION 30
- #define RIGHT_PROBE_BED_POSITION 365
- #define FRONT_PROBE_BED_POSITION 30
- #define BACK_PROBE_BED_POSITION 365
-
- // The Z probe minimum outer margin (to validate G29 parameters).
- #define MIN_PROBE_EDGE 10
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE))
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE))
// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST
@@ -1251,10 +1344,10 @@
//========================= Unified Bed Leveling ============================
//===========================================================================
- //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+ #define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
- #define MESH_INSET 35 // Set Mesh bounds as an inset region of the bed
- #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define MESH_INSET 3 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 15 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
@@ -1297,8 +1390,9 @@
//#define LCD_BED_LEVELING
#if ENABLED(LCD_BED_LEVELING)
- #define MBL_Z_STEP 0.025 // Step size while manually probing Z axis.
- #define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z_MIN_POS for LCD Z adjustment
+ #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
+ //#define MESH_EDIT_MENU // Add a menu to edit mesh points
#endif
// Add a menu item to move between bed corners for manual bed adjustment
@@ -1306,6 +1400,7 @@
#if ENABLED(LEVEL_BED_CORNERS)
#define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
#endif
@@ -1313,7 +1408,7 @@
* Commands to execute at the end of G29 probing.
* Useful to retract or move the Z probe out of the way.
*/
-//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+#define Z_PROBE_END_SCRIPT "M280 P0 S90"
// @section homing
@@ -1347,6 +1442,9 @@
#define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60)
+// Validate that endstops are triggered on homing moves
+#define VALIDATE_HOMING_ENDSTOPS
+
// @section calibrate
/**
@@ -1450,12 +1548,14 @@
// @section temperature
// Preheat Constants
-#define PREHEAT_1_TEMP_HOTEND 200
-#define PREHEAT_1_TEMP_BED 60
+#define PREHEAT_1_LABEL "PLA"
+#define PREHEAT_1_TEMP_HOTEND 180
+#define PREHEAT_1_TEMP_BED 70
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
-#define PREHEAT_2_TEMP_HOTEND 220
-#define PREHEAT_2_TEMP_BED 100
+#define PREHEAT_2_LABEL "ABS"
+#define PREHEAT_2_TEMP_HOTEND 240
+#define PREHEAT_2_TEMP_BED 110
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
/**
@@ -1582,10 +1682,10 @@
*
* Select the language to display on the LCD. These languages are available:
*
- * en, an, bg, ca, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
- * jp-kana, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
*
- * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
*/
#define LCD_LANGUAGE en
@@ -1613,6 +1713,13 @@
*/
#define DISPLAY_CHARSET_HD44780 JAPANESE
+/**
+ * Info Screen Style (0:Classic, 1:Prusa)
+ *
+ * :[0:'Classic', 1:'Prusa']
+ */
+#define LCD_INFO_SCREEN_STYLE 0
+
/**
* SD CARD
*
@@ -1835,11 +1942,18 @@
//
//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
//
//#define SAV_3DLCD
+//
+// 3-wire SR LCD with strobe using 74HC4094
+// https://github.com/mikeshub/SailfishLCD
+// Uses the code directly from Sailfish
+//
+//#define FF_INTERFACEBOARD
+
//=============================================================================
//======================= LCD / Controller Selection =======================
//========================= (Graphical LCDs) ========================
@@ -1950,9 +2064,11 @@
//
// ANET and Tronxy Graphical Controller
//
-//#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
- // A clone of the RepRapDiscount full graphics display but with
- // different pins/wiring (see pins_ANET_10.h).
+// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+// A clone of the RepRapDiscount full graphics display but with
+// different pins/wiring (see pins_ANET_10.h).
+//
+//#define ANET_FULL_GRAPHICS_LCD
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
@@ -1975,6 +2091,24 @@
//
//#define SILVER_GATE_GLCD_CONTROLLER
+//
+// Extensible UI
+//
+// Enable third-party or vendor customized user interfaces that aren't
+// packaged with Marlin. Source code for the user interface will need to
+// be placed in "src/lcd/extensible_ui/lib"
+//
+//#define EXTENSIBLE_UI
+
+//=============================================================================
+//=============================== Graphical TFTs ==============================
+//=============================================================================
+
+//
+// MKS Robin 320x240 color display
+//
+//#define MKS_ROBIN_TFT
+
//=============================================================================
//============================ Other Controllers ============================
//=============================================================================
@@ -2049,6 +2183,10 @@
// Support for PCA9632 PWM LED driver
//#define PCA9632
+// Support for PCA9533 PWM LED driver
+// https://github.com/mikeshub/SailfishRGB_LED
+//#define PCA9533
+
/**
* RGB LED / LED Strip Control
*
@@ -2103,7 +2241,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
@@ -2119,16 +2257,15 @@
* Set this manually if there are extra servos needing manual control.
* Leave undefined or set to 0 to entirely disable the servo subsystem.
*/
-#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
// 300ms is a good value but you can try less delay.
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
-// Servo deactivation
-//
-// With this option servos are powered only during movement, then turned off to prevent jitter.
+// Only power servos during movement, otherwise leave off to prevent jitter
//#define DEACTIVATE_SERVOS_AFTER_MOVE
-#endif // CONFIGURATION_H
+// Allow servo angle to be edited and saved to EEPROM
+//#define EDITABLE_SERVO_ANGLES
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index bc9d3eccaf..a30eac1de9 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -19,6 +19,7 @@
* along with this program. If not, see .
*
*/
+#pragma once
/**
* Configuration_adv.h
@@ -30,8 +31,6 @@
* Basic settings can be found in Configuration.h
*
*/
-#ifndef CONFIGURATION_ADV_H
-#define CONFIGURATION_ADV_H
#define CONFIGURATION_ADV_H_VERSION 020000
// @section temperature
@@ -75,10 +74,13 @@
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
*/
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
- #define THERMAL_PROTECTION_PERIOD 210 // Seconds
- #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius
-
+ #define THERMAL_PROTECTION_PERIOD 210 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ #define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -178,8 +180,8 @@
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
#define EXTRUDER_RUNOUT_MINTEMP 190
#define EXTRUDER_RUNOUT_SECONDS 30
- #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
- #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
+ #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m)
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm)
#endif
// @section temperature
@@ -248,9 +250,10 @@
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
+#define E5_AUTO_FAN_PIN -1
#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
-#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
+#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
/**
* Part-Cooling Fan Multiplexer
@@ -293,6 +296,13 @@
//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+// Employ an external closed loop controller. Override pins here if needed.
+//#define EXTERNAL_CLOSED_LOOP_CONTROLLER
+#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
+ //#define CLOSED_LOOP_ENABLE_PIN -1
+ //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
+#endif
+
/**
* Dual Steppers / Dual Endstops
*
@@ -337,6 +347,17 @@
#endif
#endif
+//#define Z_TRIPLE_STEPPER_DRIVERS
+#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
+ //#define Z_TRIPLE_ENDSTOPS
+ #if ENABLED(Z_TRIPLE_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z3_USE_ENDSTOP _YMAX_
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0
+ #endif
+#endif
+
/**
* Dual X Carriage
*
@@ -359,22 +380,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
-
- // Default settings in "Auto-park Mode"
- #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
- #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -400,6 +426,27 @@
// Enable this if X or Y can't home without homing the other axis first.
//#define CODEPENDENT_XY_HOMING
+/**
+ * Z Steppers Auto-Alignment
+ * Add the G34 command to align multiple Z steppers using a bed probe.
+ */
+//#define Z_STEPPER_AUTO_ALIGN
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
+ // Define probe X and Y positions for Z1, Z2 [, Z3]
+ #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
+ #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
+ // Set number of iterations to align
+ #define Z_STEPPER_ALIGN_ITERATIONS 3
+ // Enable to restore leveling setup after operation
+ #define RESTORE_LEVELING_AFTER_G34
+ // Use the amplification factor to de-/increase correction step.
+ // In case the stepper (spindle) position is further out than the test point
+ // Use a value > 1. NOTE: This may cause instability
+ #define Z_STEPPER_ALIGN_AMP 1.0
+ // Stop criterion. If the accuracy is better than this stop iterating early
+ #define Z_STEPPER_ALIGN_ACC 0.02
+#endif
+
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -431,6 +478,7 @@
#if ENABLED(ULTIPANEL)
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions
#define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
#endif
@@ -450,14 +498,92 @@
// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
// of the buffer and all stops. This should not be much greater than zero and should only be changed
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
-#define MINIMUM_PLANNER_SPEED 0.05 // (mm/sec)
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s)
//
-// Use Junction Deviation instead of traditional Jerk Limiting
+// Backlash Compensation
+// Adds extra movement to axes on direction-changes to account for backlash.
//
-//#define JUNCTION_DEVIATION
-#if ENABLED(JUNCTION_DEVIATION)
- #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+//#define BACKLASH_COMPENSATION
+#if ENABLED(BACKLASH_COMPENSATION)
+ // Define values for backlash distance and correction.
+ // If BACKLASH_GCODE is enabled these values are the defaults.
+ #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
+ #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
+
+ // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
+ // to reduce print artifacts. (Enabling this is costly in memory and computation!)
+ //#define BACKLASH_SMOOTHING_MM 3 // (mm)
+
+ // Add runtime configuration and tuning of backlash values (M425)
+ //#define BACKLASH_GCODE
+
+ #if ENABLED(BACKLASH_GCODE)
+ // Measure the Z backlash when probing (G29) and set with "M425 Z"
+ #define MEASURE_BACKLASH_WHEN_PROBING
+
+ #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
+ // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
+ // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
+ // increments while checking for the contact to be broken.
+ #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm)
+ #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm)
+ #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m)
+ #endif
+ #endif
+#endif
+
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
#endif
/**
@@ -468,8 +594,19 @@
*/
//#define ADAPTIVE_STEP_SMOOTHING
+/**
+ * Custom Microstepping
+ * Override as-needed for your setup. Up to 3 MS pins are supported.
+ */
+//#define MICROSTEP1 LOW,LOW,LOW
+//#define MICROSTEP2 HIGH,LOW,LOW
+//#define MICROSTEP4 LOW,HIGH,LOW
+//#define MICROSTEP8 HIGH,HIGH,LOW
+//#define MICROSTEP16 LOW,LOW,HIGH
+//#define MICROSTEP32 HIGH,LOW,HIGH
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
-#define MICROSTEP_MODES { 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
/**
* @section stepper motor current
@@ -521,15 +658,22 @@
//=============================Additional Features===========================
//===========================================================================
-#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
-#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
-#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
-
-//#define CHDK 4 //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
-#define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
-
// @section lcd
+// Change values more rapidly when the encoder is rotated faster
+#define ENCODER_RATE_MULTIPLIER
+#if ENABLED(ENCODER_RATE_MULTIPLIER)
+ #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed
+ #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed
+#endif
+
+// Play a beep when the feedrate is changed from the Status Screen
+//#define BEEP_ON_FEEDRATE_CHANGE
+#if ENABLED(BEEP_ON_FEEDRATE_CHANGE)
+ #define FEEDRATE_CHANGE_BEEP_DURATION 10
+ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
+#endif
+
// Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU
@@ -545,7 +689,7 @@
// Add an 'M73' G-code to set the current percentage
#define LCD_SET_PROGRESS_MANUALLY
-#if ENABLED(SDSUPPORT) || ENABLED(LCD_SET_PROGRESS_MANUALLY)
+#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
//#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
#if ENABLED(LCD_PROGRESS_BAR)
#define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
@@ -554,7 +698,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // SDSUPPORT || LCD_SET_PROGRESS_MANUALLY
+#endif
/**
* LED Control Menu
@@ -583,7 +727,7 @@
#define SD_DETECT_INVERTED
#define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
- #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
// Reverse SD sort to show "more recent" files first, according to the card's FAT.
// Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
@@ -669,6 +813,43 @@
*/
#define AUTO_REPORT_SD_STATUS
+ /**
+ * Support for USB thumb drives using an Arduino USB Host Shield or
+ * equivalent MAX3421E breakout board. The USB thumb drive will appear
+ * to Marlin as an SD card.
+ *
+ * The MAX3421E must be assigned the same pins as the SD card reader, with
+ * the following pin mapping:
+ *
+ * SCLK, MOSI, MISO --> SCLK, MOSI, MISO
+ * INT --> SD_DETECT_PIN
+ * SS --> SDSS
+ */
+ //#define USB_FLASH_DRIVE_SUPPORT
+ #if ENABLED(USB_FLASH_DRIVE_SUPPORT)
+ #define USB_CS_PIN SDSS
+ #define USB_INTR_PIN SD_DETECT_PIN
+ #endif
+
+ /**
+ * When using a bootloader that supports SD-Firmware-Flashing,
+ * add a menu item to activate SD-FW-Update on the next reboot.
+ *
+ * Requires ATMEGA2560 (Arduino Mega)
+ *
+ * Tested with this bootloader:
+ * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560
+ */
+ //#define SD_FIRMWARE_UPDATE
+ #if ENABLED(SD_FIRMWARE_UPDATE)
+ #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF
+ #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0
+ #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF
+ #endif
+
+ // Add an optimized binary file transfer mode, initiated with 'M28 B1'
+ //#define FAST_FILE_TRANSFER
+
#endif // SDSUPPORT
/**
@@ -683,7 +864,7 @@
* controller events, as there is a trade-off between reliable
* printing performance versus fast display updates.
*/
-#if ENABLED(DOGLCD)
+#if HAS_GRAPHICAL_LCD
// Show SD percentage next to the progress bar
#define DOGM_SD_PERCENT
@@ -708,26 +889,41 @@
// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
#if ENABLED(U8GLIB_ST7920)
- /**
- * ST7920-based LCDs can emulate a 16 x 4 character display using
- * the ST7920 character-generator for very fast screen updates.
- * Enable LIGHTWEIGHT_UI to use this special display mode.
- *
- * Since LIGHTWEIGHT_UI has limited space, the position and status
- * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
- * length of time to display the status message before clearing.
- *
- * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
- * This will prevent position updates from being displayed.
- */
//#define LIGHTWEIGHT_UI
#if ENABLED(LIGHTWEIGHT_UI)
#define STATUS_EXPIRE_SECONDS 20
#endif
#endif
-#endif // DOGLCD
+ /**
+ * Status (Info) Screen customizations
+ * These options may affect code size and screen render time.
+ * Custom status screens can forcibly override these settings.
+ */
+ //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones
+ //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends)
+ #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM)
+ #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
+ #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
+ //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
+ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
+ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
+ //#define STATUS_HEAT_PERCENT // Show heating in a progress bar
+
+#endif // HAS_GRAPHICAL_LCD
// @section safety
@@ -753,14 +949,26 @@
*/
#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
- //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
- #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
- #define BABYSTEP_MULTIPLICATOR (Z_STEPSMM / 40) // Babysteps are very small. Increase for faster motion.
- #define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
- #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
- #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
- // Note: Extra time may be added to mitigate controller latency.
- #define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR (Z_STEPSMM / 40) // Babysteps are very small. Increase for faster motion.
+
+ #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ #endif
+
+ //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
+ #if ENABLED(MOVE_Z_WHEN_IDLE)
+ #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
+ #endif
+
+ #define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
+ #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
+ //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
+ #define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+ #endif
#endif
// @section extruder
@@ -793,28 +1001,28 @@
#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
- #if( (X_PROBE_OFFSET_FROM_EXTRUDER + 15) > 0 )
- #define MESH_MIN_X (X_PROBE_OFFSET_FROM_EXTRUDER + 5)
+ #if( (X_PROBE_OFFSET_FROM_EXTRUDER + (MIN_PROBE_EDGE + MESH_INSET)) > 0 )
+ #define MESH_MIN_X (X_PROBE_OFFSET_FROM_EXTRUDER + MIN_PROBE_EDGE + MESH_INSET)
#else
- #define MESH_MIN_X 5
+ #define MESH_MIN_X 10
#endif
#if( (X_BED_SIZE + X_PROBE_OFFSET_FROM_EXTRUDER - 10) < X_BED_SIZE)
- #define MESH_MAX_X (X_BED_SIZE + X_PROBE_OFFSET_FROM_EXTRUDER - 5)
+ #define MESH_MAX_X (X_BED_SIZE + X_PROBE_OFFSET_FROM_EXTRUDER - (MIN_PROBE_EDGE + MESH_INSET))
#else
- #define MESH_MAX_X (X_BED_SIZE - 10)
+ #define MESH_MAX_X (X_BED_SIZE - 10)
#endif
- #if ( (Y_PROBE_OFFSET_FROM_EXTRUDER + 10) > 10 )
- #define MESH_MIN_Y (Y_PROBE_OFFSET_FROM_EXTRUDER + 10)
+ #if ( (Y_PROBE_OFFSET_FROM_EXTRUDER + 10) > 5 )
+ #define MESH_MIN_Y (Y_PROBE_OFFSET_FROM_EXTRUDER + MIN_PROBE_EDGE + MESH_INSET)
#else
- #define MESH_MIN_Y 20
+ #define MESH_MIN_Y 25
#endif
#if( (Y_BED_SIZE + Y_PROBE_OFFSET_FROM_EXTRUDER - 10) < Y_BED_SIZE)
#define MESH_MAX_Y (Y_BED_SIZE + Y_PROBE_OFFSET_FROM_EXTRUDER - 10)
#else
- #define MESH_MAX_Y (Y_BED_SIZE - 25)
+ #define MESH_MAX_Y (Y_BED_SIZE - Y_PROBE_OFFSET_FROM_EXTRUDER - (MIN_PROBE_EDGE + MESH_INSET))
#endif
#endif
@@ -833,13 +1041,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -980,8 +1182,21 @@
// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
#define ADVANCED_OK
+// Printrun may have trouble receiving long strings all at once.
+// This option inserts short delays between lines of serial output.
+#define SERIAL_OVERRUN_PROTECTION
+
// @section extras
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
/**
* Firmware-based and LCD-controlled retract
*
@@ -997,28 +1212,53 @@
* Note that M207 / M208 / M209 settings are saved to EEPROM.
*
*/
-#define FWRETRACT // ONLY PARTIALLY TESTED
+#define FWRETRACT
#if ENABLED(FWRETRACT)
- #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
- #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM
+ #if ENABLED(FWRETRACT_AUTORETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #endif
#define RETRACT_LENGTH 3 // Default retract length (positive mm)
#define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
#define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
- #define RETRACT_ZRAISE 0 // Default retract Z-lift
+ #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm)
#define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
#define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
#define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
#define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+ #if ENABLED(MIXING_EXTRUDER)
+ //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously
+ #endif
#endif
/**
- * Extra Fan Speed
- * Adds a secondary fan speed for each print-cooling fan.
- * 'M106 P T3-255' : Set a secondary speed for
- * 'M106 P T2' : Use the set secondary speed
- * 'M106 P T1' : Restore the previous fan speed
+ * Universal tool change settings.
+ * Applies to all types of extruders except where explicitly noted.
*/
-//#define EXTRA_FAN_SPEED
+#if EXTRUDERS > 1
+ // Z raise distance for tool-change, as needed for some extruders
+ #define TOOLCHANGE_ZRAISE 2 // (mm)
+
+ // Retract and prime filament on tool-change
+ //#define TOOLCHANGE_FILAMENT_SWAP
+ #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
+ #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
+ #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
+ #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
+ #endif
+
+ /**
+ * Position to park head during tool change.
+ * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
+ */
+ //#define TOOLCHANGE_PARK
+ #if ENABLED(TOOLCHANGE_PARK)
+ #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
+ #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m)
+ #endif
+#endif
/**
* Advanced Pause
@@ -1055,6 +1295,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 1 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1082,113 +1323,208 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * The TMC2130Stepper library is required for this stepper driver.
- * https://github.com/teemuatlut/TMC2130Stepper
- *
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * The TMC2208Stepper library is required for this stepper driver.
- * https://github.com/teemuatlut/TMC2208Stepper
+ * TMCStepper library is required to use TMC stepper drivers.
+ * https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #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.
*/
@@ -1198,13 +1534,40 @@
//#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
+ #define STEALTHCHOP_XY
+ #define STEALTHCHOP_Z
+ #define STEALTHCHOP_E
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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_12V
+
+ /**
+ * 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.
@@ -1223,9 +1586,10 @@
#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 needs to be enabled.
+ * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
* M913 X/Y/Z/E to live tune the setting
*/
//#define HYBRID_THRESHOLD
@@ -1236,18 +1600,21 @@
#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
/**
- * Use stallGuard2 to sense an obstacle and trigger an endstop.
- * You need to place a wire from the driver's DIAG1 pin to the X/Y endstop pin.
+ * 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_HOMING_SENSITIVITY is used for tuning the trigger sensitivity.
+ * 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.
@@ -1256,10 +1623,18 @@
*/
//#define SENSORLESS_HOMING // TMC2130 only
- #if ENABLED(SENSORLESS_HOMING)
- #define X_HOMING_SENSITIVITY 8
- #define Y_HOMING_SENSITIVITY 8
- #define Z_HOMING_SENSITIVITY 8
+ /**
+ * 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 ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING)
+ #define X_STALL_SENSITIVITY 8
+ #define Y_STALL_SENSITIVITY 8
+ //#define Z_STALL_SENSITIVITY 8
#endif
/**
@@ -1268,22 +1643,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #endif
-
/**
* 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
@@ -1298,61 +1657,153 @@
*/
#define TMC_ADV() { }
-#endif // TMC2130 || TMC2208
+#endif // HAS_TRINAMIC
// @section L6470
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1391,6 +1842,15 @@
// @section extras
+/**
+ * Canon Hack Development Kit
+ * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+ */
+//#define CHDK_PIN 4 // Set and enable a pin for triggering CHDK to take a picture
+#if PIN_EXISTS(CHDK)
+ #define CHDK_DELAY 50 // (ms) How long the pin should remain HIGH
+#endif
+
/**
* Spindle & Laser control
*
@@ -1481,11 +1941,6 @@
*/
//#define CNC_COORDINATE_SYSTEMS
-/**
- * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
- */
-#define PINS_DEBUGGING
-
/**
* Auto-report temperatures with M155 S
*/
@@ -1535,6 +1990,33 @@
*/
#define FASTER_GCODE_PARSER
+/**
+ * CNC G-code options
+ * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
+ * Note that G0 feedrates should be used with care for 3D printing (if used at all).
+ * High feedrates may cause ringing and harm print quality.
+ */
+//#define PAREN_COMMENTS // Support for parentheses-delimited comments
+//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
+
+// Enable and set a (default) feedrate for all G0 moves
+//#define G0_FEEDRATE 3000 // (mm/m)
+#ifdef G0_FEEDRATE
+ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
+#endif
+
+/**
+ * G-code Macros
+ *
+ * Add G-codes M810-M819 to define and run G-code macros.
+ * Macros are not saved to EEPROM.
+ */
+//#define GCODE_MACROS
+#if ENABLED(GCODE_MACROS)
+ #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
+ #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
+#endif
+
/**
* User-defined menu items that execute custom GCode
*/
@@ -1542,56 +2024,61 @@
#define CUSTOM_USER_MENUS
#endif
#if ENABLED(CUSTOM_USER_MENUS)
- //#define USER_SCRIPT_DONE "M117 User Script Done"
+ //#define USER_SCRIPT_DONE "M117 User Script Done"
+ #define CUSTOM_USER_MENU_TITLE "Commissioning"
#define USER_SCRIPT_AUDIBLE_FEEDBACK
#define USER_SCRIPT_RETURN // Return to status screen after a script
#define USER_DESC_1 "UBL Commission Step 1"
- #define USER_GCODE_1 "M502 \n M500 \n M501 \n M190 S75 \n G28 \n G29 P1 \n G29 S1 \n M117 Run Step 2 \n"
+ #define USER_GCODE_1 "M502 \n M500 \n M501 \n M190 S75 \n G28 \n G29 P1 \n G29 S1 \n M117 Run Step 2"
#define USER_DESC_2 "UBL Commission Step 2"
- #define USER_GCODE_2 "G29 S1 \n G29 S0 \n G29 F 10.0 \n G29 A \n M500 \n G28 \n G29 L1 \n M109 S225 \n G1 X150 Y 150 \n G1 Z0 \n M117 Set Z Offset \n"
+ #define USER_GCODE_2 "G29 S1 \n G29 S0 \n G29 F 10.0 \n G29 A \n M500 \n G28 \n G29 L1 \n M109 S225 \n G1 X150 Y 150 \n G1 Z0 \n M117 Set Z Offset"
#define USER_DESC_3 "Prep for Z Adjust"
- #define USER_GCODE_3 "M190 75 \n M104 235 \n G28 \n G29 L1 \n G1 X150 Y 150 \n G1 Z0 \n"
+ #define USER_GCODE_3 "M190 75 \n M104 235 \n G28 \n G29 L1 \n G1 X150 Y 150 \n G1 Z0"
#define USER_DESC_4 "Fill Mesh Points"
- #define USER_GCODE_4 "G29 P3 \n G29 P3 \n G29 P3 \n G29 T \n"
+ #define USER_GCODE_4 "G29 P3 \n G29 P3 \n G29 P3 \n G29 T "
#define USER_DESC_5 "Run Mesh Validation"
- #define USER_GCODE_5 "G26 \n"
+ #define USER_GCODE_5 "G26"
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-#define ACTION_ON_PAUSE "pause"
-#define ACTION_ON_RESUME "resume"
+#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ #define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1678,6 +2165,7 @@
#define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
// connector at: right=0 bottom=-90 top=90 left=180
+ //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
/**
* Sample debug features
@@ -1714,7 +2202,79 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
+// @section develop
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+#define PINS_DEBUGGING
+
// Enable Marlin dev mode which adds some special commands
//#define MARLIN_DEV_MODE
-
-#endif // CONFIGURATION_ADV_H
diff --git a/Marlin/src/HAL/HAL_AVR/HAL.cpp b/Marlin/src/HAL/HAL_AVR/HAL.cpp
index e694559761..2bfbccdf2d 100644
--- a/Marlin/src/HAL/HAL_AVR/HAL.cpp
+++ b/Marlin/src/HAL/HAL_AVR/HAL.cpp
@@ -1,7 +1,7 @@
/* **************************************************************************
Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
diff --git a/Marlin/src/HAL/HAL_AVR/HAL.h b/Marlin/src/HAL/HAL_AVR/HAL.h
index 2992ebe0e3..a4c1355b52 100644
--- a/Marlin/src/HAL/HAL_AVR/HAL.h
+++ b/Marlin/src/HAL/HAL_AVR/HAL.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
*
* This program is free software: you can redistribute it and/or modify
diff --git a/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp b/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp
index 4e4b248182..31d2f25b42 100644
--- a/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp
+++ b/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp b/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
index 36134f7b89..ff1b6569ba 100644
--- a/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
+++ b/Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -739,6 +739,24 @@
#endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H)
+
+#if defined(INTERNAL_SERIAL_PORT)
+
+ ISR(SERIAL_REGNAME(USART,INTERNAL_SERIAL_PORT,_RX_vect)) {
+ MarlinSerial>::store_rxd_char();
+ }
+
+ ISR(SERIAL_REGNAME(USART,INTERNAL_SERIAL_PORT,_UDRE_vect)) {
+ MarlinSerial>::_tx_udr_empty_irq();
+ }
+
+ // Preinstantiate
+ template class MarlinSerial>;
+
+ // Instantiate
+ MarlinSerial> internalSerial;
+
+#endif
// For AT90USB targets use the UART for BT interfacing
#if defined(USBCON) && ENABLED(BLUETOOTH)
HardwareSerial bluetoothSerial;
diff --git a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h
index 132097eb49..bd0a6234f0 100644
--- a/Marlin/src/HAL/HAL_AVR/MarlinSerial.h
+++ b/Marlin/src/HAL/HAL_AVR/MarlinSerial.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -275,6 +275,24 @@
#endif // !USBCON
+
+#if defined(INTERNAL_SERIAL_PORT)
+ template
+ struct MarlinInternalSerialCfg {
+ static constexpr int PORT = serial;
+ static constexpr unsigned int RX_SIZE = 32;
+ static constexpr unsigned int TX_SIZE = 32;
+ static constexpr bool XONOFF = false;
+ static constexpr bool EMERGENCYPARSER = false;
+ static constexpr bool DROPPED_RX = false;
+ static constexpr bool RX_OVERRUNS = false;
+ static constexpr bool RX_FRAMING_ERRORS = false;
+ static constexpr bool MAX_RX_QUEUED = false;
+ };
+
+ extern MarlinSerial> internalSerial;
+#endif
+
// Use the UART for Bluetooth in AT90USB configurations
#if defined(USBCON) && ENABLED(BLUETOOTH)
extern HardwareSerial bluetoothSerial;
diff --git a/Marlin/src/HAL/HAL_AVR/SanityCheck.h b/Marlin/src/HAL/HAL_AVR/SanityCheck.h
index f87044971b..5eb5098bae 100644
--- a/Marlin/src/HAL/HAL_AVR/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_AVR/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/ServoTimers.h b/Marlin/src/HAL/HAL_AVR/ServoTimers.h
index c7c4587adc..b63b69c82e 100644
--- a/Marlin/src/HAL/HAL_AVR/ServoTimers.h
+++ b/Marlin/src/HAL/HAL_AVR/ServoTimers.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h b/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
index 791c9812af..c066703942 100644
--- a/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1280.h b/Marlin/src/HAL/HAL_AVR/fastio_1280.h
index 601c515f7f..38408d7b60 100644
--- a/Marlin/src/HAL/HAL_AVR/fastio_1280.h
+++ b/Marlin/src/HAL/HAL_AVR/fastio_1280.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1281.h b/Marlin/src/HAL/HAL_AVR/fastio_1281.h
index 274bc6285b..9707c7d54b 100644
--- a/Marlin/src/HAL/HAL_AVR/fastio_1281.h
+++ b/Marlin/src/HAL/HAL_AVR/fastio_1281.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/fastio_168.h b/Marlin/src/HAL/HAL_AVR/fastio_168.h
index 36187bc698..2964ef5a0b 100644
--- a/Marlin/src/HAL/HAL_AVR/fastio_168.h
+++ b/Marlin/src/HAL/HAL_AVR/fastio_168.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/fastio_644.h b/Marlin/src/HAL/HAL_AVR/fastio_644.h
index 1ad7573801..bcd825d24c 100644
--- a/Marlin/src/HAL/HAL_AVR/fastio_644.h
+++ b/Marlin/src/HAL/HAL_AVR/fastio_644.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h b/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h
index 70cfcf39b7..805c0daf73 100644
--- a/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h
+++ b/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h
index 448438c87e..1e1e4108fa 100644
--- a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h
+++ b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/math_AVR.h b/Marlin/src/HAL/HAL_AVR/math_AVR.h
index 64c9c7998e..8299b8bbd3 100644
--- a/Marlin/src/HAL/HAL_AVR/math_AVR.h
+++ b/Marlin/src/HAL/HAL_AVR/math_AVR.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp b/Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp
index 1fcd1ac70a..25feab3124 100644
--- a/Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp
+++ b/Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug.h b/Marlin/src/HAL/HAL_AVR/pinsDebug.h
index 91798cdffc..8df4ffcf87 100644
--- a/Marlin/src/HAL/HAL_AVR/pinsDebug.h
+++ b/Marlin/src/HAL/HAL_AVR/pinsDebug.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h
index 8da9570743..3aedaffddd 100644
--- a/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h
+++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h b/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h
index 99f83a03a4..028c8f02a4 100644
--- a/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h
+++ b/Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h
@@ -1,7 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp b/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp
index ea227b1956..96ccf013f9 100644
--- a/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp
+++ b/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/spi_pins.h b/Marlin/src/HAL/HAL_AVR/spi_pins.h
index d3d2412416..85d2d8f6e5 100644
--- a/Marlin/src/HAL/HAL_AVR/spi_pins.h
+++ b/Marlin/src/HAL/HAL_AVR/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp
index 238981afa8..7c65a904f4 100644
--- a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp
+++ b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h
index ac55c9aebd..ed5150fe08 100644
--- a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h
+++ b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp b/Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp
index 40407f7f5d..ce116678c4 100644
--- a/Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/DebugMonitor_Due.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp b/Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp
index 54d08d69b1..e560570148 100644
--- a/Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp
@@ -120,14 +120,14 @@ static uint8_t buffer[256] = {0}, // The RAM buffer to accumulate writes
const uint8_t* c = (const uint8_t*) data;
char buffer[80];
- sprintf(buffer, "Page: %d (0x%04x)\n", page, page);
+ sprintf_P(buffer, PSTR("Page: %d (0x%04x)\n"), page, page);
SERIAL_ECHO(buffer);
char* p = &buffer[0];
for (int i = 0; i< PageSize; ++i) {
- if ((i & 0xF) == 0) p += sprintf(p,"%04x] ", i);
+ if ((i & 0xF) == 0) p += sprintf_P(p, PSTR("%04x] "), i);
- p += sprintf(p," %02x", c[i]);
+ p += sprintf_P(p, PSTR(" %02x"), c[i]);
if ((i & 0xF) == 0xF) {
*p++ = '\n';
*p = 0;
diff --git a/Marlin/src/HAL/HAL_DUE/HAL.cpp b/Marlin/src/HAL/HAL_DUE/HAL.cpp
index cc2db0eb26..cefe308e81 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL.cpp
+++ b/Marlin/src/HAL/HAL_DUE/HAL.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
*
* This program is free software: you can redistribute it and/or modify
diff --git a/Marlin/src/HAL/HAL_DUE/HAL.h b/Marlin/src/HAL/HAL_DUE/HAL.h
index 57d3160ca4..4814f0ff6c 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL.h
+++ b/Marlin/src/HAL/HAL_DUE/HAL.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp b/Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
index b127f1a990..c866ae9d7b 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -250,7 +250,7 @@
}
// all the others
- static uint32_t spiDelayCyclesX4 = (F_CPU/1000000); // 4uS => 125khz
+ static uint32_t spiDelayCyclesX4 = (F_CPU) / 1000000; // 4uS => 125khz
static uint8_t spiTransferX(uint8_t b) { // using Mode 0
int bits = 8;
@@ -451,77 +451,48 @@
static pfnSpiTxBlock spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
- #if MB(ALLIGATOR) // control SDSS pin
- void spiBegin() {
- SET_OUTPUT(SS_PIN);
- WRITE(SS_PIN, HIGH);
- SET_OUTPUT(SCK_PIN);
- SET_INPUT(MISO_PIN);
- SET_OUTPUT(MOSI_PIN);
+ #if MB(ALLIGATOR)
+ #define _SS_WRITE(S) WRITE(SS_PIN, S)
+ #else
+ #define _SS_WRITE(S) NOOP
+ #endif
+
+ void spiBegin() {
+ SET_OUTPUT(SS_PIN);
+ _SS_WRITE(HIGH);
+ SET_OUTPUT(SCK_PIN);
+ SET_INPUT(MISO_PIN);
+ SET_OUTPUT(MOSI_PIN);
+ }
+
+ uint8_t spiRec() {
+ _SS_WRITE(LOW);
+ WRITE(MOSI_PIN, HIGH); // Output 1s 1
+ uint8_t b = spiTransferRx(0xFF);
+ _SS_WRITE(HIGH);
+ return b;
+ }
+
+ void spiRead(uint8_t* buf, uint16_t nbyte) {
+ if (nbyte) {
+ _SS_WRITE(LOW);
+ WRITE(MOSI_PIN, HIGH); // Output 1s 1
+ spiRxBlock(buf, nbyte);
+ _SS_WRITE(HIGH);
}
+ }
- uint8_t spiRec() {
- WRITE(SS_PIN, LOW);
- WRITE(MOSI_PIN, 1); /* Output 1s 1*/
- uint8_t b = spiTransferRx(0xFF);
- WRITE(SS_PIN, HIGH);
- return b;
- }
-
- void spiRead(uint8_t* buf, uint16_t nbyte) {
- uint32_t todo = nbyte;
- if (todo == 0) return;
-
- WRITE(SS_PIN, LOW);
- WRITE(MOSI_PIN, 1); /* Output 1s 1*/
- spiRxBlock(buf,nbyte);
- WRITE(SS_PIN, HIGH);
- }
-
- void spiSend(uint8_t b) {
- WRITE(SS_PIN, LOW);
- (void) spiTransferTx(b);
- WRITE(SS_PIN, HIGH);
- }
-
- void spiSendBlock(uint8_t token, const uint8_t* buf) {
- WRITE(SS_PIN, LOW);
- (void) spiTransferTx(token);
- spiTxBlock(buf,512);
- WRITE(SS_PIN, HIGH);
-
- #else // let calling routine control SDSS
- void spiBegin() {
- SET_OUTPUT(SS_PIN);
- SET_OUTPUT(SCK_PIN);
- SET_INPUT(MISO_PIN);
- SET_OUTPUT(MOSI_PIN);
- }
-
- uint8_t spiRec() {
- WRITE(MOSI_PIN, 1); /* Output 1s 1*/
- uint8_t b = spiTransferRx(0xFF);
- return b;
- }
-
- void spiRead(uint8_t* buf, uint16_t nbyte) {
- uint32_t todo = nbyte;
- if (todo == 0) return;
-
- WRITE(MOSI_PIN, 1); /* Output 1s 1*/
- spiRxBlock(buf,nbyte);
- }
-
- void spiSend(uint8_t b) {
- (void) spiTransferTx(b);
- }
-
- void spiSendBlock(uint8_t token, const uint8_t* buf) {
- (void) spiTransferTx(token);
- spiTxBlock(buf,512);
-
- #endif
+ void spiSend(uint8_t b) {
+ _SS_WRITE(LOW);
+ (void)spiTransferTx(b);
+ _SS_WRITE(HIGH);
+ }
+ void spiSendBlock(uint8_t token, const uint8_t* buf) {
+ _SS_WRITE(LOW);
+ (void)spiTransferTx(token);
+ spiTxBlock(buf, 512);
+ _SS_WRITE(HIGH);
}
/**
@@ -549,7 +520,7 @@
spiRxBlock = (pfnSpiRxBlock)spiRxBlockX;
break;
default:
- spiDelayCyclesX4 = (F_CPU/1000000) >> (6 - spiRate);
+ spiDelayCyclesX4 = ((F_CPU) / 1000000) >> (6 - spiRate);
spiTransferTx = (pfnSpiTransfer)spiTransferX;
spiTransferRx = (pfnSpiTransfer)spiTransferX;
spiTxBlock = (pfnSpiTxBlock)spiTxBlockX;
@@ -557,9 +528,7 @@
break;
}
- #if MB(ALLIGATOR)
- WRITE(SS_PIN, HIGH);
- #endif
+ _SS_WRITE(HIGH);
WRITE(MOSI_PIN, HIGH);
WRITE(SCK_PIN, LOW);
}
@@ -573,6 +542,10 @@
#else // !SOFTWARE_SPI
+ #define WHILE_TX(N) while ((SPI0->SPI_SR & SPI_SR_TDRE) == (N))
+ #define WHILE_RX(N) while ((SPI0->SPI_SR & SPI_SR_RDRF) == (N))
+ #define FLUSH_TX() do{ WHILE_RX(1) SPI0->SPI_RDR; }while(0)
+
#if MB(ALLIGATOR)
// slave selects controlled by SPI controller
@@ -640,18 +613,19 @@
SET_OUTPUT(SPI_EEPROM2_CS);
SET_OUTPUT(SPI_FLASH_CS);
WRITE(DAC0_SYNC, HIGH);
- WRITE(SPI_EEPROM1_CS, HIGH );
- WRITE(SPI_EEPROM2_CS, HIGH );
- WRITE(SPI_FLASH_CS, HIGH );
- WRITE(SS_PIN, HIGH );
+ WRITE(SPI_EEPROM1_CS, HIGH);
+ WRITE(SPI_EEPROM2_CS, HIGH);
+ WRITE(SPI_FLASH_CS, HIGH);
+ WRITE(SS_PIN, HIGH);
- OUT_WRITE(SDSS,0);
+ OUT_WRITE(SDSS, LOW);
PIO_Configure(
g_APinDescription[SPI_PIN].pPort,
g_APinDescription[SPI_PIN].ulPinType,
g_APinDescription[SPI_PIN].ulPin,
- g_APinDescription[SPI_PIN].ulPinConfiguration);
+ g_APinDescription[SPI_PIN].ulPinConfiguration
+ );
spiInit(1);
}
@@ -660,30 +634,23 @@
uint8_t spiRec() {
// write dummy byte with address and end transmission flag
SPI0->SPI_TDR = 0x000000FF | SPI_PCS(SPI_CHAN) | SPI_TDR_LASTXFER;
- // wait for transmit register empty
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
- // wait for receive register
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
- // get byte from receive register
+ WHILE_TX(0);
+ WHILE_RX(0);
+
//DELAY_US(1U);
return SPI0->SPI_RDR;
}
uint8_t spiRec(uint32_t chan) {
- uint8_t spirec_tmp;
- // wait for transmit register empty
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 1)
- spirec_tmp = SPI0->SPI_RDR;
- UNUSED(spirec_tmp);
+
+ WHILE_TX(0);
+ FLUSH_RX();
// write dummy byte with address and end transmission flag
SPI0->SPI_TDR = 0x000000FF | SPI_PCS(chan) | SPI_TDR_LASTXFER;
+ WHILE_RX(0);
- // wait for receive register
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
- // get byte from receive register
return SPI0->SPI_RDR;
}
@@ -692,9 +659,9 @@
if (nbyte-- == 0) return;
for (int i = 0; i < nbyte; i++) {
- //while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
+ //WHILE_TX(0);
SPI0->SPI_TDR = 0x000000FF | SPI_PCS(SPI_CHAN);
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
+ WHILE_RX(0);
buf[i] = SPI0->SPI_RDR;
//DELAY_US(1U);
}
@@ -705,11 +672,8 @@
void spiSend(byte b) {
// write byte with address and end transmission flag
SPI0->SPI_TDR = (uint32_t)b | SPI_PCS(SPI_CHAN) | SPI_TDR_LASTXFER;
- // wait for transmit register empty
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
- // wait for receive register
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
- // clear status
+ WHILE_TX(0);
+ WHILE_RX(0);
SPI0->SPI_RDR;
//DELAY_US(1U);
}
@@ -718,8 +682,8 @@
if (n == 0) return;
for (size_t i = 0; i < n - 1; i++) {
SPI0->SPI_TDR = (uint32_t)buf[i] | SPI_PCS(SPI_CHAN);
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
+ WHILE_TX(0);
+ WHILE_RX(0);
SPI0->SPI_RDR;
//DELAY_US(1U);
}
@@ -727,29 +691,20 @@
}
void spiSend(uint32_t chan, byte b) {
- uint8_t dummy_read = 0;
- // wait for transmit register empty
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
+ WHILE_TX(0);
// write byte with address and end transmission flag
SPI0->SPI_TDR = (uint32_t)b | SPI_PCS(chan) | SPI_TDR_LASTXFER;
- // wait for receive register
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
- // clear status
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 1)
- dummy_read = SPI0->SPI_RDR;
- UNUSED(dummy_read);
+ WHILE_RX(0);
+ FLUSH_RX();
}
void spiSend(uint32_t chan, const uint8_t* buf, size_t n) {
- uint8_t dummy_read = 0;
if (n == 0) return;
for (int i = 0; i < (int)n - 1; i++) {
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
+ WHILE_TX(0);
SPI0->SPI_TDR = (uint32_t)buf[i] | SPI_PCS(chan);
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 1)
- dummy_read = SPI0->SPI_RDR;
- UNUSED(dummy_read);
+ WHILE_RX(0);
+ FLUSH_RX();
}
spiSend(chan, buf[n - 1]);
}
@@ -757,13 +712,13 @@
// Write from buffer to SPI
void spiSendBlock(uint8_t token, const uint8_t* buf) {
SPI0->SPI_TDR = (uint32_t)token | SPI_PCS(SPI_CHAN);
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
- //while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
+ WHILE_TX(0);
+ //WHILE_RX(0);
//SPI0->SPI_RDR;
for (int i = 0; i < 511; i++) {
SPI0->SPI_TDR = (uint32_t)buf[i] | SPI_PCS(SPI_CHAN);
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
+ WHILE_TX(0);
+ WHILE_RX(0);
SPI0->SPI_RDR;
//DELAY_US(1U);
}
@@ -792,7 +747,7 @@
// Disable PIO on A26 and A27
REG_PIOA_PDR = 0x0C000000;
- OUT_WRITE(SDSS, 1);
+ OUT_WRITE(SDSS, HIGH);
// Reset SPI0 (from sam lib)
SPI0->SPI_CR = SPI_CR_SPIDIS;
@@ -807,45 +762,30 @@
SPI0->SPI_CSR[3] = SPI_CSR_SCBR(spiDivider[spiRate]) | SPI_CSR_CSAAT | SPI_MODE_0_DUE_HW; // use same CSR as TMC2130
}
- void spiBegin() {
- spiInit();
- }
+ void spiBegin() { spiInit(); }
static uint8_t spiTransfer(uint8_t data) {
-
- // Wait until tx register is empty
- while( (SPI0->SPI_SR & SPI_SR_TDRE) == 0 );
- // Send data
+ WHILE_TX(0);
SPI0->SPI_TDR = (uint32_t)data | 0x00070000UL; // Add TMC2130 PCS bits to every byte
-
- // wait for transmit register empty
- while ((SPI0->SPI_SR & SPI_SR_TDRE) == 0);
-
- // wait for receive register
- while ((SPI0->SPI_SR & SPI_SR_RDRF) == 0);
- // get byte from receive register
+ WHILE_TX(0);
+ WHILE_RX(0);
return SPI0->SPI_RDR;
}
- uint8_t spiRec() {
- uint8_t data = spiTransfer(0xFF);
- return data;
- }
+ uint8_t spiRec() { return (uint8_t)spiTransfer(0xFF); }
void spiRead(uint8_t* buf, uint16_t nbyte) {
- if (nbyte == 0) return;
- for (int i = 0; i < nbyte; i++)
- buf[i] = spiTransfer(0xFF);
+ if (nbyte)
+ for (int i = 0; i < nbyte; i++)
+ buf[i] = spiTransfer(0xFF);
}
- void spiSend(uint8_t data) {
- spiTransfer(data);
- }
+ void spiSend(uint8_t data) { spiTransfer(data); }
- void spiSend(const uint8_t* buf, size_t n) {
- if (n == 0) return;
- for (uint16_t i = 0; i < n; i++)
- spiTransfer(buf[i]);
+ void spiSend(const uint8_t* buf, size_t nbyte) {
+ if (nbyte)
+ for (uint16_t i = 0; i < nbyte; i++)
+ spiTransfer(buf[i]);
}
void spiSendBlock(uint8_t token, const uint8_t* buf) {
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp b/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp
index f5f74c0ce2..aba3b3270a 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h b/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
index 46b7aaf5a4..7e88835500 100644
--- a/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
*
* This program is free software: you can redistribute it and/or modify
diff --git a/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp b/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp
index 97aefc98d1..446eb2884d 100644
--- a/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.h b/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.h
index a9be8e0b31..71de4bf52e 100644
--- a/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.cpp b/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.cpp
index b176f9d0d9..4f6b4915fa 100644
--- a/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h b/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h
index fbba508506..65f829e2a1 100644
--- a/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp
index ef72c38270..4be9c43f47 100644
--- a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h
index 1fe0d236ee..9b03d46f28 100644
--- a/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/SanityCheck.h b/Marlin/src/HAL/HAL_DUE/SanityCheck.h
index f24233a859..a399bbf13d 100644
--- a/Marlin/src/HAL/HAL_DUE/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_DUE/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/Servo_Due.cpp b/Marlin/src/HAL/HAL_DUE/Servo_Due.cpp
index db1b3e39ba..13a858a429 100644
--- a/Marlin/src/HAL/HAL_DUE/Servo_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/Servo_Due.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/Tone.cpp b/Marlin/src/HAL/HAL_DUE/Tone.cpp
index ff522fa3ab..aa4d7a0126 100644
--- a/Marlin/src/HAL/HAL_DUE/Tone.cpp
+++ b/Marlin/src/HAL/HAL_DUE/Tone.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/endstop_interrupts.h b/Marlin/src/HAL/HAL_DUE/endstop_interrupts.h
index d026abfea6..eb4833ecd6 100644
--- a/Marlin/src/HAL/HAL_DUE/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_DUE/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/fastio_Due.h b/Marlin/src/HAL/HAL_DUE/fastio_Due.h
index cb713122e7..18bf55e6c2 100644
--- a/Marlin/src/HAL/HAL_DUE/fastio_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/fastio_Due.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp b/Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp
index 7c35818b47..1a3033b509 100644
--- a/Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp
+++ b/Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/HAL_DUE/pinsDebug.h b/Marlin/src/HAL/HAL_DUE/pinsDebug.h
index f4e2238981..c6cfe2ca8b 100644
--- a/Marlin/src/HAL/HAL_DUE/pinsDebug.h
+++ b/Marlin/src/HAL/HAL_DUE/pinsDebug.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2018 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -71,7 +71,7 @@
#define GET_ARRAY_PIN(p) pin_array[p].pin
#define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0)
#define DIGITAL_PIN_TO_ANALOG_PIN(p) int(p - analogInputToDigitalPin(0))
-#define IS_ANALOG(P) (((P) >= analogInputToDigitalPin(0)) && ((P) <= analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
+#define IS_ANALOG(P) WITHIN(P, char(analogInputToDigitalPin(0)), char(analogInputToDigitalPin(NUM_ANALOG_INPUTS - 1)))
#define pwm_status(pin) (((g_pinStatus[pin] & 0xF) == PIN_STATUS_PWM) && \
((g_APinDescription[pin].ulPinAttribute & PIN_ATTR_PWM) == PIN_ATTR_PWM))
#define MULTI_NAME_PAD 14 // space needed to be pretty if not first name assigned to a pin
@@ -187,4 +187,4 @@ void pwm_details(int32_t pin) {
* ID | PB11
* VBOF | PB10
*
- */
\ No newline at end of file
+ */
diff --git a/Marlin/src/HAL/HAL_DUE/spi_pins.h b/Marlin/src/HAL/HAL_DUE/spi_pins.h
index 8f4f987155..c805b0c1ea 100644
--- a/Marlin/src/HAL/HAL_DUE/spi_pins.h
+++ b/Marlin/src/HAL/HAL_DUE/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp
index c62f6a06ec..98c1521439 100644
--- a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp
+++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017, 2018 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
index 968f63241c..1546407a1e 100644
--- a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
+++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -64,15 +64,14 @@
#include "../shared/Delay.h"
void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index) {
- PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,
- g_APinDescription[u8g->pin_list[pin_index]].ulPin, g_APinDescription[u8g->pin_list[pin_index]].ulPinConfiguration); // OUTPUT
+ PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1,
+ g_APinDescription[u8g->pin_list[pin_index]].ulPin, g_APinDescription[u8g->pin_list[pin_index]].ulPinConfiguration); // OUTPUT
}
void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level) {
volatile Pio* port = g_APinDescription[u8g->pin_list[pin_index]].pPort;
uint32_t mask = g_APinDescription[u8g->pin_list[pin_index]].ulPin;
- if (level) port->PIO_SODR = mask;
- else port->PIO_CODR = mask;
+ if (level) port->PIO_SODR = mask; else port->PIO_CODR = mask;
}
Pio *SCK_pPio, *MOSI_pPio;
@@ -95,26 +94,15 @@ static void spiSend_sw_DUE(uint8_t val) { // 800KHz
static uint8_t rs_last_state = 255;
static void u8g_com_DUE_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) {
- uint8_t i;
-
- if ( rs != rs_last_state) { // time to send a command/data byte
+ if (rs != rs_last_state) { // time to send a command/data byte
rs_last_state = rs;
-
- if ( rs == 0 )
- /* command */
- spiSend_sw_DUE(0x0F8);
- else
- /* data */
- spiSend_sw_DUE(0x0FA);
-
+ spiSend_sw_DUE(rs ? 0x0FA : 0x0F8); // Command or Data
DELAY_US(40); // give the controller some time to process the data: 20 is bad, 30 is OK, 40 is safe
}
-
spiSend_sw_DUE(val & 0x0F0);
spiSend_sw_DUE(val << 4);
}
-
uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
switch (msg) {
case U8G_COM_MSG_INIT:
diff --git a/Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp b/Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp
index cfaa057a25..52edc9711b 100644
--- a/Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp
+++ b/Marlin/src/HAL/HAL_DUE/usb/sd_mmc_spi_mem.cpp
@@ -66,7 +66,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
#ifdef DEBUG_MMC
char buffer[80];
- sprintf(buffer, "SDRD: %d @ 0x%08x\n", nb_sector, addr);
+ sprintf_P(buffer, PSTR("SDRD: %d @ 0x%08x\n"), nb_sector, addr);
SERIAL_ECHO_P(0, buffer);
#endif
@@ -100,7 +100,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
#ifdef DEBUG_MMC
char buffer[80];
- sprintf(buffer, "SDWR: %d @ 0x%08x\n", nb_sector, addr);
+ sprintf_P(buffer, PSTR("SDWR: %d @ 0x%08x\n"), nb_sector, addr);
SERIAL_ECHO_P(0, buffer);
#endif
diff --git a/Marlin/src/HAL/HAL_DUE/watchdog_Due.cpp b/Marlin/src/HAL/HAL_DUE/watchdog_Due.cpp
index 3467fdd942..2bf8080b76 100644
--- a/Marlin/src/HAL/HAL_DUE/watchdog_Due.cpp
+++ b/Marlin/src/HAL/HAL_DUE/watchdog_Due.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_DUE/watchdog_Due.h b/Marlin/src/HAL/HAL_DUE/watchdog_Due.h
index c75875e2ea..07187bfe6b 100644
--- a/Marlin/src/HAL/HAL_DUE/watchdog_Due.h
+++ b/Marlin/src/HAL/HAL_DUE/watchdog_Due.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL.cpp b/Marlin/src/HAL/HAL_ESP32/HAL.cpp
index f928d635f7..1ef2798553 100644
--- a/Marlin/src/HAL/HAL_ESP32/HAL.cpp
+++ b/Marlin/src/HAL/HAL_ESP32/HAL.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -85,6 +85,8 @@ void HAL_init(void) {
#if ENABLED(WIFISUPPORT)
OTA_init();
#endif
+
+ i2s_init();
}
void HAL_idletask(void) {
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL.h b/Marlin/src/HAL/HAL_ESP32/HAL.h
index a9f9afbffc..e1249c71ee 100644
--- a/Marlin/src/HAL/HAL_ESP32/HAL.h
+++ b/Marlin/src/HAL/HAL_ESP32/HAL.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
*
* This program is free software: you can redistribute it and/or modify
@@ -31,7 +31,7 @@
#include
#undef DISABLED
-#undef _BV
+#undef M_PI
#include
@@ -43,6 +43,7 @@
#include "fastio_ESP32.h"
#include "watchdog_ESP32.h"
+#include "i2s.h"
#include "HAL_timers_ESP32.h"
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp b/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp
index c93227822d..7beb9b4991 100644
--- a/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp
+++ b/Marlin/src/HAL/HAL_ESP32/HAL_spi_ESP32.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -61,9 +61,9 @@ void spiInit(uint8_t spiRate) {
uint32_t clock;
switch (spiRate) {
- case SPI_FULL_SPEED: clock = SPI_CLOCK_DIV2 ; break;
- case SPI_HALF_SPEED: clock = SPI_CLOCK_DIV4 ; break;
- case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8 ; break;
+ case SPI_FULL_SPEED: clock = SPI_CLOCK_DIV2; break;
+ case SPI_HALF_SPEED: clock = SPI_CLOCK_DIV4; break;
+ case SPI_QUARTER_SPEED: clock = SPI_CLOCK_DIV8; break;
case SPI_EIGHTH_SPEED: clock = SPI_CLOCK_DIV16; break;
case SPI_SPEED_5: clock = SPI_CLOCK_DIV32; break;
case SPI_SPEED_6: clock = SPI_CLOCK_DIV64; break;
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp
index f3d444af0c..39ca18fcea 100644
--- a/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp
+++ b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -113,7 +113,7 @@ void HAL_timer_start(const uint8_t timer_num, uint32_t frequency) {
const tTimerConfig timer = TimerConfig[timer_num];
timer_config_t config;
- config.divider = STEPPER_TIMER_PRESCALE;
+ config.divider = timer.divider;
config.counter_dir = TIMER_COUNT_UP;
config.counter_en = TIMER_PAUSE;
config.alarm_en = TIMER_ALARM_EN;
diff --git a/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h
index e8afd83bb8..60b6dcfa84 100644
--- a/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h
+++ b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -43,9 +43,15 @@ typedef uint64_t hal_timer_t;
#define HAL_TIMER_RATE APB_CLK_FREQ // frequency of timer peripherals
-#define STEPPER_TIMER_PRESCALE 40
-#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer, 2MHz
-#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
+#if ENABLED(I2S_STEPPER_STREAM)
+ #define STEPPER_TIMER_PRESCALE 1
+ #define STEPPER_TIMER_RATE 250000 // 250khz, 4us pulses of i2s word clock
+ #define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs // wrong would be 0.25
+#else
+ #define STEPPER_TIMER_PRESCALE 40
+ #define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // frequency of stepper timer, 2MHz
+ #define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs
+#endif
#define STEP_TIMER_MIN_INTERVAL 8 // minimum time in µs between stepper interrupts
diff --git a/Marlin/src/HAL/HAL_ESP32/SanityCheck.h b/Marlin/src/HAL/HAL_ESP32/SanityCheck.h
index a96f665151..23b3fbe026 100644
--- a/Marlin/src/HAL/HAL_ESP32/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_ESP32/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h b/Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h
index 9a325f30a7..d4c8cbd490 100644
--- a/Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h b/Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h
index 8459a151cc..abf7ba5f9b 100644
--- a/Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h
+++ b/Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -21,38 +21,40 @@
*/
#pragma once
+#include "i2s.h"
+
/**
* Utility functions
*/
-// set pin as input
-#define _SET_INPUT(IO) pinMode(IO, INPUT)
+// Set pin as input
+#define _SET_INPUT(IO) pinMode(IO, INPUT)
-// set pin as output
-#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT)
+// Set pin as output
+#define _SET_OUTPUT(IO) pinMode(IO, OUTPUT)
-// set pin as input with pullup mode
-#define _PULLUP(IO, v) pinMode(IO, v ? INPUT_PULLUP : INPUT)
+// Set pin as input with pullup mode
+#define _PULLUP(IO, v) pinMode(IO, v ? INPUT_PULLUP : INPUT)
// Read a pin wrapper
-#define READ(IO) digitalRead(IO)
+#define READ(IO) digitalRead(IO)
// Write to a pin wrapper
-#define WRITE(IO, v) digitalWrite(IO, v)
+#define WRITE(IO, v) (TEST(IO, 7) ? i2s_write(IO & 0x7F, v) : digitalWrite(IO, v))
-// set pin as input wrapper
-#define SET_INPUT(IO) _SET_INPUT(IO)
+// Set pin as input wrapper
+#define SET_INPUT(IO) _SET_INPUT(IO)
-// set pin as input with pullup wrapper
-#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
+// Set pin as input with pullup wrapper
+#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0)
-// set pin as output wrapper
-#define SET_OUTPUT(IO) do{ _SET_OUTPUT(IO); WRITE(IO, LOW); }while(0)
+// Set pin as output wrapper
+#define SET_OUTPUT(IO) do{ _SET_OUTPUT(IO); WRITE(IO, LOW); }while(0)
-#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
+#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
//
-// ports and functions
+// Ports and functions
//
// UART
diff --git a/Marlin/src/HAL/HAL_ESP32/i2s.cpp b/Marlin/src/HAL/HAL_ESP32/i2s.cpp
new file mode 100644
index 0000000000..c503a24bf8
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/i2s.cpp
@@ -0,0 +1,322 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#ifdef ARDUINO_ARCH_ESP32
+
+#include // replace that with the proper imports
+#include "i2s.h"
+#include "../../core/macros.h"
+#include "driver/periph_ctrl.h"
+#include "rom/lldesc.h"
+#include "soc/i2s_struct.h"
+#include "freertos/queue.h"
+#include "../../module/stepper.h"
+
+#define DMA_BUF_COUNT 8 // number of DMA buffers to store data
+#define DMA_BUF_LEN 4092 // maximum size in bytes
+#define I2S_SAMPLE_SIZE 4 // 4 bytes, 32 bits per sample
+#define DMA_SAMPLE_COUNT DMA_BUF_LEN / I2S_SAMPLE_SIZE // number of samples per buffer
+
+typedef enum {
+ I2S_NUM_0 = 0x0, /*!< I2S 0*/
+ I2S_NUM_1 = 0x1, /*!< I2S 1*/
+ I2S_NUM_MAX,
+} i2s_port_t;
+
+typedef struct {
+ uint32_t **buffers;
+ uint32_t *current;
+ uint32_t rw_pos;
+ lldesc_t **desc;
+ xQueueHandle queue;
+} i2s_dma_t;
+
+static portMUX_TYPE i2s_spinlock[I2S_NUM_MAX] = {portMUX_INITIALIZER_UNLOCKED, portMUX_INITIALIZER_UNLOCKED};
+static i2s_dev_t* I2S[I2S_NUM_MAX] = {&I2S0, &I2S1};
+static i2s_dma_t dma;
+
+// output value
+uint32_t i2s_port_data;
+
+#define I2S_ENTER_CRITICAL() portENTER_CRITICAL(&i2s_spinlock[i2s_num])
+#define I2S_EXIT_CRITICAL() portEXIT_CRITICAL(&i2s_spinlock[i2s_num])
+
+static inline void gpio_matrix_out_check(uint32_t gpio, uint32_t signal_idx, bool out_inv, bool oen_inv) {
+ //if pin = -1, do not need to configure
+ if (gpio != -1) {
+ PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
+ gpio_set_direction((gpio_num_t)gpio, (gpio_mode_t)GPIO_MODE_DEF_OUTPUT);
+ gpio_matrix_out(gpio, signal_idx, out_inv, oen_inv);
+ }
+}
+
+static esp_err_t i2s_reset_fifo(i2s_port_t i2s_num) {
+ I2S_ENTER_CRITICAL();
+ I2S[i2s_num]->conf.rx_fifo_reset = 1;
+ I2S[i2s_num]->conf.rx_fifo_reset = 0;
+ I2S[i2s_num]->conf.tx_fifo_reset = 1;
+ I2S[i2s_num]->conf.tx_fifo_reset = 0;
+ I2S_EXIT_CRITICAL();
+
+ return ESP_OK;
+}
+
+esp_err_t i2s_start(i2s_port_t i2s_num) {
+ //start DMA link
+ I2S_ENTER_CRITICAL();
+ i2s_reset_fifo(i2s_num);
+
+ //reset dma
+ I2S[i2s_num]->lc_conf.in_rst = 1;
+ I2S[i2s_num]->lc_conf.in_rst = 0;
+ I2S[i2s_num]->lc_conf.out_rst = 1;
+ I2S[i2s_num]->lc_conf.out_rst = 0;
+
+ I2S[i2s_num]->conf.tx_reset = 1;
+ I2S[i2s_num]->conf.tx_reset = 0;
+ I2S[i2s_num]->conf.rx_reset = 1;
+ I2S[i2s_num]->conf.rx_reset = 0;
+
+ I2S[i2s_num]->int_clr.val = 0xFFFFFFFF;
+ I2S[i2s_num]->out_link.start = 1;
+ I2S[i2s_num]->conf.tx_start = 1;
+ I2S_EXIT_CRITICAL();
+
+ return ESP_OK;
+}
+
+esp_err_t i2s_stop(i2s_port_t i2s_num) {
+ I2S_ENTER_CRITICAL();
+ I2S[i2s_num]->out_link.stop = 1;
+ I2S[i2s_num]->conf.tx_start = 0;
+
+ I2S[i2s_num]->int_clr.val = I2S[i2s_num]->int_st.val; //clear pending interrupt
+ I2S_EXIT_CRITICAL();
+
+ return ESP_OK;
+}
+
+static void IRAM_ATTR i2s_intr_handler_default(void *arg) {
+ int dummy;
+ lldesc_t *finish_desc;
+ portBASE_TYPE high_priority_task_awoken = pdFALSE;
+
+ if (I2S0.int_st.out_eof) {
+ // Get the descriptor of the last item in the linkedlist
+ finish_desc = (lldesc_t*) I2S0.out_eof_des_addr;
+
+ // If the queue is full it's because we have an underflow,
+ // more than buf_count isr without new data, remove the front buffer
+ if (xQueueIsQueueFullFromISR(dma.queue))
+ xQueueReceiveFromISR(dma.queue, &dummy, &high_priority_task_awoken);
+
+ xQueueSendFromISR(dma.queue, (void *)(&finish_desc->buf), &high_priority_task_awoken);
+ }
+
+ if (high_priority_task_awoken == pdTRUE) portYIELD_FROM_ISR();
+
+ // clear interrupt
+ I2S0.int_clr.val = I2S0.int_st.val; //clear pending interrupt
+}
+
+void stepperTask(void* parameter) {
+ uint32_t i, remaining = 0;
+
+ while (1) {
+ xQueueReceive(dma.queue, &dma.current, portMAX_DELAY);
+ dma.rw_pos = 0;
+
+ for (i = 0; i < DMA_SAMPLE_COUNT; i++) {
+ // Fill with the port data post pulse_phase until the next step
+ if (remaining) {
+ i2s_push_sample();
+ remaining--;
+ }
+ else {
+ Stepper::stepper_pulse_phase_isr();
+ remaining = Stepper::stepper_block_phase_isr();
+ }
+ }
+ }
+}
+
+int i2s_init() {
+ periph_module_enable(PERIPH_I2S0_MODULE);
+
+ /**
+ * Each i2s transfer will take
+ * fpll = PLL_D2_CLK -- clka_en = 0
+ *
+ * fi2s = fpll / N + b/a -- N = clkm_div_num
+ * fi2s = 160MHz / 2
+ * fi2s = 80MHz
+ *
+ * fbclk = fi2s / M -- M = tx_bck_div_num
+ * fbclk = 80MHz / 2
+ * fbclk = 40MHz
+ *
+ * fwclk = fbclk / 32
+ *
+ * for fwclk = 250kHz (4uS pulse time)
+ * N = 10
+ * M = 20
+ */
+
+ // Allocate the array of pointers to the buffers
+ dma.buffers = (uint32_t **)malloc(sizeof(uint32_t*) * DMA_BUF_COUNT);
+ if (dma.buffers == NULL) return -1;
+
+ // Allocate each buffer that can be used by the DMA controller
+ for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {
+ dma.buffers[buf_idx] = (uint32_t*) heap_caps_calloc(1, DMA_BUF_LEN, MALLOC_CAP_DMA);
+ if (dma.buffers[buf_idx] == NULL) return -1;
+ }
+
+ // Allocate the array of DMA descriptors
+ dma.desc = (lldesc_t**) malloc(sizeof(lldesc_t*) * DMA_BUF_COUNT);
+ if (dma.desc == NULL) return -1;
+
+ // Allocate each DMA descriptor that will be used by the DMA controller
+ for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {
+ dma.desc[buf_idx] = (lldesc_t*) heap_caps_malloc(sizeof(lldesc_t), MALLOC_CAP_DMA);
+ if (dma.desc[buf_idx] == NULL) return -1;
+ }
+
+ // Initialize
+ for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) {
+ dma.desc[buf_idx]->owner = 1;
+ dma.desc[buf_idx]->eof = 1; // set to 1 will trigger the interrupt
+ dma.desc[buf_idx]->sosf = 0;
+ dma.desc[buf_idx]->length = DMA_BUF_LEN;
+ dma.desc[buf_idx]->size = DMA_BUF_LEN;
+ dma.desc[buf_idx]->buf = (uint8_t *) dma.buffers[buf_idx];
+ dma.desc[buf_idx]->offset = 0;
+ dma.desc[buf_idx]->empty = (uint32_t)((buf_idx < (DMA_BUF_COUNT - 1)) ? (dma.desc[buf_idx + 1]) : dma.desc[0]);
+ }
+
+ dma.queue = xQueueCreate(DMA_BUF_COUNT, sizeof(uint32_t *));
+
+ // Set the first DMA descriptor
+ I2S0.out_link.addr = (uint32_t)dma.desc[0];
+
+ // stop i2s
+ i2s_stop(I2S_NUM_0);
+
+ // configure I2S data port interface.
+ i2s_reset_fifo(I2S_NUM_0);
+
+ //reset i2s
+ I2S0.conf.tx_reset = 1;
+ I2S0.conf.tx_reset = 0;
+ I2S0.conf.rx_reset = 1;
+ I2S0.conf.rx_reset = 0;
+
+ //reset dma
+ I2S0.lc_conf.in_rst = 1;
+ I2S0.lc_conf.in_rst = 0;
+ I2S0.lc_conf.out_rst = 1;
+ I2S0.lc_conf.out_rst = 0;
+
+ //Enable and configure DMA
+ I2S0.lc_conf.check_owner = 0;
+ I2S0.lc_conf.out_loop_test = 0;
+ I2S0.lc_conf.out_auto_wrback = 0;
+ I2S0.lc_conf.out_data_burst_en = 0;
+ I2S0.lc_conf.outdscr_burst_en = 0;
+ I2S0.lc_conf.out_no_restart_clr = 0;
+ I2S0.lc_conf.indscr_burst_en = 0;
+ I2S0.lc_conf.out_eof_mode = 1;
+
+ I2S0.conf2.lcd_en = 0;
+ I2S0.conf2.camera_en = 0;
+ I2S0.pdm_conf.pcm2pdm_conv_en = 0;
+ I2S0.pdm_conf.pdm2pcm_conv_en = 0;
+
+ I2S0.fifo_conf.dscr_en = 0;
+
+ I2S0.conf_chan.tx_chan_mod = 0;
+ I2S0.fifo_conf.tx_fifo_mod = 0;
+ I2S0.conf.tx_mono = 0;
+
+ I2S0.conf_chan.rx_chan_mod = 0;
+ I2S0.fifo_conf.rx_fifo_mod = 0;
+ I2S0.conf.rx_mono = 0;
+
+ I2S0.fifo_conf.dscr_en = 1; //connect dma to fifo
+
+ I2S0.conf.tx_start = 0;
+ I2S0.conf.rx_start = 0;
+
+ I2S0.conf.tx_msb_right = 1;
+ I2S0.conf.tx_right_first = 1;
+
+ I2S0.conf.tx_slave_mod = 0; // Master
+ I2S0.fifo_conf.tx_fifo_mod_force_en = 1;
+
+ I2S0.pdm_conf.rx_pdm_en = 0;
+ I2S0.pdm_conf.tx_pdm_en = 0;
+
+ I2S0.conf.tx_short_sync = 0;
+ I2S0.conf.rx_short_sync = 0;
+ I2S0.conf.tx_msb_shift = 0;
+ I2S0.conf.rx_msb_shift = 0;
+
+ // set clock
+ I2S0.clkm_conf.clka_en = 0; // Use PLL/2 as reference
+ I2S0.clkm_conf.clkm_div_num = 10; // minimum value of 2, reset value of 4, max 256
+ I2S0.clkm_conf.clkm_div_a = 0; // 0 at reset, what about divide by 0? (not an issue)
+ I2S0.clkm_conf.clkm_div_b = 0; // 0 at reset
+
+ // fbck = fi2s / tx_bck_div_num
+ I2S0.sample_rate_conf.tx_bck_div_num = 2; // minimum value of 2 defaults to 6
+
+ // Enable TX interrupts
+ I2S0.int_ena.out_eof = 1;
+ I2S0.int_ena.out_dscr_err = 0;
+ I2S0.int_ena.out_total_eof = 0;
+ I2S0.int_ena.out_done = 0;
+
+ // Allocate and Enable the I2S interrupt
+ intr_handle_t i2s_isr_handle;
+ esp_intr_alloc(ETS_I2S0_INTR_SOURCE, 0, i2s_intr_handler_default, NULL, &i2s_isr_handle);
+ esp_intr_enable(i2s_isr_handle);
+
+ // Create the task that will feed the buffer
+ xTaskCreate(stepperTask, "StepperTask", 10000, NULL, 1, NULL);
+
+ // Route the i2s pins to the appropriate GPIO
+ gpio_matrix_out_check(22, I2S0O_DATA_OUT23_IDX, 0, 0);
+ gpio_matrix_out_check(25, I2S0O_WS_OUT_IDX, 0, 0);
+ gpio_matrix_out_check(26, I2S0O_BCK_OUT_IDX, 0, 0);
+
+ // Start the I2S peripheral
+ return i2s_start(I2S_NUM_0);
+}
+
+void i2s_write(uint8_t pin, uint8_t val) {
+ SET_BIT_TO(i2s_port_data, pin, val);
+}
+
+void i2s_push_sample() {
+ dma.current[dma.rw_pos++] = i2s_port_data;
+}
+
+#endif // ARDUINO_ARCH_ESP32
diff --git a/Marlin/src/HAL/HAL_ESP32/i2s.h b/Marlin/src/HAL/HAL_ESP32/i2s.h
new file mode 100644
index 0000000000..32999f712f
--- /dev/null
+++ b/Marlin/src/HAL/HAL_ESP32/i2s.h
@@ -0,0 +1,31 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+// current value of the outputs provided over i2s
+extern uint32_t i2s_port_data;
+
+int i2s_init();
+
+void i2s_write(uint8_t pin, uint8_t val);
+
+void i2s_push_sample();
diff --git a/Marlin/src/HAL/HAL_ESP32/ota.cpp b/Marlin/src/HAL/HAL_ESP32/ota.cpp
index b7fd1bb5c4..52129ac92b 100644
--- a/Marlin/src/HAL/HAL_ESP32/ota.cpp
+++ b/Marlin/src/HAL/HAL_ESP32/ota.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
*
* This program is free software: you can redistribute it and/or modify
diff --git a/Marlin/src/HAL/HAL_ESP32/ota.h b/Marlin/src/HAL/HAL_ESP32/ota.h
index 0fa33b532e..80e04e123d 100644
--- a/Marlin/src/HAL/HAL_ESP32/ota.h
+++ b/Marlin/src/HAL/HAL_ESP32/ota.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
*
* This program is free software: you can redistribute it and/or modify
diff --git a/Marlin/src/HAL/HAL_ESP32/servotimers.h b/Marlin/src/HAL/HAL_ESP32/servotimers.h
index 98b0b3c54e..0604ca0a25 100644
--- a/Marlin/src/HAL/HAL_ESP32/servotimers.h
+++ b/Marlin/src/HAL/HAL_ESP32/servotimers.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_ESP32/spi_pins.h b/Marlin/src/HAL/HAL_ESP32/spi_pins.h
index 48e20a0442..896d9fa853 100644
--- a/Marlin/src/HAL/HAL_ESP32/spi_pins.h
+++ b/Marlin/src/HAL/HAL_ESP32/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.cpp b/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.cpp
index 07e00e95b4..b1c98cb55c 100644
--- a/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.cpp
+++ b/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h b/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h
index df80ebc84c..6ee92a73ec 100644
--- a/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h
+++ b/Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/DebugMonitor_LPC1768.cpp b/Marlin/src/HAL/HAL_LPC1768/DebugMonitor_LPC1768.cpp
index c992925bf0..ce881b7e6b 100644
--- a/Marlin/src/HAL/HAL_LPC1768/DebugMonitor_LPC1768.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/DebugMonitor_LPC1768.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL.cpp
index 020a1660b3..deb77747bb 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL.cpp
@@ -1,22 +1,24 @@
-/* **************************************************************************
-
- Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-****************************************************************************/
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
#ifdef TARGET_LPC1768
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.h b/Marlin/src/HAL/HAL_LPC1768/HAL.h
index 689105f109..277e503d67 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL.h
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
index 2765bb553a..d2aa329a81 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL_spi.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -62,9 +62,7 @@
#include "SoftwareSPI.h"
- // --------------------------------------------------------------------------
// Software SPI
- // --------------------------------------------------------------------------
static uint8_t SPI_speed = 0;
@@ -80,46 +78,31 @@
SPI_speed = swSpiInit(spiRate, SCK_PIN, MOSI_PIN);
}
- uint8_t spiRec() {
- uint8_t b = spiTransfer(0xFF);
- return b;
- }
+ uint8_t spiRec() { return spiTransfer(0xFF); }
void spiRead(uint8_t*buf, uint16_t nbyte) {
- if (nbyte == 0) return;
- for (int i = 0; i < nbyte; i++) {
- buf[i] = spiTransfer(0xFF);
- }
+ if (nbyte)
+ for (int i = 0; i < nbyte; i++)
+ buf[i] = spiTransfer(0xFF);
}
- void spiSend(uint8_t b) {
- uint8_t response = spiTransfer(b);
- UNUSED(response);
- }
+ void spiSend(uint8_t b) { (void)spiTransfer(b); }
void spiSend(const uint8_t* buf, size_t n) {
- uint8_t response;
- if (n == 0) return;
- for (uint16_t i = 0; i < n; i++) {
- response = spiTransfer(buf[i]);
- }
- UNUSED(response);
+ if (n)
+ for (uint16_t i = 0; i < n; i++)
+ (void)spiTransfer(buf[i]);
}
void spiSendBlock(uint8_t token, const uint8_t* buf) {
- uint8_t response;
- response = spiTransfer(token);
-
- for (uint16_t i = 0; i < 512; i++) {
- response = spiTransfer(buf[i]);
- }
- UNUSED(response);
- WRITE(SS_PIN, HIGH);
+ (void)spiTransfer(token);
+ for (uint16_t i = 0; i < 512; i++)
+ (void)spiTransfer(buf[i]);
}
#else
- // hardware SPI
+ // Hardware SPI
#include
#include
@@ -186,7 +169,6 @@
SSP_Init(LPC_SSPn, &HW_SPI_init); // puts the values into the proper bits in the SSP0 registers
}
-
static uint8_t doio(uint8_t b) {
/* send and receive a single byte */
SSP_SendData(LPC_SSPn, b & 0x00FF);
@@ -194,16 +176,11 @@
return SSP_ReceiveData(LPC_SSPn) & 0x00FF;
}
- void spiSend(uint8_t b) {
- doio(b);
- }
-
+ void spiSend(uint8_t b) { doio(b); }
void spiSend(const uint8_t* buf, size_t n) {
- if (n == 0) return;
- for (uint16_t i = 0; i < n; i++) {
- doio(buf[i]);
- }
+ if (n)
+ for (uint16_t i = 0; i < n; i++) doio(buf[i]);
}
void spiSend(uint32_t chan, byte b) {
@@ -213,20 +190,14 @@
}
// Read single byte from SPI
- uint8_t spiRec() {
- return doio(0xff);
- }
+ uint8_t spiRec() { return doio(0xFF); }
- uint8_t spiRec(uint32_t chan) {
- return 0;
- }
+ uint8_t spiRec(uint32_t chan) { return 0; }
// Read from SPI into buffer
void spiRead(uint8_t*buf, uint16_t nbyte) {
- if (nbyte == 0) return;
- for (int i = 0; i < nbyte; i++) {
- buf[i] = doio(0xff);
- }
+ if (nbyte)
+ for (int i = 0; i < nbyte; i++) buf[i] = doio(0xff);
}
static uint8_t spiTransfer(uint8_t b) {
@@ -235,13 +206,9 @@
// Write from buffer to SPI
void spiSendBlock(uint8_t token, const uint8_t* buf) {
- uint8_t response;
- response = spiTransfer(token);
-
- for (uint16_t i = 0; i < 512; i++) {
- response = spiTransfer(buf[i]);
- }
- UNUSED(response);
+ (void)spiTransfer(token);
+ for (uint16_t i = 0; i < 512; i++)
+ (void)spiTransfer(buf[i]);
}
/** Begin SPI transaction, set clock, bit order, data mode */
@@ -256,27 +223,24 @@ void SPIClass::begin() { spiBegin(); }
void SPIClass::beginTransaction(SPISettings cfg) {
uint8_t spiRate;
- switch(cfg.spiRate()) {
- case 8000000: spiRate=0 ;break;
- case 4000000: spiRate=1 ;break;
- case 2000000: spiRate=2 ;break;
- case 1000000: spiRate=3 ;break;
- case 500000: spiRate=4 ;break;
- case 250000: spiRate=5 ;break;
- case 125000: spiRate=6 ;break;
- default: spiRate=2; break;
+ switch (cfg.spiRate()) {
+ case 8000000: spiRate = 0; break;
+ case 4000000: spiRate = 1; break;
+ case 2000000: spiRate = 2; break;
+ case 1000000: spiRate = 3; break;
+ case 500000: spiRate = 4; break;
+ case 250000: spiRate = 5; break;
+ case 125000: spiRate = 6; break;
+ default: spiRate = 2; break;
}
spiInit(spiRate);
}
-uint8_t SPIClass::transfer(uint8_t B) {
- return spiTransfer(B);
-}
-uint16_t SPIClass::transfer16(uint16_t data) {
- uint16_t buffer;
- buffer = transfer((data>>8) & 0xFF) << 8;
- buffer |= transfer(data & 0xFF) && 0xFF;
- return buffer;
+uint8_t SPIClass::transfer(const uint8_t B) { return spiTransfer(B); }
+
+uint16_t SPIClass::transfer16(const uint16_t data) {
+ return (transfer((data >> 8) & 0xFF) << 8)
+ | (transfer(data & 0xFF) & 0xFF);
}
SPIClass SPI;
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp
index 3714fe1a39..26427bbacc 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
index 360a0f5c21..8f2ee4bc16 100644
--- a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
+++ b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
*
* This program is free software: you can redistribute it and/or modify
diff --git a/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.cpp b/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.cpp
index 248e9007f1..589c65e03e 100644
--- a/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h b/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h
index 7f95be3569..ca59a5b721 100644
--- a/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h
+++ b/Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -54,9 +54,7 @@ public:
emergency_parser.update(emergency_state, c);
return true; // do not discard character
}
- #endif
- #if ENABLED(EMERGENCY_PARSER)
EmergencyParser::State emergency_state;
#endif
};
diff --git a/Marlin/src/HAL/HAL_LPC1768/MarlinServo.h b/Marlin/src/HAL/HAL_LPC1768/MarlinServo.h
index c535ea6ff5..925e5a7e45 100644
--- a/Marlin/src/HAL/HAL_LPC1768/MarlinServo.h
+++ b/Marlin/src/HAL/HAL_LPC1768/MarlinServo.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
index f18efe60ec..4ee5cca4a2 100644
--- a/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h b/Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h
index 3d0b472d1e..d853962e0c 100644
--- a/Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/fastio.h b/Marlin/src/HAL/HAL_LPC1768/fastio.h
index 75ea85acc2..e291a703fa 100644
--- a/Marlin/src/HAL/HAL_LPC1768/fastio.h
+++ b/Marlin/src/HAL/HAL_LPC1768/fastio.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/SPI.h b/Marlin/src/HAL/HAL_LPC1768/include/SPI.h
index 2515634236..edffb1556e 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/SPI.h
+++ b/Marlin/src/HAL/HAL_LPC1768/include/SPI.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c b/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c
index 6c46c89b0c..ae088ed250 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c
+++ b/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.c
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.h b/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.h
index ac547b08b1..9fba04c03c 100644
--- a/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.h
+++ b/Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h b/Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h
index fb659b396c..44f578a816 100644
--- a/Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h
+++ b/Marlin/src/HAL/HAL_LPC1768/persistent_store_api.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/persistent_store_flash.cpp b/Marlin/src/HAL/HAL_LPC1768/persistent_store_flash.cpp
index e08da20904..eab5c1fa7e 100644
--- a/Marlin/src/HAL/HAL_LPC1768/persistent_store_flash.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/persistent_store_flash.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/persistent_store_sdcard.cpp b/Marlin/src/HAL/HAL_LPC1768/persistent_store_sdcard.cpp
index 7c8be7e185..1c9aea8d56 100644
--- a/Marlin/src/HAL/HAL_LPC1768/persistent_store_sdcard.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/persistent_store_sdcard.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h b/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h
index 1ee7f44d69..6230faa054 100644
--- a/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h
+++ b/Marlin/src/HAL/HAL_LPC1768/pinsDebug.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/spi_pins.h b/Marlin/src/HAL/HAL_LPC1768/spi_pins.h
index 0ea045a150..c0a072851e 100644
--- a/Marlin/src/HAL/HAL_LPC1768/spi_pins.h
+++ b/Marlin/src/HAL/HAL_LPC1768/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.c b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.c
index 12e8b45990..1e3cb04987 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.c
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.c
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h
index 5f7337316a..296858fa28 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_I2C_routines.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h
index fc7d3a1e49..2deb094657 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_defines.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h
index 28c950ae49..d329c18537 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_delay.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c
index 57073d9a04..48c37ed3ed 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.c
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.h b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.h
index 5a900ac45c..3c89d4e987 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.h
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/HAL_LCD_pin_routines.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp
index 554f945892..65de10dea7 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp
index cf6284bdf2..65bd4b4073 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction
index 80eeb50a8c..8b2cab7b0a 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
index c4b7966b68..4668954ad5 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
index 652ad54393..01da8dfdeb 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp
index a00c45b305..e865c3de7f 100644
--- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/watchdog.cpp b/Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
index 913735636f..104b449736 100644
--- a/Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
+++ b/Marlin/src/HAL/HAL_LPC1768/watchdog.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_LPC1768/watchdog.h b/Marlin/src/HAL/HAL_LPC1768/watchdog.h
index f185a99cdd..26a9f499fd 100644
--- a/Marlin/src/HAL/HAL_LPC1768/watchdog.h
+++ b/Marlin/src/HAL/HAL_LPC1768/watchdog.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/HAL.cpp b/Marlin/src/HAL/HAL_STM32/HAL.cpp
index 8a5e76eb3d..ab61e57bfd 100644
--- a/Marlin/src/HAL/HAL_STM32/HAL.cpp
+++ b/Marlin/src/HAL/HAL_STM32/HAL.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2017 Victor Perez
diff --git a/Marlin/src/HAL/HAL_STM32/HAL.h b/Marlin/src/HAL/HAL_STM32/HAL.h
index d71bc756e3..02a758c6a2 100644
--- a/Marlin/src/HAL/HAL_STM32/HAL.h
+++ b/Marlin/src/HAL/HAL_STM32/HAL.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2017 Victor Perez
diff --git a/Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.cpp b/Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.cpp
index bc6f154e83..1f22767e27 100644
--- a/Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.cpp
+++ b/Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.h b/Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.h
index 0aa93ba9f5..6805c48a54 100644
--- a/Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.h
+++ b/Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp b/Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp
index ff384da81a..86cdb57811 100644
--- a/Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp
+++ b/Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.cpp b/Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.cpp
index cebec33dc7..28d8d095c7 100644
--- a/Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.cpp
+++ b/Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.h b/Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.h
index 4794e66657..72b80ccce9 100644
--- a/Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.h
+++ b/Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2017 Victor Perez
*
diff --git a/Marlin/src/HAL/HAL_STM32/SanityCheck.h b/Marlin/src/HAL/HAL_STM32/SanityCheck.h
index f434a51cbb..49671e3454 100644
--- a/Marlin/src/HAL/HAL_STM32/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_STM32/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32/endstop_interrupts.h
index e4a243b43e..23eca4bab7 100644
--- a/Marlin/src/HAL/HAL_STM32/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_STM32/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/fastio_STM32.cpp b/Marlin/src/HAL/HAL_STM32/fastio_STM32.cpp
index ae429c8921..3ee075cf26 100644
--- a/Marlin/src/HAL/HAL_STM32/fastio_STM32.cpp
+++ b/Marlin/src/HAL/HAL_STM32/fastio_STM32.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/fastio_STM32.h b/Marlin/src/HAL/HAL_STM32/fastio_STM32.h
index 3de6d51e24..8b43744684 100644
--- a/Marlin/src/HAL/HAL_STM32/fastio_STM32.h
+++ b/Marlin/src/HAL/HAL_STM32/fastio_STM32.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp
index a4c9850c75..34df9bf591 100644
--- a/Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp
+++ b/Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/HAL_STM32/spi_pins.h b/Marlin/src/HAL/HAL_STM32/spi_pins.h
index 1136a78c22..ba325b48e4 100644
--- a/Marlin/src/HAL/HAL_STM32/spi_pins.h
+++ b/Marlin/src/HAL/HAL_STM32/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/Marlin/src/HAL/HAL_STM32/watchdog_STM32.cpp b/Marlin/src/HAL/HAL_STM32/watchdog_STM32.cpp
index 304e0c47fb..e47de64953 100644
--- a/Marlin/src/HAL/HAL_STM32/watchdog_STM32.cpp
+++ b/Marlin/src/HAL/HAL_STM32/watchdog_STM32.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32/watchdog_STM32.h b/Marlin/src/HAL/HAL_STM32/watchdog_STM32.h
index e860d16793..bd3598c0bb 100644
--- a/Marlin/src/HAL/HAL_STM32/watchdog_STM32.h
+++ b/Marlin/src/HAL/HAL_STM32/watchdog_STM32.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp
index fcf9fba6b5..ce9eb92b14 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2017 Victor Perez
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.h b/Marlin/src/HAL/HAL_STM32F1/HAL.h
index cecdd0336e..de1e0cdaac 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL.h
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2017 Victor Perez
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.cpp
index fcff92a1ab..f8fc315ba0 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h
index 668378388c..ac83f086ee 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.cpp
index 4104db8c13..30674eab88 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h b/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h
index 034bd6d88a..86c1355456 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2017 Victor Perez
*
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
index eb432d3417..cbc6c7fe1a 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_spi_Stm32f1.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -86,7 +86,7 @@ void spiBegin() {
}
/**
- * @brief Initializes SPI port to required speed rate and transfer mode (MSB, SPI MODE 0)
+ * @brief Initialize SPI port to required speed rate and transfer mode (MSB, SPI MODE 0)
*
* @param spiRate Rate as declared in HAL.h (speed do not match AVR)
* @return Nothing
@@ -109,7 +109,7 @@ void spiInit(uint8_t spiRate) {
}
/**
- * @brief Receives a single byte from the SPI port.
+ * @brief Receive a single byte from the SPI port.
*
* @return Byte received
*
@@ -123,7 +123,7 @@ uint8_t spiRec(void) {
}
/**
- * @brief Receives a number of bytes from the SPI port to a buffer
+ * @brief Receive a number of bytes from the SPI port to a buffer
*
* @param buf Pointer to starting address of buffer to write to.
* @param nbyte Number of bytes to receive.
@@ -138,7 +138,7 @@ void spiRead(uint8_t* buf, uint16_t nbyte) {
}
/**
- * @brief Sends a single byte on SPI port
+ * @brief Send a single byte on SPI port
*
* @param b Byte to send
*
@@ -165,7 +165,16 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) {
SPI.endTransaction();
}
-/** Begin SPI transaction, set clock, bit order, data mode */
+/**
+ * @brief Begin SPI transaction, set clock, bit order, data mode
+ *
+ * @param spiClock Clock setting
+ * @param bitOrder Bit Order setting
+ * @param dataMode Data Mode setting
+ * @return Nothing
+ *
+ * @details Uses an SPI Config via SPISettings
+ */
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
spiConfig = SPISettings(spiClock, (BitOrder)bitOrder, dataMode);
SPI.beginTransaction(spiConfig);
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
index 72fdb25b03..8b235c004a 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h
index 9610bb5533..28e0693718 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2017 Victor Perez
*
diff --git a/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h b/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h
index dcd72440d6..d0515f7c54 100644
--- a/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_STM32F1/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h
index 50d0127968..85437c511d 100644
--- a/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h
index 237ffb0b35..e206c6bbd3 100644
--- a/Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp
index ad29a1be47..133402bb8c 100644
--- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp
index 18435487ab..05384c3858 100644
--- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/HAL_STM32F1/spi_pins.h b/Marlin/src/HAL/HAL_STM32F1/spi_pins.h
index b2fc2c345d..97005a309e 100644
--- a/Marlin/src/HAL/HAL_STM32F1/spi_pins.h
+++ b/Marlin/src/HAL/HAL_STM32F1/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp b/Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp
index de55f6c2ec..d9c01cb5c7 100644
--- a/Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -26,10 +26,11 @@
* Communication interface for FSMC
*/
+#if defined(STM32F1) || defined(STM32F1xx)
+
#include "../../inc/MarlinConfig.h"
#if HAS_GRAPHICAL_LCD
-#if defined(STM32F1) || defined(STM32F1xx)
#include "U8glib.h"
#include "libmaple/fsmc.h"
@@ -227,29 +228,30 @@ void LCD_IO_Init(uint8_t cs, uint8_t rs) {
}
void LCD_IO_WriteData(uint16_t RegValue) {
- LCD->RAM = RegValue;
- __DSB();
+ LCD->RAM = RegValue;
+ __DSB();
}
void LCD_IO_WriteReg(uint8_t Reg) {
- LCD->REG = (uint16_t)Reg;
- __DSB();
+ LCD->REG = (uint16_t)Reg;
+ __DSB();
}
uint32_t LCD_IO_ReadData(uint16_t RegValue, uint8_t ReadSize) {
- volatile uint32_t data;
- LCD->REG = (uint16_t)RegValue;
- __DSB();
+ volatile uint32_t data;
+ LCD->REG = (uint16_t)RegValue;
+ __DSB();
- data = LCD->RAM; // dummy read
- data = LCD->RAM & 0x00FF;
+ data = LCD->RAM; // dummy read
+ data = LCD->RAM & 0x00FF;
- while (--ReadSize) {
- data <<= 8;
- data |= (LCD->RAM & 0x00FF);
- }
- return (uint32_t)data;
+ while (--ReadSize) {
+ data <<= 8;
+ data |= (LCD->RAM & 0x00FF);
+ }
+ return (uint32_t)data;
}
-#endif // STM32F1 || STM32F1xx
#endif // HAS_GRAPHICAL_LCD
+
+#endif // STM32F1 || STM32F1xx
diff --git a/Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.cpp b/Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.cpp
index 7a6ff7d020..0cbfb7fa5e 100644
--- a/Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.h b/Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.h
index 3d37cefc96..db62d4448b 100644
--- a/Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.h
+++ b/Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp b/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
index dfb005dc2b..5329ddfbdc 100644
--- a/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL.cpp
index 8b107f391b..2bb443d0cd 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2017 Victor Perez
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL.h b/Marlin/src/HAL/HAL_STM32F4/HAL.h
index 2b2dd09ba2..8e513a14a1 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL.h
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2017 Victor Perez
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp
index 8c7adeecb5..bfe03f5d90 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h
index 5daf90ab8d..0b92a44efc 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
index a7e840fb03..6c3926db65 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
index acf58858a9..4783736b20 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
index d2c1156542..cbf93fba50 100644
--- a/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
+++ b/Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2017 Victor Perez
*
diff --git a/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h b/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h
index 605eb9cb15..7e88dbbd82 100644
--- a/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_STM32F4/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h
index e4a243b43e..23eca4bab7 100644
--- a/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h
index 61de5306cc..5e80ec7fec 100644
--- a/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h
+++ b/Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F4/persistent_store_eeprom.cpp b/Marlin/src/HAL/HAL_STM32F4/persistent_store_eeprom.cpp
index 48b6492c11..b67c76c4c1 100644
--- a/Marlin/src/HAL/HAL_STM32F4/persistent_store_eeprom.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/persistent_store_eeprom.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/HAL_STM32F4/spi_pins.h b/Marlin/src/HAL/HAL_STM32F4/spi_pins.h
index 577b36aeb8..e18e12278d 100644
--- a/Marlin/src/HAL/HAL_STM32F4/spi_pins.h
+++ b/Marlin/src/HAL/HAL_STM32F4/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp
index 41c75e411d..fd2f309515 100644
--- a/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp
+++ b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h
index cff0cf469b..4076c2b03a 100644
--- a/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h
+++ b/Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp b/Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp
index 1da5fb486b..7f9118ee9c 100644
--- a/Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/EmulatedEeprom.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL.cpp
index 87d3a5f30a..01f577cdad 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2017 Victor Perez
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL.h b/Marlin/src/HAL/HAL_STM32F7/HAL.h
index 060e2584a2..5ece2b5b6b 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL.h
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2017 Victor Perez
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.cpp
index 43d95e9059..40fafc432c 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.h
index f3a776365f..1b7ee40817 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp
index 094ceda2da..78b312470a 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_spi_STM32F7.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp
index 7949af0c55..90131903e3 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h
index b5f8cb24bc..b856edb3e8 100644
--- a/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2017 Victor Perez
*
diff --git a/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h b/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h
index 880f5dfed6..870fa36fd5 100644
--- a/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_STM32F7/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp b/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp
index e4fa63c8ac..b54e7d0bda 100644
--- a/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp
@@ -176,7 +176,7 @@ TMC26XStepper::TMC26XStepper(const int16_t in_steps, int16_t cs_pin, int16_t dir
void TMC26XStepper::start() {
#ifdef TMC_DEBUG1
- SERIAL_ECHOPGM("\n TMC26X stepper library \n");
+ SERIAL_ECHOLNPGM("\n TMC26X stepper library");
SERIAL_ECHOPAIR("\n CS pin: ", cs_pin);
SERIAL_ECHOPAIR("\n DIR pin: ", dir_pin);
SERIAL_ECHOPAIR("\n STEP pin: ", step_pin);
@@ -830,8 +830,8 @@ void TMC26XStepper::debugLastStatus() {
uint32_t readout_config = driver_configuration_register_value & READ_SELECTION_PATTERN;
const int16_t value = getReadoutValue();
if (readout_config == READ_MICROSTEP_POSTION) {
- //SERIAL_PRINTF("Microstep postion phase A: ");
- SERIAL_ECHOPAIR("\n Microstep postion phase A: ", value);
+ //SERIAL_PRINTF("Microstep position phase A: ");
+ SERIAL_ECHOPAIR("\n Microstep position phase A: ", value);
}
else if (readout_config == READ_STALL_GUARD_READING) {
//SERIAL_PRINTF("Stall Guard value:");
diff --git a/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h b/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h
index e4a243b43e..23eca4bab7 100644
--- a/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h
index 08f244c791..8aaba0c298 100644
--- a/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F7/persistent_store_eeprom.cpp b/Marlin/src/HAL/HAL_STM32F7/persistent_store_eeprom.cpp
index 21b6a561b8..4990213cfc 100644
--- a/Marlin/src/HAL/HAL_STM32F7/persistent_store_eeprom.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/persistent_store_eeprom.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/HAL_STM32F7/spi_pins.h b/Marlin/src/HAL/HAL_STM32F7/spi_pins.h
index 9301f4dd8c..527325d6f4 100644
--- a/Marlin/src/HAL/HAL_STM32F7/spi_pins.h
+++ b/Marlin/src/HAL/HAL_STM32F7/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.cpp b/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.cpp
index 0b0031a236..659e4448f3 100644
--- a/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.cpp
+++ b/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h b/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h
index cff0cf469b..4076c2b03a 100644
--- a/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h
+++ b/Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/HAL.cpp b/Marlin/src/HAL/HAL_TEENSY31_32/HAL.cpp
index db757b17ef..fa80cd5ba9 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/HAL.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/HAL.cpp
@@ -1,22 +1,24 @@
-/* **************************************************************************
-
- Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-****************************************************************************/
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
/**
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/HAL.h b/Marlin/src/HAL/HAL_TEENSY31_32/HAL.h
index ce40eb24e0..81b011b186 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/HAL.h
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/HAL.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/HAL_Servo_Teensy.h b/Marlin/src/HAL/HAL_TEENSY31_32/HAL_Servo_Teensy.h
index c18d96ae12..687aaa39ec 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/HAL_Servo_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/HAL_Servo_Teensy.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/HAL_spi_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY31_32/HAL_spi_Teensy.cpp
index ab7176aee6..331703dc55 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/HAL_spi_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/HAL_spi_Teensy.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.cpp
index aff44d4486..298da6a42d 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.cpp
@@ -1,22 +1,24 @@
-/* **************************************************************************
-
- Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-****************************************************************************/
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
/**
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.h b/Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.h
index 7a50b04c2d..b733d1625f 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/HAL_timers_Teensy.h
@@ -1,7 +1,7 @@
/* **************************************************************************
Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/SanityCheck.h b/Marlin/src/HAL/HAL_TEENSY31_32/SanityCheck.h
index 777f3834a6..e1e2a8e0a6 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/endstop_interrupts.h b/Marlin/src/HAL/HAL_TEENSY31_32/endstop_interrupts.h
index 353fd853f3..ad0235179b 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/fastio_Teensy.h b/Marlin/src/HAL/HAL_TEENSY31_32/fastio_Teensy.h
index 6dc5c14a98..5116979c9a 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/fastio_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/fastio_Teensy.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/spi_pins.h b/Marlin/src/HAL/HAL_TEENSY31_32/spi_pins.h
index 6a468682e8..cfc9a2d14e 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/spi_pins.h
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.cpp
index 47774b3ac2..07505140e8 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.h b/Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.h
index 2b8ec00a1d..d0b7d030e9 100644
--- a/Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY31_32/watchdog_Teensy.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp
index dba27279ae..c4d6b3cf54 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.cpp
@@ -1,22 +1,24 @@
-/* **************************************************************************
-
- Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-****************************************************************************/
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
/**
* Description: HAL for Teensy35 (MK64FX512)
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
index 4cbf8bfec9..03918c28f2 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.h
index e53b5c6796..d02cdc9f74 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.cpp
index d31d9ddf67..b26e1a3d1c 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.cpp
@@ -1,22 +1,24 @@
-/* **************************************************************************
-
- Marlin 3D Printer Firmware
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-****************************************************************************/
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
/**
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h
index 29b157c156..bac4332ac1 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
*
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck.h b/Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck.h
index c8a9ee9bdf..630b5abcf8 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/SanityCheck.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h b/Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h
index 79a19fdbea..7327dc1a92 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h
index 43a4c5a786..ccbeddd726 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp
index 3a1e3477a6..ad5ed361ae 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/pinsDebug.h b/Marlin/src/HAL/HAL_TEENSY35_36/pinsDebug.h
index 6ba5eebab5..a739121e72 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/pinsDebug.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/pinsDebug.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -53,16 +53,16 @@
#define IS_ANALOG(P) ((P) >= analogInputToDigitalPin(0) && (P) <= analogInputToDigitalPin(9)) || ((P) >= analogInputToDigitalPin(12) && (P) <= analogInputToDigitalPin(20))
void HAL_print_analog_pin(char buffer[], int8_t pin) {
- if (pin <= 23) sprintf(buffer, "(A%2d) ", int(pin - 14));
- else if (pin <= 39) sprintf(buffer, "(A%2d) ", int(pin - 19));
+ if (pin <= 23) sprintf_P(buffer, PSTR("(A%2d) "), int(pin - 14));
+ else if (pin <= 39) sprintf_P(buffer, PSTR("(A%2d) "), int(pin - 19));
}
void HAL_analog_pin_state(char buffer[], int8_t pin) {
- if (pin <= 23) sprintf(buffer, "Analog in =% 5d", analogRead(pin - 14));
- else if (pin <= 39) sprintf(buffer, "Analog in =% 5d", analogRead(pin - 19));
+ if (pin <= 23) sprintf_P(buffer, PSTR("Analog in =% 5d"), analogRead(pin - 14));
+ else if (pin <= 39) sprintf_P(buffer, PSTR("Analog in =% 5d"), analogRead(pin - 19));
}
-#define PWM_PRINT(V) do{ sprintf(buffer, "PWM: %4d", 22); SERIAL_ECHO(buffer); }while(0)
+#define PWM_PRINT(V) do{ sprintf_P(buffer, PSTR("PWM: %4d"), 22); SERIAL_ECHO(buffer); }while(0)
#define FTM_CASE(N,Z) \
case FTM##N##_CH##Z##_PIN: \
if (FTM##N##_C##Z##V) { \
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/spi_pins.h b/Marlin/src/HAL/HAL_TEENSY35_36/spi_pins.h
index fb4cbc140b..152d6b4c21 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/spi_pins.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/spi_pins.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.cpp
index 0c15824742..46605473a1 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.cpp
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h
index 69c422e160..ba0916976c 100644
--- a/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h
+++ b/Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/platforms.h b/Marlin/src/HAL/platforms.h
index c1e0e9f8e6..bcf26020b9 100644
--- a/Marlin/src/HAL/platforms.h
+++ b/Marlin/src/HAL/platforms.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/Delay.h b/Marlin/src/HAL/shared/Delay.h
index 9e25cbd511..43833cff0f 100644
--- a/Marlin/src/HAL/shared/Delay.h
+++ b/Marlin/src/HAL/shared/Delay.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/HAL_SPI.h b/Marlin/src/HAL/shared/HAL_SPI.h
index cc2304fc57..43dd210076 100644
--- a/Marlin/src/HAL/shared/HAL_SPI.h
+++ b/Marlin/src/HAL/shared/HAL_SPI.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/HAL_spi_L6470.cpp b/Marlin/src/HAL/shared/HAL_spi_L6470.cpp
new file mode 100644
index 0000000000..f3a4544a77
--- /dev/null
+++ b/Marlin/src/HAL/shared/HAL_spi_L6470.cpp
@@ -0,0 +1,144 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+/**
+ * Software L6470 SPI functions originally from Arduino Sd2Card Library
+ * Copyright (C) 2009 by William Greiman
+ */
+
+// --------------------------------------------------------------------------
+// Includes
+// --------------------------------------------------------------------------
+
+#include "../../inc/MarlinConfig.h"
+
+#if HAS_DRIVER(L6470)
+
+#include "Delay.h"
+
+// --------------------------------------------------------------------------
+// Public Variables
+// --------------------------------------------------------------------------
+
+// --------------------------------------------------------------------------
+// Public functions
+// --------------------------------------------------------------------------
+
+#include "../../core/serial.h"
+#include "../../libs/L6470/L6470_Marlin.h"
+
+// --------------------------------------------------------------------------
+// Software L6470 SPI
+// --------------------------------------------------------------------------
+
+// Make sure GCC optimizes this file.
+// Note that this line triggers a bug in GCC which is fixed by casting.
+// See the note below.
+#pragma GCC optimize (3)
+
+// run at ~4Mhz
+uint8_t L6470_SpiTransfer_Mode_0(uint8_t b) { // using Mode 0
+ for (uint8_t bits = 8; bits--;) {
+ WRITE(L6470_CHAIN_MOSI_PIN, b & 0x80);
+ b <<= 1; // little setup time
+
+ WRITE(L6470_CHAIN_SCK_PIN, HIGH);
+ DELAY_NS(125); // 10 cycles @ 84mhz
+
+ b |= (READ(L6470_CHAIN_MISO_PIN) != 0);
+
+ WRITE(L6470_CHAIN_SCK_PIN, LOW);
+ DELAY_NS(125); // 10 cycles @ 84mhz
+ }
+ return b;
+}
+
+uint8_t L6470_SpiTransfer_Mode_3(uint8_t b) { // using Mode 3
+ for (uint8_t bits = 8; bits--;) {
+ WRITE(L6470_CHAIN_SCK_PIN, LOW);
+ WRITE(L6470_CHAIN_MOSI_PIN, b & 0x80);
+
+ DELAY_NS(125); // 10 cycles @ 84mhz
+
+ WRITE(L6470_CHAIN_SCK_PIN, HIGH);
+
+ b <<= 1; // little setup time
+ b |= (READ(L6470_CHAIN_MISO_PIN) != 0);
+ }
+
+ DELAY_NS(125); // 10 cycles @ 84mhz
+ return b;
+}
+
+/**
+ * The following are weak-linked and defined as do-nothing
+ * functions by the L6470-Arduino library. They must be
+ * defined by the client (Marlin) to provide an SPI interface.
+ */
+
+uint8_t L6470_transfer(uint8_t data, int16_t ss_pin, const uint8_t chain_position) {
+ uint8_t data_out = 0;
+
+ // first device in chain has data sent last
+ digitalWrite(ss_pin, LOW);
+
+ for (uint8_t i = L6470::chain[0]; (i >= 1) && !spi_abort; i--) { // stop sending data if spi_abort is active
+ DISABLE_ISRS(); // disable interrupts during SPI transfer (can't allow partial command to chips)
+ uint8_t temp = L6470_SpiTransfer_Mode_3(uint8_t(i == chain_position ? data : dSPIN_NOP));
+ ENABLE_ISRS(); // enable interrupts
+ if (i == chain_position) data_out = temp;
+ }
+
+ digitalWrite(ss_pin, HIGH);
+ return data_out;
+}
+
+void L6470_transfer(uint8_t L6470_buf[], const uint8_t length) {
+ // first device in chain has data sent last
+
+ if (spi_active) { // interrupted SPI transfer so need to
+ WRITE(L6470_CHAIN_SS_PIN, HIGH); // guarantee min high of 650nS
+ DELAY_US(1);
+ }
+
+ WRITE(L6470_CHAIN_SS_PIN, LOW);
+ for (uint8_t i = length; i >= 1; i--)
+ L6470_SpiTransfer_Mode_3(uint8_t(L6470_buf[i]));
+ WRITE(L6470_CHAIN_SS_PIN, HIGH);
+}
+
+void L6470_spi_init() {
+ OUT_WRITE(L6470_CHAIN_SS_PIN, HIGH);
+ OUT_WRITE(L6470_CHAIN_SCK_PIN, HIGH);
+ OUT_WRITE(L6470_CHAIN_MOSI_PIN, HIGH);
+ SET_INPUT(L6470_CHAIN_MISO_PIN);
+
+ #if PIN_EXISTS(L6470_BUSY)
+ SET_INPUT(L6470_BUSY_PIN);
+ #endif
+
+ OUT_WRITE(L6470_CHAIN_MOSI_PIN, HIGH);
+}
+
+#pragma GCC reset_options
+
+#endif // HAS_DRIVER(L6470)
diff --git a/Marlin/src/HAL/shared/I2cEeprom.cpp b/Marlin/src/HAL/shared/I2cEeprom.cpp
index 02a201c9ef..9d295c4b83 100644
--- a/Marlin/src/HAL/shared/I2cEeprom.cpp
+++ b/Marlin/src/HAL/shared/I2cEeprom.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/MarlinSerial.h b/Marlin/src/HAL/shared/MarlinSerial.h
index 10d55e92db..89c501af47 100644
--- a/Marlin/src/HAL/shared/MarlinSerial.h
+++ b/Marlin/src/HAL/shared/MarlinSerial.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/SpiEeprom.cpp b/Marlin/src/HAL/shared/SpiEeprom.cpp
index d63f52fb38..525c8c0a7d 100644
--- a/Marlin/src/HAL/shared/SpiEeprom.cpp
+++ b/Marlin/src/HAL/shared/SpiEeprom.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/backtrace/backtrace.cpp b/Marlin/src/HAL/shared/backtrace/backtrace.cpp
index 65827b0c97..ba1b2326e9 100644
--- a/Marlin/src/HAL/shared/backtrace/backtrace.cpp
+++ b/Marlin/src/HAL/shared/backtrace/backtrace.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/backtrace/backtrace.h b/Marlin/src/HAL/shared/backtrace/backtrace.h
index 37a567189c..5e00bec94f 100644
--- a/Marlin/src/HAL/shared/backtrace/backtrace.h
+++ b/Marlin/src/HAL/shared/backtrace/backtrace.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/math_32bit.h b/Marlin/src/HAL/shared/math_32bit.h
index 5ce51b62ab..34642b2999 100644
--- a/Marlin/src/HAL/shared/math_32bit.h
+++ b/Marlin/src/HAL/shared/math_32bit.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/persistent_store_api.cpp b/Marlin/src/HAL/shared/persistent_store_api.cpp
index 230a70e85b..5d7a6b7b57 100644
--- a/Marlin/src/HAL/shared/persistent_store_api.cpp
+++ b/Marlin/src/HAL/shared/persistent_store_api.cpp
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/shared/persistent_store_api.h b/Marlin/src/HAL/shared/persistent_store_api.h
index 09db6310e0..de9f1c1090 100644
--- a/Marlin/src/HAL/shared/persistent_store_api.h
+++ b/Marlin/src/HAL/shared/persistent_store_api.h
@@ -1,7 +1,7 @@
/**
* Marlin 3D Printer Firmware
*
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
* Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
* Copyright (c) 2016 Victor Perez victor_pv@hotmail.com
diff --git a/Marlin/src/HAL/shared/servo.cpp b/Marlin/src/HAL/shared/servo.cpp
index 7d15d76b1a..0d276c4aa6 100644
--- a/Marlin/src/HAL/shared/servo.cpp
+++ b/Marlin/src/HAL/shared/servo.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/servo.h b/Marlin/src/HAL/shared/servo.h
index 93a10aaf67..042c5d83cc 100644
--- a/Marlin/src/HAL/shared/servo.h
+++ b/Marlin/src/HAL/shared/servo.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/HAL/shared/servo_private.h b/Marlin/src/HAL/shared/servo_private.h
index 522e4594ff..d2d96ce000 100644
--- a/Marlin/src/HAL/shared/servo_private.h
+++ b/Marlin/src/HAL/shared/servo_private.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp
index bf98f8527c..34d0a245b8 100644
--- a/Marlin/src/Marlin.cpp
+++ b/Marlin/src/Marlin.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -44,6 +44,8 @@
#include "HAL/shared/Delay.h"
+#include "module/stepper_indirection.h"
+
#ifdef ARDUINO
#include
#endif
@@ -54,6 +56,10 @@
#include "gcode/parser.h"
#include "gcode/queue.h"
+#if ENABLED(HOST_ACTION_COMMANDS)
+ #include "feature/host_actions.h"
+#endif
+
#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
#include "libs/buzzer.h"
#endif
@@ -146,7 +152,7 @@
#include "feature/fanmux.h"
#endif
-#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER)
+#if DO_SWITCH_EXTRUDER || ENABLED(SWITCHING_NOZZLE) || ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
#include "module/tool_change.h"
#endif
@@ -154,10 +160,18 @@
#include "feature/controllerfan.h"
#endif
+#if ENABLED(PRUSA_MMU2)
+ #include "feature/prusa_MMU2/mmu2.h"
+#endif
+
#if ENABLED(EXTENSIBLE_UI)
#include "lcd/extensible_ui/ui_api.h"
#endif
+#if HAS_DRIVER(L6470)
+ #include "libs/L6470/L6470_Marlin.h"
+#endif
+
bool Running = true;
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
@@ -305,6 +319,99 @@ void disable_all_steppers() {
disable_e_steppers();
}
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+
+ void event_filament_runout() {
+
+ #if ENABLED(ADVANCED_PAUSE_FEATURE)
+ if (did_pause_print) return; // Action already in progress. Purge triggered repeated runout.
+ #endif
+
+ #if ENABLED(EXTENSIBLE_UI)
+ ExtUI::onFilamentRunout(ExtUI::getActiveTool());
+ #endif
+
+ const char tool = '0'
+ #if NUM_RUNOUT_SENSORS > 1
+ + active_extruder
+ #endif
+ ;
+
+ //action:out_of_filament
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
+ host_action_prompt_end();
+ host_action_prompt_begin(PSTR("FilamentRunout T"), false);
+ SERIAL_CHAR(tool);
+ SERIAL_EOL();
+ host_action_prompt_show();
+ #endif
+
+ #if ENABLED(HOST_ACTION_COMMANDS)
+ if (!runout.host_handling
+ && ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
+ || strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
+ #if ENABLED(ADVANCED_PAUSE_FEATURE)
+ || strstr(FILAMENT_RUNOUT_SCRIPT, "M25")
+ #endif
+ )
+ ) {
+ host_action_paused(false);
+ }
+ else {
+ // Legacy Repetier command for use until newer version supports standard dialog
+ // To be removed later when pause command also triggers dialog
+ #ifdef ACTION_ON_FILAMENT_RUNOUT
+ host_action(PSTR(ACTION_ON_FILAMENT_RUNOUT " T"), false);
+ SERIAL_CHAR(tool);
+ SERIAL_EOL();
+ #endif
+
+ host_action_pause(false);
+ }
+ SERIAL_ECHOPGM(" " ACTION_REASON_ON_FILAMENT_RUNOUT " ");
+ SERIAL_CHAR(tool);
+ SERIAL_EOL();
+
+ #endif // HOST_ACTION_COMMANDS
+
+ if (!runout.host_handling)
+ enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
+ }
+
+#endif // FILAMENT_RUNOUT_SENSOR
+
+#if ENABLED(G29_RETRY_AND_RECOVER)
+
+ void event_probe_failure() {
+ #ifdef G29_FAILURE_COMMANDS
+ process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS));
+ #endif
+ #ifdef ACTION_ON_G29_FAILURE
+ host_action(PSTR(ACTION_ON_G29_FAILURE)); }
+ #endif
+ #if ENABLED(G29_HALT_ON_FAILURE)
+ #ifdef ACTION_ON_CANCEL
+ host_action_cancel();
+ #endif
+ kill(PSTR(MSG_ERR_PROBING_FAILED));
+ #endif
+ }
+
+ void event_probe_recover() {
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"));
+ #endif
+ #ifdef G29_RECOVER_COMMANDS
+ process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS));
+ #endif
+ #ifdef ACTION_ON_G29_RECOVER
+ host_action(PSTR(ACTION_ON_G29_RECOVER));
+ #endif
+ }
+
+#endif
+
/**
* Manage several activities:
* - Check for Filament Runout
@@ -341,28 +448,34 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
#endif
if (stepper_inactive_time) {
+ static bool already_shutdown_steppers; // = false
if (planner.has_blocks_queued())
gcode.previous_move_ms = ms; // reset_stepper_timeout to keep steppers powered
else if (MOVE_AWAY_TEST && !ignore_stepper_queue && ELAPSED(ms, gcode.previous_move_ms + stepper_inactive_time)) {
- #if ENABLED(DISABLE_INACTIVE_X)
- disable_X();
- #endif
- #if ENABLED(DISABLE_INACTIVE_Y)
- disable_Y();
- #endif
- #if ENABLED(DISABLE_INACTIVE_Z)
- disable_Z();
- #endif
- #if ENABLED(DISABLE_INACTIVE_E)
- disable_e_steppers();
- #endif
- #if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
- if (ubl.lcd_map_control) {
- ubl.lcd_map_control = false;
- ui.defer_status_screen(false);
- }
- #endif
+ if (!already_shutdown_steppers) {
+ already_shutdown_steppers = true; // L6470 SPI will consume 99% of free time without this
+ #if ENABLED(DISABLE_INACTIVE_X)
+ disable_X();
+ #endif
+ #if ENABLED(DISABLE_INACTIVE_Y)
+ disable_Y();
+ #endif
+ #if ENABLED(DISABLE_INACTIVE_Z)
+ disable_Z();
+ #endif
+ #if ENABLED(DISABLE_INACTIVE_E)
+ disable_e_steppers();
+ #endif
+ #if HAS_LCD_MENU && ENABLED(AUTO_BED_LEVELING_UBL)
+ if (ubl.lcd_map_control) {
+ ubl.lcd_map_control = false;
+ ui.defer_status_screen(false);
+ }
+ #endif
+ }
}
+ else
+ already_shutdown_steppers = false;
}
#if PIN_EXISTS(CHDK) // Check if pin should be set to LOW (after M240 set it HIGH)
@@ -516,6 +629,10 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
monitor_tmc_driver();
#endif
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ L6470.monitor_driver();
+ #endif
+
// Limit check_axes_activity frequency to 10Hz
static millis_t next_check_axes_ms = 0;
if (ELAPSED(ms, next_check_axes_ms)) {
@@ -584,6 +701,10 @@ void idle(
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
Sd2Card::idle();
#endif
+
+ #if ENABLED(PRUSA_MMU2)
+ mmu2.mmuLoop();
+ #endif
}
/**
@@ -602,7 +723,7 @@ void kill(PGM_P const lcd_msg/*=NULL*/) {
#endif
#ifdef ACTION_ON_KILL
- SERIAL_ECHOLNPGM("//action:" ACTION_ON_KILL);
+ host_action_kill();
#endif
minkill();
@@ -680,6 +801,10 @@ void setup() {
HAL_init();
#endif
+ #if HAS_DRIVER(L6470)
+ L6470.init(); // setup SPI and then init chips
+ #endif
+
#if ENABLED(MAX7219_DEBUG)
max7219.init();
#endif
@@ -860,16 +985,10 @@ void setup() {
leds.setup();
#endif
- #if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
- SET_OUTPUT(RGB_LED_R_PIN);
- SET_OUTPUT(RGB_LED_G_PIN);
- SET_OUTPUT(RGB_LED_B_PIN);
- #if ENABLED(RGBW_LED)
- SET_OUTPUT(RGB_LED_W_PIN);
- #endif
- #endif
-
#if HAS_CASE_LIGHT
+ #if DISABLED(CASE_LIGHT_USE_NEOPIXEL)
+ SET_OUTPUT(CASE_LIGHT_PIN);
+ #endif
update_case_light();
#endif
@@ -912,11 +1031,21 @@ void setup() {
#endif
#if ENABLED(SWITCHING_NOZZLE)
- move_nozzle_servo(0); // Initialize nozzle servo
+ // Initialize nozzle servo(s)
+ #if SWITCHING_NOZZLE_TWO_SERVOS
+ lower_nozzle(0);
+ raise_nozzle(1);
+ #else
+ move_nozzle_servo(0);
+ #endif
+ #endif
+
+ #if ENABLED(MAGNETIC_PARKING_EXTRUDER)
+ mpe_settings_init();
#endif
#if ENABLED(PARKING_EXTRUDER)
- pe_magnet_init();
+ pe_solenoid_init();
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
@@ -938,6 +1067,10 @@ void setup() {
#if HAS_TRINAMIC && DISABLED(PS_DEFAULT_OFF)
test_tmc_connection(true, true, true, true);
#endif
+
+ #if ENABLED(PRUSA_MMU2)
+ mmu2.init();
+ #endif
}
/**
diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h
index 9b66460c62..aa48af9b94 100644
--- a/Marlin/src/Marlin.h
+++ b/Marlin/src/Marlin.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -31,6 +31,11 @@
#include
#include
+#if HAS_DRIVER(L6470)
+ #include "libs/L6470/L6470_Marlin.h"
+ extern uint8_t axis_known_position;
+#endif
+
void stop();
void idle(
@@ -41,6 +46,266 @@ void idle(
void manage_inactivity(const bool ignore_stepper_queue=false);
+//
+// X, Y, Z Stepper enable / disable
+//
+#if AXIS_DRIVER_TYPE_X(L6470)
+ extern L6470 stepperX;
+ #define X_enable NOOP
+ #define X_disable stepperX.free()
+#elif HAS_X_ENABLE
+ #define X_enable X_ENABLE_WRITE( X_ENABLE_ON)
+ #define X_disable X_ENABLE_WRITE(!X_ENABLE_ON)
+#else
+ #define X_enable NOOP
+ #define X_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_X2(L6470)
+ extern L6470 stepperX2;
+ #define X2_enable NOOP
+ #define X2_disable stepperX2.free()
+#elif HAS_X2_ENABLE
+ #define X2_enable X2_ENABLE_WRITE( X_ENABLE_ON)
+ #define X2_disable X2_ENABLE_WRITE(!X_ENABLE_ON)
+#else
+ #define X2_enable NOOP
+ #define X2_disable NOOP
+#endif
+
+#define enable_X() do{ X_enable; X2_enable; }while(0)
+#define disable_X() do{ X_disable; X2_disable; CBI(axis_known_position, X_AXIS); }while(0)
+
+#if AXIS_DRIVER_TYPE_Y(L6470)
+ extern L6470 stepperY;
+ #define Y_enable NOOP
+ #define Y_disable stepperY.free()
+#elif HAS_Y_ENABLE
+ #define Y_enable Y_ENABLE_WRITE( Y_ENABLE_ON)
+ #define Y_disable Y_ENABLE_WRITE(!Y_ENABLE_ON)
+#else
+ #define Y_enable NOOP
+ #define Y_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_Y2(L6470)
+ extern L6470 stepperY2;
+ #define Y2_enable NOOP
+ #define Y2_disable stepperY2.free()
+#elif HAS_Y2_ENABLE
+ #define Y2_enable Y2_ENABLE_WRITE( Y_ENABLE_ON)
+ #define Y2_disable Y2_ENABLE_WRITE(!Y_ENABLE_ON)
+#else
+ #define Y2_enable NOOP
+ #define Y2_disable NOOP
+#endif
+
+#define enable_Y() do{ Y_enable; Y2_enable; }while(0)
+#define disable_Y() do{ Y_disable; Y2_disable; CBI(axis_known_position, Y_AXIS); }while(0)
+
+#if AXIS_DRIVER_TYPE_Z(L6470)
+ extern L6470 stepperZ;
+ #define Z_enable NOOP
+ #define Z_disable stepperZ.free()
+#elif HAS_Z_ENABLE
+ #define Z_enable Z_ENABLE_WRITE( Z_ENABLE_ON)
+ #define Z_disable Z_ENABLE_WRITE(!Z_ENABLE_ON)
+#else
+ #define Z_enable NOOP
+ #define Z_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_Z2(L6470)
+ extern L6470 stepperZ2;
+ #define Z2_enable NOOP
+ #define Z2_disable stepperZ2.free()
+#elif HAS_Z2_ENABLE
+ #define Z2_enable Z2_ENABLE_WRITE( Z_ENABLE_ON)
+ #define Z2_disable Z2_ENABLE_WRITE(!Z_ENABLE_ON)
+#else
+ #define Z2_enable NOOP
+ #define Z2_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_Z3(L6470)
+ extern L6470 stepperZ3;
+ #define Z3_enable NOOP
+ #define Z3_disable stepperZ3.free()
+#elif HAS_Z3_ENABLE
+ #define Z3_enable Z3_ENABLE_WRITE( Z_ENABLE_ON)
+ #define Z3_disable Z3_ENABLE_WRITE(!Z_ENABLE_ON)
+#else
+ #define Z3_enable NOOP
+ #define Z3_disable NOOP
+#endif
+
+#define enable_Z() do{ Z_enable; Z2_enable; Z3_enable; }while(0)
+#define disable_Z() do{ Z_disable; Z2_disable; Z3_disable; CBI(axis_known_position, Z_AXIS); }while(0)
+
+// end X, Y, Z Stepper enable / disable
+
+//
+// Extruder Stepper enable / disable
+//
+
+// define the individual enables/disables
+#if AXIS_DRIVER_TYPE_E0(L6470)
+ extern L6470 stepperE0;
+ #define E0_enable NOOP
+ #define E0_disable do{ stepperE0.free(); CBI(axis_known_position, E_AXIS); }while(0)
+#elif HAS_E0_ENABLE
+ #define E0_enable E0_ENABLE_WRITE( E_ENABLE_ON)
+ #define E0_disable E0_ENABLE_WRITE(!E_ENABLE_ON)
+#else
+ #define E0_enable NOOP
+ #define E0_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_E1(L6470)
+ extern L6470 stepperE1;
+ #define E1_enable NOOP
+ #define E1_disable do{ stepperE1.free(); CBI(axis_known_position, E_AXIS); }while(0)
+#elif E_STEPPERS > 1 && HAS_E1_ENABLE
+ #define E1_enable E1_ENABLE_WRITE( E_ENABLE_ON)
+ #define E1_disable E1_ENABLE_WRITE(!E_ENABLE_ON)
+#else
+ #define E1_enable NOOP
+ #define E1_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_E2(L6470)
+ extern L6470 stepperE2;
+ #define E2_enable NOOP
+ #define E2_disable do{ stepperE2.free(); CBI(axis_known_position, E_AXIS); }while(0)
+#elif E_STEPPERS > 2 && HAS_E2_ENABLE
+ #define E2_enable E2_ENABLE_WRITE( E_ENABLE_ON)
+ #define E2_disable E2_ENABLE_WRITE(!E_ENABLE_ON)
+#else
+ #define E2_enable NOOP
+ #define E2_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_E3(L6470)
+ extern L6470 stepperE3;
+ #define E3_enable NOOP
+ #define E3_disable do{ stepperE3.free(); CBI(axis_known_position, E_AXIS); }while(0)
+#elif E_STEPPERS > 3 && HAS_E3_ENABLE
+ #define E3_enable E3_ENABLE_WRITE( E_ENABLE_ON)
+ #define E3_disable E3_ENABLE_WRITE(!E_ENABLE_ON)
+#else
+ #define E3_enable NOOP
+ #define E3_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_E4(L6470)
+ extern L6470 stepperE4;
+ #define E4_enable NOOP
+ #define E4_disable do{ stepperE4.free(); CBI(axis_known_position, E_AXIS); }while(0)
+#elif E_STEPPERS > 4 && HAS_E4_ENABLE
+ #define E4_enable E4_ENABLE_WRITE( E_ENABLE_ON)
+ #define E4_disable E4_ENABLE_WRITE(!E_ENABLE_ON)
+#else
+ #define E4_enable NOOP
+ #define E4_disable NOOP
+#endif
+
+#if AXIS_DRIVER_TYPE_E5(L6470)
+ extern L6470 stepperE5;
+ #define E5_enable NOOP
+ #define E5_disable do{ stepperE5.free(); CBI(axis_known_position, E_AXIS); }while(0)
+#elif E_STEPPERS > 5 && HAS_E5_ENABLE
+ #define E5_enable E5_ENABLE_WRITE( E_ENABLE_ON)
+ #define E5_disable E5_ENABLE_WRITE(!E_ENABLE_ON)
+#else
+ #define E5_enable NOOP
+ #define E5_disable NOOP
+#endif
+// end individual enables/disables
+
+#if ENABLED(MIXING_EXTRUDER)
+
+ /**
+ * Mixing steppers synchronize their enable (and direction) together
+ */
+ #if MIXING_STEPPERS > 5
+ #define enable_E0() { E0_enable; E1_enable; E2_enable; E3_enable; E4_enable; E5_enable; }
+ #define disable_E0() { E0_disable; E1_disable; E2_disable; E3_disable; E4_disable; E5_disable; }
+ #elif MIXING_STEPPERS > 4
+ #define enable_E0() { E0_enable; E1_enable; E2_enable; E3_enable; E4_enable; }
+ #define disable_E0() { E0_disable; E1_disable; E2_disable; E3_disable; E4_disable; }
+ #elif MIXING_STEPPERS > 3
+ #define enable_E0() { E0_enable; E1_enable; E2_enable; E3_enable; }
+ #define disable_E0() { E0_disable; E1_disable; E2_disable; E3_disable; }
+ #elif MIXING_STEPPERS > 2
+ #define enable_E0() { E0_enable; E1_enable; E2_enable; }
+ #define disable_E0() { E0_disable; E1_disable; E2_disable; }
+ #else
+ #define enable_E0() { E0_enable; E1_enable; }
+ #define disable_E0() { E0_disable; E1_disable; }
+ #endif
+ #define enable_E1() NOOP
+ #define disable_E1() NOOP
+ #define enable_E2() NOOP
+ #define disable_E2() NOOP
+ #define enable_E3() NOOP
+ #define disable_E3() NOOP
+ #define enable_E4() NOOP
+ #define disable_E4() NOOP
+ #define enable_E5() NOOP
+ #define disable_E5() NOOP
+
+#else // !MIXING_EXTRUDER
+
+ #if HAS_E0_ENABLE
+ #define enable_E0() E0_enable
+ #define disable_E0() E0_disable
+ #else
+ #define enable_E0() NOOP
+ #define disable_E0() NOOP
+ #endif
+
+ #if E_STEPPERS > 1 && HAS_E1_ENABLE
+ #define enable_E1() E1_enable
+ #define disable_E1() E1_disable
+ #else
+ #define enable_E1() NOOP
+ #define disable_E1() NOOP
+ #endif
+
+ #if E_STEPPERS > 2 && HAS_E2_ENABLE
+ #define enable_E2() E2_enable
+ #define disable_E2() E2_disable
+ #else
+ #define enable_E2() NOOP
+ #define disable_E2() NOOP
+ #endif
+
+ #if E_STEPPERS > 3 && HAS_E3_ENABLE
+ #define enable_E3() E3_enable
+ #define disable_E3() E3_disable
+ #else
+ #define enable_E3() NOOP
+ #define disable_E3() NOOP
+ #endif
+
+ #if E_STEPPERS > 4 && HAS_E4_ENABLE
+ #define enable_E4() E4_enable
+ #define disable_E4() E4_disable
+ #else
+ #define enable_E4() NOOP
+ #define disable_E4() NOOP
+ #endif
+
+ #if E_STEPPERS > 5 && HAS_E5_ENABLE
+ #define enable_E5() E5_enable
+ #define disable_E5() E5_disable
+ #else
+ #define enable_E5() NOOP
+ #define disable_E5() NOOP
+ #endif
+
+#endif // !MIXING_EXTRUDER
+
#if ENABLED(EXPERIMENTAL_I2CBUS)
#include "feature/twibus.h"
extern TWIBus i2c;
@@ -104,3 +369,12 @@ void protected_pin_err();
#if HAS_SUICIDE
inline void suicide() { OUT_WRITE(SUICIDE_PIN, LOW); }
#endif
+
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ void event_filament_runout();
+#endif
+
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ void event_probe_recover();
+ void event_probe_failure();
+#endif
diff --git a/Marlin/src/config/default/Configuration.h b/Marlin/src/config/default/Configuration.h
index 085cac4ce3..e9ac0666c1 100644
--- a/Marlin/src/config/default/Configuration.h
+++ b/Marlin/src/config/default/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -1723,7 +1769,7 @@
//
//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
//
//#define SAV_3DLCD
diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h
index faa7110028..edeac98065 100644
--- a/Marlin/src/config/default/Configuration_adv.h
+++ b/Marlin/src/config/default/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -951,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1499,7 @@
/**
* 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.
*/
@@ -1382,6 +1509,15 @@
//#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.
*/
@@ -1406,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1561,7 @@
#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.
@@ -1447,6 +1584,7 @@
#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.
@@ -1501,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1795,35 +2017,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1947,6 +2173,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h b/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h
index 6e41ba890f..b9b689fd52 100644
--- a/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h
+++ b/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -585,8 +627,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -995,6 +1038,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2021,7 +2067,7 @@
* LED Type. Enable only one of the following two options.
*
*/
-#define RGB_LED
+//#define RGB_LED
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
@@ -2053,7 +2099,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h b/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
index e27a257ae5..818b17662d 100644
--- a/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
+++ b/Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -199,7 +202,7 @@
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
- #define CONTROLLER_FAN_PIN 9 // Set a custom pin for the controller fan
+ #define CONTROLLER_FAN_PIN 9 // Set a custom pin for the controller fan
#define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
#define CONTROLLERFAN_SPEED 255 // 255 == full speed
#endif
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -951,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1499,7 @@
/**
* 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.
*/
@@ -1382,6 +1509,15 @@
//#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.
*/
@@ -1406,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1561,7 @@
#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.
@@ -1447,6 +1584,7 @@
#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.
@@ -1501,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1780,10 +2002,8 @@
#define USER_DESC_1 "Test Print"
#define USER_GCODE_1 "G28\nG29\nG26"
-/*
- #define USER_DESC_1 "Home & UBL Info"
- #define USER_GCODE_1 "G28\nG29 W"
+ /*
#define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
@@ -1795,39 +2015,43 @@
#define USER_DESC_5 "Home & Info"
#define USER_GCODE_5 "G28\nM503"
-*/
+ */
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1951,6 +2175,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
index 8b261fd06f..cd49d04f4d 100644
--- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
+++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX 74 // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -600,8 +642,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1009,6 +1052,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2042,7 +2088,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
index a8dc9e26a8..b416eec630 100644
--- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
+++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
index 8ef893b023..67a7b892d0 100644
--- a/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
+++ b/Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Anet/A2/Configuration.h b/Marlin/src/config/examples/Anet/A2/Configuration.h
index ad86e0f04c..c9caefaf5e 100644
--- a/Marlin/src/config/examples/Anet/A2/Configuration.h
+++ b/Marlin/src/config/examples/Anet/A2/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2024,7 +2070,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Anet/A2/Configuration_adv.h b/Marlin/src/config/examples/Anet/A2/Configuration_adv.h
index d358705018..03f113637a 100644
--- a/Marlin/src/config/examples/Anet/A2/Configuration_adv.h
+++ b/Marlin/src/config/examples/Anet/A2/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Anet/A2plus/Configuration.h b/Marlin/src/config/examples/Anet/A2plus/Configuration.h
index 474351de9e..63f90e51a5 100644
--- a/Marlin/src/config/examples/Anet/A2plus/Configuration.h
+++ b/Marlin/src/config/examples/Anet/A2plus/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2024,7 +2070,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h b/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
index d358705018..03f113637a 100644
--- a/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
+++ b/Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Anet/A6/Configuration.h b/Marlin/src/config/examples/Anet/A6/Configuration.h
index bf7be458dd..ac9917c7d7 100644
--- a/Marlin/src/config/examples/Anet/A6/Configuration.h
+++ b/Marlin/src/config/examples/Anet/A6/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -600,8 +642,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1103,6 +1146,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2176,7 +2222,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
index b0f53fe104..ebe8221502 100644
--- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
+++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -372,18 +375,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -516,6 +528,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -628,7 +693,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -949,13 +1014,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1158,6 +1217,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1208,6 +1268,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1235,124 +1296,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1371,6 +1497,7 @@
/**
* 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.
*/
@@ -1380,6 +1507,15 @@
//#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.
*/
@@ -1404,7 +1540,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1423,6 +1559,7 @@
#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.
@@ -1445,6 +1582,7 @@
#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.
@@ -1499,62 +1637,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1793,35 +2015,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1945,6 +2171,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Anet/A8/Configuration.h b/Marlin/src/config/examples/Anet/A8/Configuration.h
index 28a7a99fa6..c3476d36ea 100644
--- a/Marlin/src/config/examples/Anet/A8/Configuration.h
+++ b/Marlin/src/config/examples/Anet/A8/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -175,6 +175,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -185,25 +195,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -235,6 +272,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -389,7 +430,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -593,8 +635,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1002,6 +1045,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2037,7 +2083,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
index 1c4755c773..c0d83dbb56 100644
--- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
+++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/AnimationExample/_Bootscreen.h b/Marlin/src/config/examples/AnimationExample/_Bootscreen.h
index 6a69735626..351abf6fe0 100644
--- a/Marlin/src/config/examples/AnimationExample/_Bootscreen.h
+++ b/Marlin/src/config/examples/AnimationExample/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/AnyCubic/i3/Configuration.h b/Marlin/src/config/examples/AnyCubic/i3/Configuration.h
new file mode 100644
index 0000000000..7d8c7a2432
--- /dev/null
+++ b/Marlin/src/config/examples/AnyCubic/i3/Configuration.h
@@ -0,0 +1,2108 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// config/examples/delta directory and customize for your machine.
+//
+
+//===========================================================================
+//============================= SCARA Printer ===============================
+//===========================================================================
+// For a SCARA printer start with the configuration files in
+// config/examples/SCARA and customize for your machine.
+//
+
+// @section info
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Serial port -1 is the USB emulated serial port, if available.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 250000
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_TRIGORILLA_14
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "Anycubic i3"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5, 6]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
+#endif
+
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
+#endif
+
+/**
+ * Switching Toolhead
+ *
+ * Support for swappable and dockable toolheads, such as
+ * the E3D Tool Changer. Toolheads are locked with a servo.
+ */
+//#define SWITCHING_TOOLHEAD
+#if ENABLED(SWITCHING_TOOLHEAD)
+ #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector
+ #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock
+ #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock
+ #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis
+ #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis
+ #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
+ * - This implementation supports up to two mixing extruders.
+ * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ */
+//#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 20.00} // (mm) relative X-offset for each nozzle
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (mm) relative Y-offset for each nozzle
+//#define HOTEND_OFFSET_Z {0.0, 0.00} // (mm) relative Z-offset for each nozzle
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 1
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_5 0
+#define TEMP_SENSOR_BED 1
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define HEATER_5_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define HEATER_5_MAXTEMP 275
+#define BED_MAXTEMP 150
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // ANYCUBIC I3 240C and 8 cycles
+ #define DEFAULT_Kp 17.80
+ #define DEFAULT_Ki 0.84
+ #define DEFAULT_Kd 64.84
+
+ // Ultimaker
+ //#define DEFAULT_Kp 22.2
+ //#define DEFAULT_Ki 1.08
+ //#define DEFAULT_Kd 114
+
+ // MakerGear
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
+
+ // Mendel Parts V9 on 12V
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * 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 BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ //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
+
+ // Anycubic I3 with Ultrabase. 100C and 8 cycles
+ #define DEFAULT_bedKp 218.59
+ #define DEFAULT_bedKi 43.04
+ #define DEFAULT_bedKd 277.56
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from pidautotune
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
+ * Add M302 to set the minimum extrusion temperature and/or turn
+ * cold extrusion prevention on and off.
+ *
+ * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 420
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= 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
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// Enable pulldown for all endstops to prevent a floating state
+//#define ENDSTOPPULLDOWNS
+#if DISABLED(ENDSTOPPULLDOWNS)
+ // Disable ENDSTOPPULLDOWNS to set pulldowns individually
+ //#define ENDSTOPPULLDOWN_XMAX
+ //#define ENDSTOPPULLDOWN_YMAX
+ //#define ENDSTOPPULLDOWN_ZMAX
+ //#define ENDSTOPPULLDOWN_XMIN
+ //#define ENDSTOPPULLDOWN_YMIN
+ //#define ENDSTOPPULLDOWN_ZMIN
+ //#define ENDSTOPPULLDOWN_ZMIN_PROBE
+#endif
+
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
+#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 true // set to true to invert the logic of the probe.
+
+/**
+ * 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 A4988
+//#define Y_DRIVER_TYPE A4988
+//#define Z_DRIVER_TYPE A4988
+//#define X2_DRIVER_TYPE A4988
+//#define Y2_DRIVER_TYPE A4988
+//#define Z2_DRIVER_TYPE A4988
+//#define Z3_DRIVER_TYPE A4988
+//#define E0_DRIVER_TYPE A4988
+//#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
+
+// Enable this feature if all enabled endstop pins are interrupt-capable.
+// This will remove the need to poll the interrupt pins, saving many CPU cycles.
+//#define ENDSTOP_INTERRUPTS_FEATURE
+
+/**
+ * Endstop Noise Threshold
+ *
+ * Enable if your probe or endstops falsely trigger due to noise.
+ *
+ * - Higher values may affect repeatability or accuracy of some bed probes.
+ * - To fix noise install a 100nF ceramic capacitor inline with the switch.
+ * - This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, which already have the 100nF capacitor.
+ *
+ * :[2,3,4,5,6,7]
+ */
+//#define ENDSTOP_NOISE_THRESHOLD 2
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * 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 { 80, 80, 400, 96.2 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 500, 500, 6, 25 }
+
+/**
+ * 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, 50, 8000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * 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 1000 // X, Y, Z acceleration for travel (non printing) moves
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#if DISABLED(JUNCTION_DEVIATION)
+ #define DEFAULT_XJERK 5.0
+ #define DEFAULT_YJERK 2.0
+ #define DEFAULT_ZJERK 0.4
+#endif
+
+#define DEFAULT_EJERK 2.0 // May be used by Linear Advance
+
+/**
+ * S-Curve Acceleration
+ *
+ * This option eliminates vibration during printing by fitting a Bézier
+ * curve to move acceleration, producing much smoother direction changes.
+ *
+ * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
+ */
+//#define S_CURVE_ACCELERATION
+
+//===========================================================================
+//============================= Z Probe Options =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
+
+/**
+ * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
+ * (e.g., an inductive probe or a nozzle-based probe-switch.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice.
+//#define RACK_AND_PINION_PROBE
+#if ENABLED(RACK_AND_PINION_PROBE)
+ #define Z_PROBE_DEPLOY_X X_MIN_POS
+ #define Z_PROBE_RETRACT_X X_MAX_POS
+#endif
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER 75 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 5 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER -2 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+//#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
+//#define Z_AFTER_PROBING 5 // Z position after probing is done
+
+#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
+
+// For M851 give a range for adjusting the Z probe offset
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// Before deploy/stow pause for user confirmation
+//#define PAUSE_BEFORE_DEPLOY_STOW
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER true // Keep only the active extruder enabled
+
+// @section machine
+
+// 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 false
+#define INVERT_Z_DIR true
+
+// @section extruder
+
+// For direct drive extruder v9 set to true, for geared extruder set to false.
+#define INVERT_E0_DIR false
+#define INVERT_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+#define INVERT_E5_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 210
+#define Y_BED_SIZE 210
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS -10
+#define Y_MIN_POS -11
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 250
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ //#define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+//#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // After a runout is detected, continue printing this length of filament
+ // before executing the runout script. Useful for a sensor at the end of
+ // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
+ //#define FILAMENT_RUNOUT_DISTANCE_MM 25
+
+ #ifdef FILAMENT_RUNOUT_DISTANCE_MM
+ // Enable this option to use an encoder disc that toggles the runout pin
+ // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
+ // large enough to avoid false positives.)
+ //#define FILAMENT_MOTION_SENSOR
+ #endif
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE))
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE))
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
+ */
+//#define LCD_BED_LEVELING
+
+#if ENABLED(LCD_BED_LEVELING)
+ #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
+ //#define MESH_EDIT_MENU // Add a menu to edit mesh points
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+//#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// 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_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (50*60)
+#define HOMING_FEEDRATE_Z (4*60)
+
+// Validate that endstops are triggered on homing moves
+#define VALIDATE_HOMING_ENDSTOPS
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_LABEL "PLA"
+#define PREHEAT_1_TEMP_HOTEND 200
+#define PREHEAT_1_TEMP_BED 65
+#define PREHEAT_1_FAN_SPEED 255 // Value from 0 to 255
+
+#define PREHEAT_2_LABEL "ABS"
+#define PREHEAT_2_TEMP_HOTEND 240
+#define PREHEAT_2_TEMP_BED 95
+#define PREHEAT_2_FAN_SPEED 255 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * 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
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+//#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 WESTERN
+
+/**
+ * Info Screen Style (0:Classic, 1:Prusa)
+ *
+ * :[0:'Classic', 1:'Prusa']
+ */
+#define LCD_INFO_SCREEN_STYLE 0
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * LCD Menu Items
+ *
+ * Disable all menus and only display the Status Screen, or
+ * just remove some extraneous menu items to recover space.
+ */
+//#define NO_LCD_MENUS
+//#define SLIM_LCD_MENUS
+
+//
+// ENCODER SETTINGS
+//
+// 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
+
+//
+// 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
+
+/**
+ * Encoder Direction Options
+ *
+ * Test your encoder's behavior first with both options disabled.
+ *
+ * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
+ * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION.
+ * Reversed Value Editing only? Enable BOTH options.
+ */
+
+//
+// This option reverses the encoder direction everywhere.
+//
+// Set this option if CLOCKWISE causes values to DECREASE
+//
+#define REVERSE_ENCODER_DIRECTION
+
+//
+// This option reverses the encoder direction for navigating LCD menus.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+//#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
+//
+// Original RADDS LCD Display+Encoder+SDCardReader
+// http://doku.radds.org/dokumentation/lcd-display/
+//
+//#define RADDS_DISPLAY
+
+//
+// ULTIMAKER Controller.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+//#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// RigidBot Panel V1.0
+// http://www.inventapart.com/
+//
+//#define RIGIDBOT_PANEL
+
+//
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// ANET and Tronxy 20x4 Controller
+//
+//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
+ // This LCD is known to be susceptible to electrical interference
+ // which scrambles the display. Pressing any button clears it up.
+ // This is a LCD2004 display with 5 analog buttons.
+
+//
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+//
+//#define ULTRA_LCD
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: I2C
+//
+// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C
+// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C
+//
+
+//
+// Elefu RA Board Control Panel
+// http://www.elefu.com/index.php?route=product/product&product_id=53
+//
+//#define RA_CONTROL_PANEL
+
+//
+// Sainsmart (YwRobot) LCD Displays
+//
+// These require F.Malpartida's LiquidCrystal_I2C library
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
+//
+//#define LCD_SAINSMART_I2C_1602
+//#define LCD_SAINSMART_I2C_2004
+
+//
+// Generic LCM1602 LCD adapter
+//
+//#define LCM1602
+
+//
+// PANELOLU2 LCD with status LEDs,
+// separate encoder and click inputs.
+//
+// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later.
+// For more info: https://github.com/lincomatic/LiquidTWI2
+//
+// Note: The PANELOLU2 encoder click input can either be directly connected to
+// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
+//
+//#define LCD_I2C_PANELOLU2
+
+//
+// Panucatt VIKI LCD with status LEDs,
+// integrated click & L/R/U/D buttons, separate encoder inputs.
+//
+//#define LCD_I2C_VIKI
+
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//
+// 3-wire SR LCD with strobe using 74HC4094
+// https://github.com/mikeshub/SailfishLCD
+// Uses the code directly from Sailfish
+//
+//#define FF_INTERFACEBOARD
+
+//=============================================================================
+//======================= LCD / Controller Selection =======================
+//========================= (Graphical LCDs) ========================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Graphical 128x64 (DOGM)
+//
+// IMPORTANT: The U8glib library is required for Graphical Display!
+// https://github.com/olikraus/U8glib_Arduino
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
+//
+//#define BQ_LCD_SMART_CONTROLLER
+
+//
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+// A clone of the RepRapDiscount full graphics display but with
+// different pins/wiring (see pins_ANET_10.h).
+//
+//#define ANET_FULL_GRAPHICS_LCD
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//
+// Extensible UI
+//
+// Enable third-party or vendor customized user interfaces that aren't
+// packaged with Marlin. Source code for the user interface will need to
+// be placed in "src/lcd/extensible_ui/lib"
+//
+//#define EXTENSIBLE_UI
+
+//=============================================================================
+//=============================== Graphical TFTs ==============================
+//=============================================================================
+
+//
+// MKS Robin 320x240 color display
+//
+//#define MKS_ROBIN_TFT
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+// Support for PCA9533 PWM LED driver
+// https://github.com/mikeshub/SailfishRGB_LED
+//#define PCA9533
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * as the Arduino cannot handle the current the LEDs will require.
+ * Failure to follow this precaution can destroy your Arduino!
+ * NOTE: A separate 5V power supply is required! The Neopixel LED needs
+ * more current than the Arduino 5V linear regulator can produce.
+ * *** CAUTION ***
+ *
+ * LED Type. Enable only one of the following two options.
+ *
+ */
+//#define RGB_LED
+//#define RGBW_LED
+
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Only power servos during movement, otherwise leave off to prevent jitter
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+// Allow servo angle to be edited and saved to EEPROM
+//#define EDITABLE_SERVO_ANGLES
diff --git a/Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h b/Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h
new file mode 100644
index 0000000000..a6a68b344f
--- /dev/null
+++ b/Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h
@@ -0,0 +1,2250 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 20 // Seconds
+ #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m)
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm)
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ #define CONTROLLER_FAN_PIN 7 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// 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
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * 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 TRIGORILLA_FAN2_PIN
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define E5_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // 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 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)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+// Employ an external closed loop controller. Override pins here if needed.
+//#define EXTERNAL_CLOSED_LOOP_CONTROLLER
+#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
+ //#define CLOSED_LOOP_ENABLE_PIN -1
+ //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
+#endif
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_TRIPLE_STEPPER_DRIVERS
+#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
+ //#define Z_TRIPLE_ENDSTOPS
+ #if ENABLED(Z_TRIPLE_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z3_USE_ENDSTOP _YMAX_
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0
+ #endif
+#endif
+
+/**
+ * Dual X Carriage
+ *
+ * This setup has two X carriages that can move independently, each with its own hotend.
+ * The carriages can be used to print an object with two colors or materials, or in
+ * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
+ * The inactive carriage is parked automatically to prevent oozing.
+ * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
+ * By default the X2 stepper is assigned to the first unused E plug on the board.
+ */
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
+ #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+/**
+ * Z Steppers Auto-Alignment
+ * Add the G34 command to align multiple Z steppers using a bed probe.
+ */
+//#define Z_STEPPER_AUTO_ALIGN
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
+ // Define probe X and Y positions for Z1, Z2 [, Z3]
+ #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
+ #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
+ // Set number of iterations to align
+ #define Z_STEPPER_ALIGN_ITERATIONS 3
+ // Enable to restore leveling setup after operation
+ #define RESTORE_LEVELING_AFTER_G34
+ // Use the amplification factor to de-/increase correction step.
+ // In case the stepper (spindle) position is further out than the test point
+ // Use a value > 1. NOTE: This may cause instability
+ #define Z_STEPPER_ALIGN_AMP 1.0
+ // Stop criterion. If the accuracy is better than this stop iterating early
+ #define Z_STEPPER_ALIGN_ACC 0.02
+#endif
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s)
+
+//
+// Backlash Compensation
+// Adds extra movement to axes on direction-changes to account for backlash.
+//
+//#define BACKLASH_COMPENSATION
+#if ENABLED(BACKLASH_COMPENSATION)
+ // Define values for backlash distance and correction.
+ // If BACKLASH_GCODE is enabled these values are the defaults.
+ #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
+ #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
+
+ // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
+ // to reduce print artifacts. (Enabling this is costly in memory and computation!)
+ //#define BACKLASH_SMOOTHING_MM 3 // (mm)
+
+ // Add runtime configuration and tuning of backlash values (M425)
+ //#define BACKLASH_GCODE
+
+ #if ENABLED(BACKLASH_GCODE)
+ // Measure the Z backlash when probing (G29) and set with "M425 Z"
+ #define MEASURE_BACKLASH_WHEN_PROBING
+
+ #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
+ // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
+ // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
+ // increments while checking for the contact to be broken.
+ #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm)
+ #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm)
+ #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m)
+ #endif
+ #endif
+#endif
+
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+/**
+ * Custom Microstepping
+ * Override as-needed for your setup. Up to 3 MS pins are supported.
+ */
+//#define MICROSTEP1 LOW,LOW,LOW
+//#define MICROSTEP2 HIGH,LOW,LOW
+//#define MICROSTEP4 LOW,HIGH,LOW
+//#define MICROSTEP8 HIGH,HIGH,LOW
+//#define MICROSTEP16 LOW,LOW,HIGH
+//#define MICROSTEP32 HIGH,LOW,HIGH
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+// @section lcd
+
+// Change values more rapidly when the encoder is rotated faster
+#define ENCODER_RATE_MULTIPLIER
+#if ENABLED(ENCODER_RATE_MULTIPLIER)
+ #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed
+ #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed
+#endif
+
+// Play a beep when the feedrate is changed from the Status Screen
+//#define BEEP_ON_FEEDRATE_CHANGE
+#if ENABLED(BEEP_ON_FEEDRATE_CHANGE)
+ #define FEEDRATE_CHANGE_BEEP_DURATION 10
+ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
+#endif
+
+// Include a page of printer information in the LCD Main Menu
+//#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+//#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
+ //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ //#define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ //#define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ //#define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+ /**
+ * Support for USB thumb drives using an Arduino USB Host Shield or
+ * equivalent MAX3421E breakout board. The USB thumb drive will appear
+ * to Marlin as an SD card.
+ *
+ * The MAX3421E must be assigned the same pins as the SD card reader, with
+ * the following pin mapping:
+ *
+ * SCLK, MOSI, MISO --> SCLK, MOSI, MISO
+ * INT --> SD_DETECT_PIN
+ * SS --> SDSS
+ */
+ //#define USB_FLASH_DRIVE_SUPPORT
+ #if ENABLED(USB_FLASH_DRIVE_SUPPORT)
+ #define USB_CS_PIN SDSS
+ #define USB_INTR_PIN SD_DETECT_PIN
+ #endif
+
+ /**
+ * When using a bootloader that supports SD-Firmware-Flashing,
+ * add a menu item to activate SD-FW-Update on the next reboot.
+ *
+ * Requires ATMEGA2560 (Arduino Mega)
+ *
+ * Tested with this bootloader:
+ * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560
+ */
+ //#define SD_FIRMWARE_UPDATE
+ #if ENABLED(SD_FIRMWARE_UPDATE)
+ #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF
+ #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0
+ #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF
+ #endif
+
+ // Add an optimized binary file transfer mode, initiated with 'M28 B1'
+ //#define FAST_FILE_TRANSFER
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if HAS_GRAPHICAL_LCD
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ #if ENABLED(U8GLIB_ST7920)
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+ /**
+ * Status (Info) Screen customizations
+ * These options may affect code size and screen render time.
+ * Custom status screens can forcibly override these settings.
+ */
+ //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones
+ //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends)
+ #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM)
+ #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
+ #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
+ //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
+ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
+ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
+ //#define STATUS_HEAT_PERCENT // Show heating in a progress bar
+
+#endif // HAS_GRAPHICAL_LCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+//#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+
+ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ #endif
+
+ //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
+ #if ENABLED(MOVE_Z_WHEN_IDLE)
+ #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
+ #endif
+
+ //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
+ #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
+ //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+ #endif
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * 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
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 400 : Minimum for A5984 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// 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
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// Printrun may have trouble receiving long strings all at once.
+// This option inserts short delays between lines of serial output.
+#define SERIAL_OVERRUN_PROTECTION
+
+// @section extras
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT
+#if ENABLED(FWRETRACT)
+ #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM
+ #if ENABLED(FWRETRACT_AUTORETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #endif
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm)
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+ #if ENABLED(MIXING_EXTRUDER)
+ //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously
+ #endif
+#endif
+
+/**
+ * Universal tool change settings.
+ * Applies to all types of extruders except where explicitly noted.
+ */
+#if EXTRUDERS > 1
+ // Z raise distance for tool-change, as needed for some extruders
+ #define TOOLCHANGE_ZRAISE 2 // (mm)
+
+ // Retract and prime filament on tool-change
+ //#define TOOLCHANGE_FILAMENT_SWAP
+ #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
+ #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
+ #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
+ #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
+ #endif
+
+ /**
+ * Position to park head during tool change.
+ * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
+ */
+ //#define TOOLCHANGE_PARK
+ #if ENABLED(TOOLCHANGE_PARK)
+ #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
+ #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m)
+ #endif
+#endif
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+//#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.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #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 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
+ */
+#if HAS_DRIVER(TMC26X)
+
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
+
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
+
+#endif // TMC26X
+
+// @section tmc_smart
+
+/**
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * TMCStepper library is required to use TMC stepper drivers.
+ * https://github.com/teemuatlut/TMCStepper
+ */
+#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 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
+
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
+
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #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 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #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 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #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_12V
+
+ /**
+ * 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 S0/1 - 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 ENABLED(SENSORLESS_HOMING) || ENABLED(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/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // HAS_TRINAMIC
+
+// @section L6470
+
+/**
+ * L6470 Stepper Driver options
+ *
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
+ */
+#if HAS_DRIVER(L6470)
+
+ //#define L6470_CHITCHAT // Display additional status info
+
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
+
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
+
+#endif // L6470
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Canon Hack Development Kit
+ * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+ */
+//#define CHDK_PIN 4 // Set and enable a pin for triggering CHDK to take a picture
+#if PIN_EXISTS(CHDK)
+ #define CHDK_DELAY 50 // (ms) How long the pin should remain HIGH
+#endif
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+//#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * CNC G-code options
+ * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
+ * Note that G0 feedrates should be used with care for 3D printing (if used at all).
+ * High feedrates may cause ringing and harm print quality.
+ */
+//#define PAREN_COMMENTS // Support for parentheses-delimited comments
+//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
+
+// Enable and set a (default) feedrate for all G0 moves
+//#define G0_FEEDRATE 3000 // (mm/m)
+#ifdef G0_FEEDRATE
+ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
+#endif
+
+/**
+ * G-code Macros
+ *
+ * Add G-codes M810-M819 to define and run G-code macros.
+ * Macros are not saved to EEPROM.
+ */
+//#define GCODE_MACROS
+#if ENABLED(GCODE_MACROS)
+ #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
+ #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
+#endif
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ //#define CUSTOM_USER_MENU_TITLE "Custom Commands"
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
+ */
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reliabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
+ //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
+// @section develop
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
diff --git a/Marlin/src/config/examples/ArmEd/Configuration.h b/Marlin/src/config/examples/ArmEd/Configuration.h
index 01f809ef60..e986ecf093 100644
--- a/Marlin/src/config/examples/ArmEd/Configuration.h
+++ b/Marlin/src/config/examples/ArmEd/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -154,17 +154,6 @@
// For Cyclops or any "multi-extruder" that shares a single nozzle.
//#define SINGLENOZZLE
-#if ENABLED(SINGLENOZZLE)
- // Parameters for filament retract / prime on toolchange
- #define SINGLENOZZLE_SWAP_LENGTH 12 // (mm)
- #define SINGLENOZZLE_SWAP_RETRACT_SPEED 3600 // (mm/m)
- #define SINGLENOZZLE_SWAP_PRIME_SPEED 3600 // (mm/m)
- //#define SINGLENOZZLE_SWAP_PARK
- #if ENABLED(SINGLENOZZLE_SWAP_PARK)
- #define SINGLENOZZLE_TOOLCHANGE_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
- #define SINGLENOZZLE_PARK_XY_FEEDRATE 6000 // (mm/m)
- #endif
-#endif
/**
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
@@ -185,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -195,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -245,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -399,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -592,8 +623,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1001,6 +1033,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2034,7 +2069,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/ArmEd/Configuration_adv.h b/Marlin/src/config/examples/ArmEd/Configuration_adv.h
index 03c9ac49f2..7b4ccbff34 100644
--- a/Marlin/src/config/examples/ArmEd/Configuration_adv.h
+++ b/Marlin/src/config/examples/ArmEd/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -82,6 +82,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -377,18 +380,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -414,6 +426,27 @@
// Enable this if X or Y can't home without homing the other axis first.
//#define CODEPENDENT_XY_HOMING
+/**
+ * Z Steppers Auto-Alignment
+ * Add the G34 command to align multiple Z steppers using a bed probe.
+ */
+//#define Z_STEPPER_AUTO_ALIGN
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
+ // Define probe X and Y positions for Z1, Z2 [, Z3]
+ #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
+ #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
+ // Set number of iterations to align
+ #define Z_STEPPER_ALIGN_ITERATIONS 3
+ // Enable to restore leveling setup after operation
+ #define RESTORE_LEVELING_AFTER_G34
+ // Use the amplification factor to de-/increase correction step.
+ // In case the stepper (spindle) position is further out than the test point
+ // Use a value > 1. NOTE: This may cause instability
+ #define Z_STEPPER_ALIGN_AMP 1.0
+ // Stop criterion. If the accuracy is better than this stop iterating early
+ #define Z_STEPPER_ALIGN_ACC 0.02
+#endif
+
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -500,6 +533,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -508,6 +594,17 @@
*/
//#define ADAPTIVE_STEP_SMOOTHING
+/**
+ * Custom Microstepping
+ * Override as-needed for your setup. Up to 3 MS pins are supported.
+ */
+//#define MICROSTEP1 LOW,LOW,LOW
+//#define MICROSTEP2 HIGH,LOW,LOW
+//#define MICROSTEP4 LOW,HIGH,LOW
+//#define MICROSTEP8 HIGH,HIGH,LOW
+//#define MICROSTEP16 LOW,LOW,HIGH
+//#define MICROSTEP32 HIGH,LOW,HIGH
+
// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
@@ -601,7 +698,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -923,13 +1020,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1132,6 +1223,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1182,6 +1274,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1196,7 +1289,6 @@
//#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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
#endif
@@ -1210,124 +1302,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1346,6 +1503,7 @@
/**
* 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.
*/
@@ -1355,6 +1513,15 @@
//#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.
*/
@@ -1379,7 +1546,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1398,6 +1565,7 @@
#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.
@@ -1420,6 +1588,7 @@
#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.
@@ -1474,62 +1643,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1768,35 +2021,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1920,6 +2177,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
index 5d20a20139..5d2803d46d 100644
--- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
+++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
index fc197dd47b..49fde04163 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
index ebd34d1d7d..4ae8b0f5c5 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -372,18 +375,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -516,6 +528,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -628,7 +693,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -949,13 +1014,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1158,6 +1217,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1208,6 +1268,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1235,124 +1296,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1371,6 +1497,7 @@
/**
* 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.
*/
@@ -1380,6 +1507,15 @@
//#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.
*/
@@ -1404,7 +1540,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1423,6 +1559,7 @@
#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.
@@ -1445,6 +1582,7 @@
#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.
@@ -1499,62 +1637,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1793,35 +2015,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1945,6 +2171,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
index d40c88a5b6..c543d4de7f 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
index 6efff2e67c..d7c295f360 100644
--- a/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
+++ b/Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
index 7bce739734..29ced61ad8 100644
--- a/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
+++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -568,8 +610,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -977,6 +1020,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2010,7 +2056,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
index fa241ad966..e54f4aa611 100644
--- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
index d31635cf98..d42bea2d22 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -182,6 +182,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -192,25 +202,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -242,6 +279,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -396,7 +437,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -581,8 +623,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
index f231004c2a..2263a00994 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -637,7 +702,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -958,13 +1023,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1167,6 +1226,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1217,6 +1277,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1244,124 +1305,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1380,6 +1506,7 @@
/**
* 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.
*/
@@ -1389,6 +1516,15 @@
//#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.
*/
@@ -1413,7 +1549,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1432,6 +1568,7 @@
#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.
@@ -1454,6 +1591,7 @@
#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.
@@ -1508,62 +1646,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1802,35 +2024,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1954,6 +2180,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h b/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h
index 0e771c0c7f..5bc99616ea 100644
--- a/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h
+++ b/Marlin/src/config/examples/BQ/Hephestos_2/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
index 739fb8918a..828eb306c8 100644
--- a/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
+++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -568,8 +610,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -977,6 +1020,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2010,7 +2056,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
index fa241ad966..e54f4aa611 100644
--- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
+++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Cartesio/Configuration.h b/Marlin/src/config/examples/Cartesio/Configuration.h
index 22e73414a3..ef41990065 100644
--- a/Marlin/src/config/examples/Cartesio/Configuration.h
+++ b/Marlin/src/config/examples/Cartesio/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -175,6 +175,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -185,25 +195,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -235,6 +272,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -389,7 +430,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -579,8 +621,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -988,6 +1031,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2021,7 +2067,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h
index 1d016f0f38..1aae919239 100644
--- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h
+++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Cartesio/_Bootscreen.h b/Marlin/src/config/examples/Cartesio/_Bootscreen.h
index e0efd83767..c42a6fb37d 100644
--- a/Marlin/src/config/examples/Cartesio/_Bootscreen.h
+++ b/Marlin/src/config/examples/Cartesio/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration.h b/Marlin/src/config/examples/Creality/CR-10/Configuration.h
index 3dd5f0843c..3d1ca6c168 100644
--- a/Marlin/src/config/examples/Creality/CR-10/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -590,8 +632,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -999,6 +1042,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2032,7 +2078,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
index 2bb25d99f7..2789a36e26 100644
--- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1797,35 +2019,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1949,6 +2175,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Creality/CR-10/_Bootscreen.h b/Marlin/src/config/examples/Creality/CR-10/_Bootscreen.h
index d74e7ae9f9..45fdb622b1 100644
--- a/Marlin/src/config/examples/Creality/CR-10/_Bootscreen.h
+++ b/Marlin/src/config/examples/Creality/CR-10/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -52,4 +52,4 @@ const unsigned char custom_start_bmp[] PROGMEM = {
B00001111,B11000011,B11110000,B00000111,B11000000,B11111111,B11000111,B11111100,B01111111,B00000111,B10000001,B11000000,B00000000,B01111110,B00011111,B11000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B00000000,B00000000,B00000000,B00000000,B00000000
-};
\ No newline at end of file
+};
diff --git a/Marlin/src/config/examples/Creality/CR-10/_Statusscreen.h b/Marlin/src/config/examples/Creality/CR-10/_Statusscreen.h
index 9df6de9c10..1ae998fec8 100644
--- a/Marlin/src/config/examples/Creality/CR-10/_Statusscreen.h
+++ b/Marlin/src/config/examples/Creality/CR-10/_Statusscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
index 65e583c114..28fe01fbfc 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,9 +1032,12 @@
#define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
- #define FILAMENT_RUNOUT_SCRIPT "M600"
#define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+
// After a runout is detected, continue printing this length of filament
// before executing the runout script. Useful for a sensor at the end of
// a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
@@ -2023,7 +2069,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
index 73187c89cc..1e1f8d6478 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 4 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Creality/CR-10S/_Bootscreen.h b/Marlin/src/config/examples/Creality/CR-10S/_Bootscreen.h
index 38fb68f7da..45fdb622b1 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/_Bootscreen.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/CR-10S/_Statusscreen.h b/Marlin/src/config/examples/Creality/CR-10S/_Statusscreen.h
index b8b13e000c..75a820d586 100644
--- a/Marlin/src/config/examples/Creality/CR-10S/_Statusscreen.h
+++ b/Marlin/src/config/examples/Creality/CR-10S/_Statusscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
index 22562b5aac..9a996088a2 100644
--- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -183,6 +183,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -193,25 +203,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -243,6 +280,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -397,7 +438,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -599,8 +641,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -659,7 +702,7 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/
-#define DEFAULT_AXIS_STEPS_PER_UNIT { 79.60, 80, 400, 229.4 }
+#define DEFAULT_AXIS_STEPS_PER_UNIT { 79.60, 80, 400, 95 }
/**
* Default Max Feed Rate (mm/s)
@@ -1008,6 +1051,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2041,7 +2087,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
index 1c8675cb9f..2b19da8442 100644
--- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Creality/CR-10mini/_Bootscreen.h b/Marlin/src/config/examples/Creality/CR-10mini/_Bootscreen.h
index 38fb68f7da..45fdb622b1 100644
--- a/Marlin/src/config/examples/Creality/CR-10mini/_Bootscreen.h
+++ b/Marlin/src/config/examples/Creality/CR-10mini/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/CR-10mini/_Statusscreen.h b/Marlin/src/config/examples/Creality/CR-10mini/_Statusscreen.h
index 29353ad7e5..9b45f9a40f 100644
--- a/Marlin/src/config/examples/Creality/CR-10mini/_Statusscreen.h
+++ b/Marlin/src/config/examples/Creality/CR-10mini/_Statusscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration.h b/Marlin/src/config/examples/Creality/CR-8/Configuration.h
index a21dd75b6b..8188a67368 100644
--- a/Marlin/src/config/examples/Creality/CR-8/Configuration.h
+++ b/Marlin/src/config/examples/Creality/CR-8/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -590,8 +632,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -999,6 +1042,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2032,7 +2078,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
index 1e7448609f..bd17929974 100644
--- a/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
index da3da449f1..2737ef355d 100644
--- a/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
+++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -584,8 +626,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -993,6 +1036,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2026,7 +2072,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
index 0d4ccc9efc..903288ee74 100644
--- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Creality/Ender-2/_Bootscreen.h b/Marlin/src/config/examples/Creality/Ender-2/_Bootscreen.h
index 11be930e9c..c0cbe560c6 100644
--- a/Marlin/src/config/examples/Creality/Ender-2/_Bootscreen.h
+++ b/Marlin/src/config/examples/Creality/Ender-2/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/Ender-2/_Statusscreen.h b/Marlin/src/config/examples/Creality/Ender-2/_Statusscreen.h
index b8f474ee80..16a68c846e 100644
--- a/Marlin/src/config/examples/Creality/Ender-2/_Statusscreen.h
+++ b/Marlin/src/config/examples/Creality/Ender-2/_Statusscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h
index b64de5d24b..339ccbb970 100644
--- a/Marlin/src/config/examples/Creality/Ender-3/Configuration.h
+++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -584,8 +626,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -993,6 +1036,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2026,7 +2072,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
index 461a1b1e5a..422f4f86d5 100644
--- a/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Creality/Ender-3/_Bootscreen.h b/Marlin/src/config/examples/Creality/Ender-3/_Bootscreen.h
index 11be930e9c..c0cbe560c6 100644
--- a/Marlin/src/config/examples/Creality/Ender-3/_Bootscreen.h
+++ b/Marlin/src/config/examples/Creality/Ender-3/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/Ender-3/_Statusscreen.h b/Marlin/src/config/examples/Creality/Ender-3/_Statusscreen.h
index 285711236a..a85edcda22 100644
--- a/Marlin/src/config/examples/Creality/Ender-3/_Statusscreen.h
+++ b/Marlin/src/config/examples/Creality/Ender-3/_Statusscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
index e127c10ec0..4b3b3b8dfb 100644
--- a/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
+++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -590,8 +632,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -999,6 +1042,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2032,7 +2078,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
index c895b5af26..cc95809880 100644
--- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
+++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Einstart-S/Configuration.h b/Marlin/src/config/examples/Einstart-S/Configuration.h
index 2c961fa43b..bc2cf97ff7 100644
--- a/Marlin/src/config/examples/Einstart-S/Configuration.h
+++ b/Marlin/src/config/examples/Einstart-S/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -390,7 +431,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -592,8 +634,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -999,6 +1042,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2028,7 +2074,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h
index 03b9f5fd71..c18d0820d1 100644
--- a/Marlin/src/config/examples/Einstart-S/Configuration_adv.h
+++ b/Marlin/src/config/examples/Einstart-S/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Felix/Configuration.h b/Marlin/src/config/examples/Felix/Configuration.h
index 2b5ab1e692..8d7a03c8d5 100644
--- a/Marlin/src/config/examples/Felix/Configuration.h
+++ b/Marlin/src/config/examples/Felix/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -561,8 +603,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -971,6 +1014,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2004,7 +2050,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h
index c81d8b0837..415887097e 100644
--- a/Marlin/src/config/examples/Felix/Configuration_adv.h
+++ b/Marlin/src/config/examples/Felix/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Felix/DUAL/Configuration.h b/Marlin/src/config/examples/Felix/DUAL/Configuration.h
index 4b4de40af5..48a72b0617 100644
--- a/Marlin/src/config/examples/Felix/DUAL/Configuration.h
+++ b/Marlin/src/config/examples/Felix/DUAL/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -561,8 +603,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -971,6 +1014,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2004,7 +2050,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h b/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h
index d92a2f9dc1..5a683e5562 100644
--- a/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h
+++ b/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -570,8 +612,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -982,6 +1025,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -1715,7 +1761,7 @@
//
//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
//
//#define SAV_3DLCD
diff --git a/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h b/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h
index b028bf2d39..c745320ae9 100644
--- a/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h
+++ b/Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -77,6 +77,11 @@
#define THERMAL_PROTECTION_PERIOD 40 // Seconds
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+ //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
+
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
* firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
@@ -245,9 +250,6 @@
#define CHAMBER_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
-//
-//#define E0_AUTO_FAN E0_AUTO_FAN_PIN
-//#define E1_AUTO_FAN E1_AUTO_FAN_PIN
/**
* Part-Cooling Fan Multiplexer
@@ -374,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -518,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +693,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -894,7 +958,6 @@
#if ENABLED(MOVE_Z_WHEN_IDLE)
#define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
#endif
-
//#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
@@ -951,13 +1014,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1217,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1268,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1296,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1497,7 @@
/**
* 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.
*/
@@ -1382,6 +1507,15 @@
//#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.
*/
@@ -1406,7 +1540,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1559,7 @@
#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.
@@ -1447,6 +1582,7 @@
#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.
@@ -1480,22 +1616,6 @@
*/
//#define TMC_DEBUG
- /**
- * M915 Z Axis Calibration
- *
- * - Adjust Z stepper current,
- * - Drive the Z axis to its physical maximum, and
- * - Home Z to account for the lost steps.
- *
- * Use M915 Snn to specify the current.
- * Use M925 Znn to add extra Z height to Z_MAX_POS.
- */
- //#define TMC_Z_CALIBRATION
- #if ENABLED(TMC_Z_CALIBRATION)
- #define CALIBRATION_CURRENT 250
- #define CALIBRATION_EXTRA_HEIGHT 10
- #endif
-
/**
* 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
@@ -1517,62 +1637,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1708,11 +1912,6 @@
*/
//#define CNC_COORDINATE_SYSTEMS
-/**
- * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
- */
-#define PINS_DEBUGGING
-
/**
* Auto-report temperatures with M155 S
*/
@@ -1816,35 +2015,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1968,5 +2171,79 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
+// @section develop
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
// Enable Marlin dev mode which adds some special commands
//#define MARLIN_DEV_MODE
diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
index e346ccf2af..14a92f2329 100644
--- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
+++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -585,8 +627,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -995,6 +1038,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2028,7 +2074,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
index 850af77a4d..1a474f4ddf 100644
--- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
+++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1954,12 +2180,79 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/
-#define PINS_DEBUGGING
+//#define PINS_DEBUGGING
// Enable Marlin dev mode which adds some special commands
//#define MARLIN_DEV_MODE
diff --git a/Marlin/src/config/examples/Formbot/Raptor/Configuration.h b/Marlin/src/config/examples/Formbot/Raptor/Configuration.h
index 178327dadd..01b87ac318 100644
--- a/Marlin/src/config/examples/Formbot/Raptor/Configuration.h
+++ b/Marlin/src/config/examples/Formbot/Raptor/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -215,6 +215,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -225,25 +235,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -275,6 +312,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -435,7 +476,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -632,8 +674,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1087,6 +1130,9 @@
#define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2127,7 +2173,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h b/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
index f3f1dffff5..8012b43abf 100644
--- a/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
+++ b/Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1798,35 +2020,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-#define ACTION_ON_PAUSE "pause"
-#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1950,12 +2176,79 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
* M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
*/
-#define PINS_DEBUGGING
+//#define PINS_DEBUGGING
// Enable Marlin dev mode which adds some special commands
//#define MARLIN_DEV_MODE
diff --git a/Marlin/src/config/examples/Formbot/Raptor/_Bootscreen.h b/Marlin/src/config/examples/Formbot/Raptor/_Bootscreen.h
index 13da762696..6a0923258d 100644
--- a/Marlin/src/config/examples/Formbot/Raptor/_Bootscreen.h
+++ b/Marlin/src/config/examples/Formbot/Raptor/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Formbot/Raptor/_Statusscreen.h b/Marlin/src/config/examples/Formbot/Raptor/_Statusscreen.h
index d0450837ab..c1d862cb72 100644
--- a/Marlin/src/config/examples/Formbot/Raptor/_Statusscreen.h
+++ b/Marlin/src/config/examples/Formbot/Raptor/_Statusscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h
index 5007f54d9e..0cfdf956ee 100644
--- a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h
+++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -177,6 +177,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -187,25 +197,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -237,6 +274,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -403,7 +444,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -609,8 +651,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1019,6 +1062,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2057,7 +2103,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
index e7dc8678f5..6ce377cd73 100644
--- a/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
+++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -377,15 +380,24 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
@@ -521,6 +533,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -633,7 +698,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -955,13 +1020,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1164,6 +1223,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1214,6 +1274,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 0 // (mm) Unload initial retract length.
@@ -1241,124 +1302,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1377,6 +1503,7 @@
/**
* 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.
*/
@@ -1386,6 +1513,15 @@
//#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.
*/
@@ -1410,7 +1546,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1429,6 +1565,7 @@
#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.
@@ -1451,6 +1588,7 @@
#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.
@@ -1505,62 +1643,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1799,35 +2021,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-#define ACTION_ON_PAUSE "pause"
-#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1961,6 +2187,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/_Bootscreen.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/_Bootscreen.h
index c2333ed4cf..880950a7b1 100644
--- a/Marlin/src/config/examples/Formbot/T_Rex_2+/_Bootscreen.h
+++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Formbot/T_Rex_2+/_Statusscreen.h b/Marlin/src/config/examples/Formbot/T_Rex_2+/_Statusscreen.h
index 689b1c947f..4197cbb482 100644
--- a/Marlin/src/config/examples/Formbot/T_Rex_2+/_Statusscreen.h
+++ b/Marlin/src/config/examples/Formbot/T_Rex_2+/_Statusscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h
index 36017b8f20..7006fc8658 100644
--- a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h
+++ b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -178,6 +178,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -188,25 +198,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -238,6 +275,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -397,7 +438,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -589,8 +631,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1014,6 +1057,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2050,7 +2096,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
index ba25ab7134..9191033abc 100644
--- a/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
+++ b/Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -386,7 +389,6 @@
// Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
// actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
// once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
- // Mode 3 (DXC_SCALED_DUPLICATION_MODE) : Not working yet, but support routines in place
// This is the default power-up mode which can be later using M605.
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
@@ -522,6 +524,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -634,7 +689,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -955,13 +1010,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1164,6 +1213,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1214,6 +1264,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 0 // (mm) Unload initial retract length.
@@ -1241,124 +1292,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1377,6 +1493,7 @@
/**
* 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.
*/
@@ -1386,6 +1503,15 @@
//#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.
*/
@@ -1410,7 +1536,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1429,6 +1555,7 @@
#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.
@@ -1451,6 +1578,7 @@
#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.
@@ -1505,62 +1633,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2006,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-#define ACTION_ON_PAUSE "pause"
-#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1956,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/_Bootscreen.h b/Marlin/src/config/examples/Formbot/T_Rex_3/_Bootscreen.h
index ad09d3523b..90cfd306e7 100644
--- a/Marlin/src/config/examples/Formbot/T_Rex_3/_Bootscreen.h
+++ b/Marlin/src/config/examples/Formbot/T_Rex_3/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Formbot/T_Rex_3/_Statusscreen.h b/Marlin/src/config/examples/Formbot/T_Rex_3/_Statusscreen.h
index 689b1c947f..4197cbb482 100644
--- a/Marlin/src/config/examples/Formbot/T_Rex_3/_Statusscreen.h
+++ b/Marlin/src/config/examples/Formbot/T_Rex_3/_Statusscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Geeetech/A10M/Configuration.h b/Marlin/src/config/examples/Geeetech/A10M/Configuration.h
new file mode 100644
index 0000000000..b83bafde2b
--- /dev/null
+++ b/Marlin/src/config/examples/Geeetech/A10M/Configuration.h
@@ -0,0 +1,2083 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// config/examples/delta directory and customize for your machine.
+//
+
+//===========================================================================
+//============================= SCARA Printer ===============================
+//===========================================================================
+// For a SCARA printer start with the configuration files in
+// config/examples/SCARA and customize for your machine.
+//
+
+// @section info
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Serial port -1 is the USB emulated serial port, if available.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 250000
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_GT2560_V3
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "Geeetech A10M"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5, 6]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
+#endif
+
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
+#endif
+
+/**
+ * Switching Toolhead
+ *
+ * Support for swappable and dockable toolheads, such as
+ * the E3D Tool Changer. Toolheads are locked with a servo.
+ */
+//#define SWITCHING_TOOLHEAD
+#if ENABLED(SWITCHING_TOOLHEAD)
+ #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector
+ #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock
+ #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock
+ #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis
+ #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis
+ #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
+ * - This implementation supports up to two mixing extruders.
+ * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ */
+#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ #define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ #define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 20.00} // (mm) relative X-offset for each nozzle
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (mm) relative Y-offset for each nozzle
+//#define HOTEND_OFFSET_Z {0.0, 0.00} // (mm) relative Z-offset for each nozzle
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 1
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_5 0
+#define TEMP_SENSOR_BED 1
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define HEATER_5_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define HEATER_5_MAXTEMP 275
+#define BED_MAXTEMP 150
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // A10M [@thinkyhead]
+ #define DEFAULT_Kp 45.80
+ #define DEFAULT_Ki 3.61
+ #define DEFAULT_Kd 145.39
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * 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 BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ // MeCreator2 generated by Autotune
+ #define DEFAULT_bedKp 182.46 // 175.68 189.95
+ #define DEFAULT_bedKi 35.92 // 34.59 37.40
+ #define DEFAULT_bedKd 231.70 // 223.07 241.19
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
+ * Add M302 to set the minimum extrusion temperature and/or turn
+ * cold extrusion prevention on and off.
+ *
+ * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 450
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= 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
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// Enable pulldown for all endstops to prevent a floating state
+//#define ENDSTOPPULLDOWNS
+#if DISABLED(ENDSTOPPULLDOWNS)
+ // Disable ENDSTOPPULLDOWNS to set pulldowns individually
+ //#define ENDSTOPPULLDOWN_XMAX
+ //#define ENDSTOPPULLDOWN_YMAX
+ //#define ENDSTOPPULLDOWN_ZMAX
+ //#define ENDSTOPPULLDOWN_XMIN
+ //#define ENDSTOPPULLDOWN_YMIN
+ //#define ENDSTOPPULLDOWN_ZMIN
+ //#define ENDSTOPPULLDOWN_ZMIN_PROBE
+#endif
+
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
+#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 true // set to true to invert the logic of the probe.
+
+/**
+ * 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 A4988
+//#define Y_DRIVER_TYPE A4988
+//#define Z_DRIVER_TYPE A4988
+//#define X2_DRIVER_TYPE A4988
+//#define Y2_DRIVER_TYPE A4988
+//#define Z2_DRIVER_TYPE A4988
+//#define Z3_DRIVER_TYPE A4988
+//#define E0_DRIVER_TYPE A4988
+//#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
+
+// Enable this feature if all enabled endstop pins are interrupt-capable.
+// This will remove the need to poll the interrupt pins, saving many CPU cycles.
+//#define ENDSTOP_INTERRUPTS_FEATURE
+
+/**
+ * Endstop Noise Threshold
+ *
+ * Enable if your probe or endstops falsely trigger due to noise.
+ *
+ * - Higher values may affect repeatability or accuracy of some bed probes.
+ * - To fix noise install a 100nF ceramic capacitor inline with the switch.
+ * - This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, which already have the 100nF capacitor.
+ *
+ * :[2,3,4,5,6,7]
+ */
+//#define ENDSTOP_NOISE_THRESHOLD 2
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * 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 { 80.3, 80.8, 400, 340 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 400, 400, 40, 45 }
+
+/**
+ * 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 { 5000, 5000, 40, 5000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * 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 1000 // X, Y, Z acceleration for travel (non printing) moves
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#if DISABLED(JUNCTION_DEVIATION)
+ #define DEFAULT_XJERK 10.0
+ #define DEFAULT_YJERK 10.0
+ #define DEFAULT_ZJERK 0.4
+#endif
+
+#define DEFAULT_EJERK 5.0 // May be used by Linear Advance
+
+/**
+ * S-Curve Acceleration
+ *
+ * This option eliminates vibration during printing by fitting a Bézier
+ * curve to move acceleration, producing much smoother direction changes.
+ *
+ * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
+ */
+//#define S_CURVE_ACCELERATION
+
+//===========================================================================
+//============================= Z Probe Options =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+#define PROBE_MANUALLY
+#define MANUAL_PROBE_START_Z 0.2
+
+/**
+ * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
+ * (e.g., an inductive probe or a nozzle-based probe-switch.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice.
+//#define RACK_AND_PINION_PROBE
+#if ENABLED(RACK_AND_PINION_PROBE)
+ #define Z_PROBE_DEPLOY_X X_MIN_POS
+ #define Z_PROBE_RETRACT_X X_MAX_POS
+#endif
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER -37 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.5 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
+//#define Z_AFTER_PROBING 5 // Z position after probing is done
+
+#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
+
+// For M851 give a range for adjusting the Z probe offset
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// Before deploy/stow pause for user confirmation
+//#define PAUSE_BEFORE_DEPLOY_STOW
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ #define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+#define PROBING_FANS_OFF // Turn fans off when probing
+//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
+#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#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_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+#define INVERT_E5_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 220
+#define Y_BED_SIZE 220
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS -10
+#define Y_MIN_POS -5
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 260
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 2 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_PIN 66
+ #define FIL_RUNOUT2_PIN 67
+ #define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensors.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // After a runout is detected, continue printing this length of filament
+ // before executing the runout script. Useful for a sensor at the end of
+ // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
+ //#define FILAMENT_RUNOUT_DISTANCE_MM 25
+
+ #ifdef FILAMENT_RUNOUT_DISTANCE_MM
+ // Enable this option to use an encoder disc that toggles the runout pin
+ // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
+ // large enough to avoid false positives.)
+ //#define FILAMENT_MOTION_SENSOR
+ #endif
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 5
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE))
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE))
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
+ */
+#define LCD_BED_LEVELING
+
+#if ENABLED(LCD_BED_LEVELING)
+ #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
+ //#define MESH_EDIT_MENU // Add a menu to edit mesh points
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// 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_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+//#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (100*60)
+#define HOMING_FEEDRATE_Z (20*60)
+
+// Validate that endstops are triggered on homing moves
+#define VALIDATE_HOMING_ENDSTOPS
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_LABEL "PLA"
+#define PREHEAT_1_TEMP_HOTEND 190
+#define PREHEAT_1_TEMP_BED 60
+#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
+
+#define PREHEAT_2_LABEL "ABS"
+#define PREHEAT_2_TEMP_HOTEND 240
+#define PREHEAT_2_TEMP_BED 90
+#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * 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
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { 3, 3, 10 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+//#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 JAPANESE
+
+/**
+ * Info Screen Style (0:Classic, 1:Prusa)
+ *
+ * :[0:'Classic', 1:'Prusa']
+ */
+#define LCD_INFO_SCREEN_STYLE 0
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * LCD Menu Items
+ *
+ * Disable all menus and only display the Status Screen, or
+ * just remove some extraneous menu items to recover space.
+ */
+//#define NO_LCD_MENUS
+//#define SLIM_LCD_MENUS
+
+//
+// ENCODER SETTINGS
+//
+// 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 2
+
+//
+// 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
+
+/**
+ * Encoder Direction Options
+ *
+ * Test your encoder's behavior first with both options disabled.
+ *
+ * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
+ * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION.
+ * Reversed Value Editing only? Enable BOTH options.
+ */
+
+//
+// This option reverses the encoder direction everywhere.
+//
+// Set this option if CLOCKWISE causes values to DECREASE
+//
+//#define REVERSE_ENCODER_DIRECTION
+
+//
+// This option reverses the encoder direction for navigating LCD menus.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
+//
+// Original RADDS LCD Display+Encoder+SDCardReader
+// http://doku.radds.org/dokumentation/lcd-display/
+//
+//#define RADDS_DISPLAY
+
+//
+// ULTIMAKER Controller.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// RigidBot Panel V1.0
+// http://www.inventapart.com/
+//
+//#define RIGIDBOT_PANEL
+
+//
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// ANET and Tronxy 20x4 Controller
+//
+//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
+ // This LCD is known to be susceptible to electrical interference
+ // which scrambles the display. Pressing any button clears it up.
+ // This is a LCD2004 display with 5 analog buttons.
+
+//
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+//
+//#define ULTRA_LCD
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: I2C
+//
+// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C
+// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C
+//
+
+//
+// Elefu RA Board Control Panel
+// http://www.elefu.com/index.php?route=product/product&product_id=53
+//
+//#define RA_CONTROL_PANEL
+
+//
+// Sainsmart (YwRobot) LCD Displays
+//
+// These require F.Malpartida's LiquidCrystal_I2C library
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
+//
+//#define LCD_SAINSMART_I2C_1602
+//#define LCD_SAINSMART_I2C_2004
+
+//
+// Generic LCM1602 LCD adapter
+//
+//#define LCM1602
+
+//
+// PANELOLU2 LCD with status LEDs,
+// separate encoder and click inputs.
+//
+// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later.
+// For more info: https://github.com/lincomatic/LiquidTWI2
+//
+// Note: The PANELOLU2 encoder click input can either be directly connected to
+// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
+//
+//#define LCD_I2C_PANELOLU2
+
+//
+// Panucatt VIKI LCD with status LEDs,
+// integrated click & L/R/U/D buttons, separate encoder inputs.
+//
+//#define LCD_I2C_VIKI
+
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//
+// 3-wire SR LCD with strobe using 74HC4094
+// https://github.com/mikeshub/SailfishLCD
+// Uses the code directly from Sailfish
+//
+//#define FF_INTERFACEBOARD
+
+//=============================================================================
+//======================= LCD / Controller Selection =======================
+//========================= (Graphical LCDs) ========================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Graphical 128x64 (DOGM)
+//
+// IMPORTANT: The U8glib library is required for Graphical Display!
+// https://github.com/olikraus/U8glib_Arduino
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
+//
+//#define BQ_LCD_SMART_CONTROLLER
+
+//
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+// A clone of the RepRapDiscount full graphics display but with
+// different pins/wiring (see pins_ANET_10.h).
+//
+//#define ANET_FULL_GRAPHICS_LCD
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//
+// Extensible UI
+//
+// Enable third-party or vendor customized user interfaces that aren't
+// packaged with Marlin. Source code for the user interface will need to
+// be placed in "src/lcd/extensible_ui/lib"
+//
+//#define EXTENSIBLE_UI
+
+//=============================================================================
+//=============================== Graphical TFTs ==============================
+//=============================================================================
+
+//
+// MKS Robin 320x240 color display
+//
+//#define MKS_ROBIN_TFT
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+// Support for PCA9533 PWM LED driver
+// https://github.com/mikeshub/SailfishRGB_LED
+//#define PCA9533
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * as the Arduino cannot handle the current the LEDs will require.
+ * Failure to follow this precaution can destroy your Arduino!
+ * NOTE: A separate 5V power supply is required! The Neopixel LED needs
+ * more current than the Arduino 5V linear regulator can produce.
+ * *** CAUTION ***
+ *
+ * LED Type. Enable only one of the following two options.
+ *
+ */
+//#define RGB_LED
+//#define RGBW_LED
+
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Only power servos during movement, otherwise leave off to prevent jitter
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+// Allow servo angle to be edited and saved to EEPROM
+//#define EDITABLE_SERVO_ANGLES
diff --git a/Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h
new file mode 100644
index 0000000000..084be1eb53
--- /dev/null
+++ b/Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h
@@ -0,0 +1,2251 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 20 // Seconds
+ #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m)
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm)
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+//#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// 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
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * 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 -1
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define E5_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // 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 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)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+// Employ an external closed loop controller. Override pins here if needed.
+//#define EXTERNAL_CLOSED_LOOP_CONTROLLER
+#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
+ //#define CLOSED_LOOP_ENABLE_PIN -1
+ //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
+#endif
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_TRIPLE_STEPPER_DRIVERS
+#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
+ //#define Z_TRIPLE_ENDSTOPS
+ #if ENABLED(Z_TRIPLE_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z3_USE_ENDSTOP _YMAX_
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0
+ #endif
+#endif
+
+/**
+ * Dual X Carriage
+ *
+ * This setup has two X carriages that can move independently, each with its own hotend.
+ * The carriages can be used to print an object with two colors or materials, or in
+ * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
+ * The inactive carriage is parked automatically to prevent oozing.
+ * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
+ * By default the X2 stepper is assigned to the first unused E plug on the board.
+ */
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
+ #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+/**
+ * Z Steppers Auto-Alignment
+ * Add the G34 command to align multiple Z steppers using a bed probe.
+ */
+//#define Z_STEPPER_AUTO_ALIGN
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
+ // Define probe X and Y positions for Z1, Z2 [, Z3]
+ #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
+ #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
+ // Set number of iterations to align
+ #define Z_STEPPER_ALIGN_ITERATIONS 3
+ // Enable to restore leveling setup after operation
+ #define RESTORE_LEVELING_AFTER_G34
+ // Use the amplification factor to de-/increase correction step.
+ // In case the stepper (spindle) position is further out than the test point
+ // Use a value > 1. NOTE: This may cause instability
+ #define Z_STEPPER_ALIGN_AMP 1.0
+ // Stop criterion. If the accuracy is better than this stop iterating early
+ #define Z_STEPPER_ALIGN_ACC 0.02
+#endif
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s)
+
+//
+// Backlash Compensation
+// Adds extra movement to axes on direction-changes to account for backlash.
+//
+//#define BACKLASH_COMPENSATION
+#if ENABLED(BACKLASH_COMPENSATION)
+ // Define values for backlash distance and correction.
+ // If BACKLASH_GCODE is enabled these values are the defaults.
+ #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
+ #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
+
+ // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
+ // to reduce print artifacts. (Enabling this is costly in memory and computation!)
+ //#define BACKLASH_SMOOTHING_MM 3 // (mm)
+
+ // Add runtime configuration and tuning of backlash values (M425)
+ //#define BACKLASH_GCODE
+
+ #if ENABLED(BACKLASH_GCODE)
+ // Measure the Z backlash when probing (G29) and set with "M425 Z"
+ #define MEASURE_BACKLASH_WHEN_PROBING
+
+ #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
+ // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
+ // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
+ // increments while checking for the contact to be broken.
+ #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm)
+ #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm)
+ #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m)
+ #endif
+ #endif
+#endif
+
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+/**
+ * Custom Microstepping
+ * Override as-needed for your setup. Up to 3 MS pins are supported.
+ */
+//#define MICROSTEP1 LOW,LOW,LOW
+//#define MICROSTEP2 HIGH,LOW,LOW
+//#define MICROSTEP4 LOW,HIGH,LOW
+//#define MICROSTEP8 HIGH,HIGH,LOW
+//#define MICROSTEP16 LOW,LOW,HIGH
+//#define MICROSTEP32 HIGH,LOW,HIGH
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+// @section lcd
+
+// Change values more rapidly when the encoder is rotated faster
+#define ENCODER_RATE_MULTIPLIER
+#if ENABLED(ENCODER_RATE_MULTIPLIER)
+ #define ENCODER_10X_STEPS_PER_SEC 10 // (steps/s) Encoder rate for 10x speed
+ #define ENCODER_100X_STEPS_PER_SEC 50 // (steps/s) Encoder rate for 100x speed
+#endif
+
+// Play a beep when the feedrate is changed from the Status Screen
+//#define BEEP_ON_FEEDRATE_CHANGE
+#if ENABLED(BEEP_ON_FEEDRATE_CHANGE)
+ #define FEEDRATE_CHANGE_BEEP_DURATION 10
+ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
+#endif
+
+// Include a page of printer information in the LCD Main Menu
+#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
+ #define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 180000 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ #define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ #define POWER_LOSS_PIN 69 // Pin to detect power loss
+ #define POWER_LOSS_STATE LOW // State of pin indicating power loss
+ #endif
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ #define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM true // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK true // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ //#define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ //#define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+ /**
+ * Support for USB thumb drives using an Arduino USB Host Shield or
+ * equivalent MAX3421E breakout board. The USB thumb drive will appear
+ * to Marlin as an SD card.
+ *
+ * The MAX3421E must be assigned the same pins as the SD card reader, with
+ * the following pin mapping:
+ *
+ * SCLK, MOSI, MISO --> SCLK, MOSI, MISO
+ * INT --> SD_DETECT_PIN
+ * SS --> SDSS
+ */
+ //#define USB_FLASH_DRIVE_SUPPORT
+ #if ENABLED(USB_FLASH_DRIVE_SUPPORT)
+ #define USB_CS_PIN SDSS
+ #define USB_INTR_PIN SD_DETECT_PIN
+ #endif
+
+ /**
+ * When using a bootloader that supports SD-Firmware-Flashing,
+ * add a menu item to activate SD-FW-Update on the next reboot.
+ *
+ * Requires ATMEGA2560 (Arduino Mega)
+ *
+ * Tested with this bootloader:
+ * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560
+ */
+ //#define SD_FIRMWARE_UPDATE
+ #if ENABLED(SD_FIRMWARE_UPDATE)
+ #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF
+ #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0
+ #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF
+ #endif
+
+ // Add an optimized binary file transfer mode, initiated with 'M28 B1'
+ //#define FAST_FILE_TRANSFER
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if HAS_GRAPHICAL_LCD
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ #if ENABLED(U8GLIB_ST7920)
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+ /**
+ * Status (Info) Screen customizations
+ * These options may affect code size and screen render time.
+ * Custom status screens can forcibly override these settings.
+ */
+ //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones
+ //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends)
+ #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM)
+ #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
+ #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
+ //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
+ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
+ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
+ //#define STATUS_HEAT_PERCENT // Show heating in a progress bar
+
+#endif // HAS_GRAPHICAL_LCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+
+ #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ #endif
+
+ #define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
+ #if ENABLED(MOVE_Z_WHEN_IDLE)
+ #define MOVE_Z_IDLE_MULTIPLICATOR 5 // Multiply 1mm by this factor for the move step size.
+ #endif
+
+ //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
+ #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
+ //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+ #endif
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * 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
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 400 : Minimum for A5984 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// 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
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// Printrun may have trouble receiving long strings all at once.
+// This option inserts short delays between lines of serial output.
+#define SERIAL_OVERRUN_PROTECTION
+
+// @section extras
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT
+#if ENABLED(FWRETRACT)
+ #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM
+ #if ENABLED(FWRETRACT_AUTORETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #endif
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm)
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+ #if ENABLED(MIXING_EXTRUDER)
+ //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously
+ #endif
+#endif
+
+/**
+ * Universal tool change settings.
+ * Applies to all types of extruders except where explicitly noted.
+ */
+#if EXTRUDERS > 1
+ // Z raise distance for tool-change, as needed for some extruders
+ #define TOOLCHANGE_ZRAISE 2 // (mm)
+
+ // Retract and prime filament on tool-change
+ //#define TOOLCHANGE_FILAMENT_SWAP
+ #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
+ #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
+ #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
+ #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
+ #endif
+
+ /**
+ * Position to park head during tool change.
+ * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
+ */
+ //#define TOOLCHANGE_PARK
+ #if ENABLED(TOOLCHANGE_PARK)
+ #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
+ #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m)
+ #endif
+#endif
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+#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.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 18 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 450 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 12 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 450 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 40 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #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 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
+ */
+#if HAS_DRIVER(TMC26X)
+
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
+
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
+
+#endif // TMC26X
+
+// @section tmc_smart
+
+/**
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * TMCStepper library is required to use TMC stepper drivers.
+ * https://github.com/teemuatlut/TMCStepper
+ */
+#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 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
+
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
+
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #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 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #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 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #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_12V
+
+ /**
+ * 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 S0/1 - 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 ENABLED(SENSORLESS_HOMING) || ENABLED(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/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // HAS_TRINAMIC
+
+// @section L6470
+
+/**
+ * L6470 Stepper Driver options
+ *
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
+ */
+#if HAS_DRIVER(L6470)
+
+ //#define L6470_CHITCHAT // Display additional status info
+
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
+
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
+
+#endif // L6470
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Canon Hack Development Kit
+ * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+ */
+//#define CHDK_PIN 4 // Set and enable a pin for triggering CHDK to take a picture
+#if PIN_EXISTS(CHDK)
+ #define CHDK_DELAY 50 // (ms) How long the pin should remain HIGH
+#endif
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * CNC G-code options
+ * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
+ * Note that G0 feedrates should be used with care for 3D printing (if used at all).
+ * High feedrates may cause ringing and harm print quality.
+ */
+//#define PAREN_COMMENTS // Support for parentheses-delimited comments
+//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
+
+// Enable and set a (default) feedrate for all G0 moves
+//#define G0_FEEDRATE 3000 // (mm/m)
+#ifdef G0_FEEDRATE
+ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
+#endif
+
+/**
+ * G-code Macros
+ *
+ * Add G-codes M810-M819 to define and run G-code macros.
+ * Macros are not saved to EEPROM.
+ */
+//#define GCODE_MACROS
+#if ENABLED(GCODE_MACROS)
+ #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
+ #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
+#endif
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ //#define CUSTOM_USER_MENU_TITLE "Custom Commands"
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
+ */
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reliabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
+ //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
+// @section develop
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
diff --git a/Marlin/src/config/examples/Geeetech/A20M/Configuration.h b/Marlin/src/config/examples/Geeetech/A20M/Configuration.h
new file mode 100644
index 0000000000..ccb2813a9e
--- /dev/null
+++ b/Marlin/src/config/examples/Geeetech/A20M/Configuration.h
@@ -0,0 +1,2087 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// config/examples/delta directory and customize for your machine.
+//
+
+//===========================================================================
+//============================= SCARA Printer ===============================
+//===========================================================================
+// For a SCARA printer start with the configuration files in
+// config/examples/SCARA and customize for your machine.
+//
+
+// @section info
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
+#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Serial port -1 is the USB emulated serial port, if available.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 115200
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_GT2560_V3_A20
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "Geeetech A20M"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5, 6]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
+#endif
+
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
+#endif
+
+/**
+ * Switching Toolhead
+ *
+ * Support for swappable and dockable toolheads, such as
+ * the E3D Tool Changer. Toolheads are locked with a servo.
+ */
+//#define SWITCHING_TOOLHEAD
+#if ENABLED(SWITCHING_TOOLHEAD)
+ #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector
+ #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock
+ #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock
+ #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis
+ #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis
+ #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
+ * - This implementation supports up to two mixing extruders.
+ * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ */
+#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ #define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ #define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 20.00} // (mm) relative X-offset for each nozzle
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (mm) relative Y-offset for each nozzle
+//#define HOTEND_OFFSET_Z {0.0, 0.00} // (mm) relative Z-offset for each nozzle
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 0
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 1
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_5 0
+#define TEMP_SENSOR_BED 1
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define HEATER_5_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 275
+#define HEATER_1_MAXTEMP 275
+#define HEATER_2_MAXTEMP 275
+#define HEATER_3_MAXTEMP 275
+#define HEATER_4_MAXTEMP 275
+#define HEATER_5_MAXTEMP 275
+#define BED_MAXTEMP 150
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // A20M [@thinkyhead]
+ #define DEFAULT_Kp 45.80
+ #define DEFAULT_Ki 3.61
+ #define DEFAULT_Kd 145.39
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * 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 BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ // MeCreator2 generated by Autotune
+ #define DEFAULT_bedKp 182.46 // 175.68 189.95
+ #define DEFAULT_bedKi 35.92 // 34.59 37.40
+ #define DEFAULT_bedKd 231.70 // 223.07 241.19
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
+ * Add M302 to set the minimum extrusion temperature and/or turn
+ * cold extrusion prevention on and off.
+ *
+ * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 400
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= 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
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// Enable pulldown for all endstops to prevent a floating state
+//#define ENDSTOPPULLDOWNS
+#if DISABLED(ENDSTOPPULLDOWNS)
+ // Disable ENDSTOPPULLDOWNS to set pulldowns individually
+ //#define ENDSTOPPULLDOWN_XMAX
+ //#define ENDSTOPPULLDOWN_YMAX
+ //#define ENDSTOPPULLDOWN_ZMAX
+ //#define ENDSTOPPULLDOWN_XMIN
+ //#define ENDSTOPPULLDOWN_YMIN
+ //#define ENDSTOPPULLDOWN_ZMIN
+ //#define ENDSTOPPULLDOWN_ZMIN_PROBE
+#endif
+
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
+#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 true // set to true to invert the logic of the probe.
+
+/**
+ * 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 A4988
+//#define Y_DRIVER_TYPE A4988
+//#define Z_DRIVER_TYPE A4988
+//#define X2_DRIVER_TYPE A4988
+//#define Y2_DRIVER_TYPE A4988
+//#define Z2_DRIVER_TYPE A4988
+//#define Z3_DRIVER_TYPE A4988
+//#define E0_DRIVER_TYPE A4988
+//#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
+
+// Enable this feature if all enabled endstop pins are interrupt-capable.
+// This will remove the need to poll the interrupt pins, saving many CPU cycles.
+//#define ENDSTOP_INTERRUPTS_FEATURE
+
+/**
+ * Endstop Noise Threshold
+ *
+ * Enable if your probe or endstops falsely trigger due to noise.
+ *
+ * - Higher values may affect repeatability or accuracy of some bed probes.
+ * - To fix noise install a 100nF ceramic capacitor inline with the switch.
+ * - This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, which already have the 100nF capacitor.
+ *
+ * :[2,3,4,5,6,7]
+ */
+//#define ENDSTOP_NOISE_THRESHOLD 2
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * 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 { 80.3, 80.8, 400, 340 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 400, 400, 40, 45 }
+
+/**
+ * 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 { 5000, 5000, 40, 5000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * 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 1000 // X, Y, Z acceleration for travel (non printing) moves
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#if DISABLED(JUNCTION_DEVIATION)
+ #define DEFAULT_XJERK 10.0
+ #define DEFAULT_YJERK 10.0
+ #define DEFAULT_ZJERK 0.4
+#endif
+
+#define DEFAULT_EJERK 5.0 // May be used by Linear Advance
+
+/**
+ * S-Curve Acceleration
+ *
+ * This option eliminates vibration during printing by fitting a Bézier
+ * curve to move acceleration, producing much smoother direction changes.
+ *
+ * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
+ */
+//#define S_CURVE_ACCELERATION
+
+//===========================================================================
+//============================= Z Probe Options =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+#define PROBE_MANUALLY
+#define MANUAL_PROBE_START_Z 0.2
+
+/**
+ * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
+ * (e.g., an inductive probe or a nozzle-based probe-switch.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice.
+//#define RACK_AND_PINION_PROBE
+#if ENABLED(RACK_AND_PINION_PROBE)
+ #define Z_PROBE_DEPLOY_X X_MIN_POS
+ #define Z_PROBE_RETRACT_X X_MAX_POS
+#endif
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER -37 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 0 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.5 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
+//#define Z_AFTER_PROBING 5 // Z position after probing is done
+
+#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
+
+// For M851 give a range for adjusting the Z probe offset
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// Before deploy/stow pause for user confirmation
+//#define PAUSE_BEFORE_DEPLOY_STOW
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+#define PROBING_FANS_OFF // Turn fans off when probing
+//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
+#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#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_E1_DIR false
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+#define INVERT_E5_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 250
+#define Y_BED_SIZE 250
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS -10
+#define Y_MIN_POS -5
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 250
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 2 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_PIN 66
+ #define FIL_RUNOUT2_PIN 67
+ #define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensors.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // After a runout is detected, continue printing this length of filament
+ // before executing the runout script. Useful for a sensor at the end of
+ // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
+ //#define FILAMENT_RUNOUT_DISTANCE_MM 25
+
+ #ifdef FILAMENT_RUNOUT_DISTANCE_MM
+ // Enable this option to use an encoder disc that toggles the runout pin
+ // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
+ // large enough to avoid false positives.)
+ //#define FILAMENT_MOTION_SENSOR
+ #endif
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE))
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE))
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
+ */
+//#define LCD_BED_LEVELING
+
+#if ENABLED(LCD_BED_LEVELING)
+ #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
+ //#define MESH_EDIT_MENU // Add a menu to edit mesh points
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// 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_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+//#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (100*60)
+#define HOMING_FEEDRATE_Z (20*60)
+
+// Validate that endstops are triggered on homing moves
+#define VALIDATE_HOMING_ENDSTOPS
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_LABEL "PLA"
+#define PREHEAT_1_TEMP_HOTEND 190
+#define PREHEAT_1_TEMP_BED 60
+#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
+
+#define PREHEAT_2_LABEL "ABS"
+#define PREHEAT_2_TEMP_HOTEND 240
+#define PREHEAT_2_TEMP_BED 90
+#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * 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
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { 3, 3, 10 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+//#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 JAPANESE
+
+/**
+ * Info Screen Style (0:Classic, 1:Prusa)
+ *
+ * :[0:'Classic', 1:'Prusa']
+ */
+#define LCD_INFO_SCREEN_STYLE 0
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * LCD Menu Items
+ *
+ * Disable all menus and only display the Status Screen, or
+ * just remove some extraneous menu items to recover space.
+ */
+//#define NO_LCD_MENUS
+//#define SLIM_LCD_MENUS
+
+//
+// ENCODER SETTINGS
+//
+// 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 2
+
+//
+// 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
+
+/**
+ * Encoder Direction Options
+ *
+ * Test your encoder's behavior first with both options disabled.
+ *
+ * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
+ * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION.
+ * Reversed Value Editing only? Enable BOTH options.
+ */
+
+//
+// This option reverses the encoder direction everywhere.
+//
+// Set this option if CLOCKWISE causes values to DECREASE
+//
+//#define REVERSE_ENCODER_DIRECTION
+
+//
+// This option reverses the encoder direction for navigating LCD menus.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+//#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
+//
+// Original RADDS LCD Display+Encoder+SDCardReader
+// http://doku.radds.org/dokumentation/lcd-display/
+//
+//#define RADDS_DISPLAY
+
+//
+// ULTIMAKER Controller.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+#define ULTIPANEL
+#define NEWPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// RigidBot Panel V1.0
+// http://www.inventapart.com/
+//
+//#define RIGIDBOT_PANEL
+
+//
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// ANET and Tronxy 20x4 Controller
+//
+//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
+ // This LCD is known to be susceptible to electrical interference
+ // which scrambles the display. Pressing any button clears it up.
+ // This is a LCD2004 display with 5 analog buttons.
+
+//
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+//
+//#define ULTRA_LCD
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: I2C
+//
+// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C
+// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C
+//
+
+//
+// Elefu RA Board Control Panel
+// http://www.elefu.com/index.php?route=product/product&product_id=53
+//
+//#define RA_CONTROL_PANEL
+
+//
+// Sainsmart (YwRobot) LCD Displays
+//
+// These require F.Malpartida's LiquidCrystal_I2C library
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
+//
+//#define LCD_SAINSMART_I2C_1602
+//#define LCD_SAINSMART_I2C_2004
+
+//
+// Generic LCM1602 LCD adapter
+//
+//#define LCM1602
+
+//
+// PANELOLU2 LCD with status LEDs,
+// separate encoder and click inputs.
+//
+// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later.
+// For more info: https://github.com/lincomatic/LiquidTWI2
+//
+// Note: The PANELOLU2 encoder click input can either be directly connected to
+// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
+//
+//#define LCD_I2C_PANELOLU2
+
+//
+// Panucatt VIKI LCD with status LEDs,
+// integrated click & L/R/U/D buttons, separate encoder inputs.
+//
+//#define LCD_I2C_VIKI
+
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//
+// 3-wire SR LCD with strobe using 74HC4094
+// https://github.com/mikeshub/SailfishLCD
+// Uses the code directly from Sailfish
+//
+//#define FF_INTERFACEBOARD
+
+//=============================================================================
+//======================= LCD / Controller Selection =======================
+//========================= (Graphical LCDs) ========================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Graphical 128x64 (DOGM)
+//
+// IMPORTANT: The U8glib library is required for Graphical Display!
+// https://github.com/olikraus/U8glib_Arduino
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+#define ST7920_DELAY_1 DELAY_NS(125)
+#define ST7920_DELAY_2 DELAY_NS(125)
+#define ST7920_DELAY_3 DELAY_NS(125)
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
+//
+//#define BQ_LCD_SMART_CONTROLLER
+
+//
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+// A clone of the RepRapDiscount full graphics display but with
+// different pins/wiring (see pins_ANET_10.h).
+//
+//#define ANET_FULL_GRAPHICS_LCD
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//
+// Extensible UI
+//
+// Enable third-party or vendor customized user interfaces that aren't
+// packaged with Marlin. Source code for the user interface will need to
+// be placed in "src/lcd/extensible_ui/lib"
+//
+//#define EXTENSIBLE_UI
+
+//=============================================================================
+//=============================== Graphical TFTs ==============================
+//=============================================================================
+
+//
+// MKS Robin 320x240 color display
+//
+//#define MKS_ROBIN_TFT
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+// Support for PCA9533 PWM LED driver
+// https://github.com/mikeshub/SailfishRGB_LED
+//#define PCA9533
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * as the Arduino cannot handle the current the LEDs will require.
+ * Failure to follow this precaution can destroy your Arduino!
+ * NOTE: A separate 5V power supply is required! The Neopixel LED needs
+ * more current than the Arduino 5V linear regulator can produce.
+ * *** CAUTION ***
+ *
+ * LED Type. Enable only one of the following two options.
+ *
+ */
+//#define RGB_LED
+//#define RGBW_LED
+
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Only power servos during movement, otherwise leave off to prevent jitter
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+// Allow servo angle to be edited and saved to EEPROM
+//#define EDITABLE_SERVO_ANGLES
diff --git a/Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h
new file mode 100644
index 0000000000..0c8516e9a9
--- /dev/null
+++ b/Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h
@@ -0,0 +1,2251 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 20 // Seconds
+ #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m)
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm)
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+//#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// 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
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * 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 -1
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define E5_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // 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 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)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+// Employ an external closed loop controller. Override pins here if needed.
+//#define EXTERNAL_CLOSED_LOOP_CONTROLLER
+#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
+ //#define CLOSED_LOOP_ENABLE_PIN -1
+ //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
+#endif
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_TRIPLE_STEPPER_DRIVERS
+#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
+ //#define Z_TRIPLE_ENDSTOPS
+ #if ENABLED(Z_TRIPLE_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z3_USE_ENDSTOP _YMAX_
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0
+ #endif
+#endif
+
+/**
+ * Dual X Carriage
+ *
+ * This setup has two X carriages that can move independently, each with its own hotend.
+ * The carriages can be used to print an object with two colors or materials, or in
+ * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
+ * The inactive carriage is parked automatically to prevent oozing.
+ * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
+ * By default the X2 stepper is assigned to the first unused E plug on the board.
+ */
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
+ #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+/**
+ * Z Steppers Auto-Alignment
+ * Add the G34 command to align multiple Z steppers using a bed probe.
+ */
+//#define Z_STEPPER_AUTO_ALIGN
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
+ // Define probe X and Y positions for Z1, Z2 [, Z3]
+ #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
+ #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
+ // Set number of iterations to align
+ #define Z_STEPPER_ALIGN_ITERATIONS 3
+ // Enable to restore leveling setup after operation
+ #define RESTORE_LEVELING_AFTER_G34
+ // Use the amplification factor to de-/increase correction step.
+ // In case the stepper (spindle) position is further out than the test point
+ // Use a value > 1. NOTE: This may cause instability
+ #define Z_STEPPER_ALIGN_AMP 1.0
+ // Stop criterion. If the accuracy is better than this stop iterating early
+ #define Z_STEPPER_ALIGN_ACC 0.02
+#endif
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s)
+
+//
+// Backlash Compensation
+// Adds extra movement to axes on direction-changes to account for backlash.
+//
+//#define BACKLASH_COMPENSATION
+#if ENABLED(BACKLASH_COMPENSATION)
+ // Define values for backlash distance and correction.
+ // If BACKLASH_GCODE is enabled these values are the defaults.
+ #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
+ #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
+
+ // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
+ // to reduce print artifacts. (Enabling this is costly in memory and computation!)
+ //#define BACKLASH_SMOOTHING_MM 3 // (mm)
+
+ // Add runtime configuration and tuning of backlash values (M425)
+ //#define BACKLASH_GCODE
+
+ #if ENABLED(BACKLASH_GCODE)
+ // Measure the Z backlash when probing (G29) and set with "M425 Z"
+ #define MEASURE_BACKLASH_WHEN_PROBING
+
+ #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
+ // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
+ // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
+ // increments while checking for the contact to be broken.
+ #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm)
+ #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm)
+ #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m)
+ #endif
+ #endif
+#endif
+
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+/**
+ * Custom Microstepping
+ * Override as-needed for your setup. Up to 3 MS pins are supported.
+ */
+//#define MICROSTEP1 LOW,LOW,LOW
+//#define MICROSTEP2 HIGH,LOW,LOW
+//#define MICROSTEP4 LOW,HIGH,LOW
+//#define MICROSTEP8 HIGH,HIGH,LOW
+//#define MICROSTEP16 LOW,LOW,HIGH
+//#define MICROSTEP32 HIGH,LOW,HIGH
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+// @section lcd
+
+// Change values more rapidly when the encoder is rotated faster
+#define ENCODER_RATE_MULTIPLIER
+#if ENABLED(ENCODER_RATE_MULTIPLIER)
+ #define ENCODER_10X_STEPS_PER_SEC 10 // (steps/s) Encoder rate for 10x speed
+ #define ENCODER_100X_STEPS_PER_SEC 50 // (steps/s) Encoder rate for 100x speed
+#endif
+
+// Play a beep when the feedrate is changed from the Status Screen
+//#define BEEP_ON_FEEDRATE_CHANGE
+#if ENABLED(BEEP_ON_FEEDRATE_CHANGE)
+ #define FEEDRATE_CHANGE_BEEP_DURATION 10
+ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
+#endif
+
+// Include a page of printer information in the LCD Main Menu
+#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
+ //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ #define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ #define POWER_LOSS_PIN 69 // Pin to detect power loss
+ #define POWER_LOSS_STATE LOW // State of pin indicating power loss
+ #endif
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ #define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM true // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK true // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ //#define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ //#define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+ /**
+ * Support for USB thumb drives using an Arduino USB Host Shield or
+ * equivalent MAX3421E breakout board. The USB thumb drive will appear
+ * to Marlin as an SD card.
+ *
+ * The MAX3421E must be assigned the same pins as the SD card reader, with
+ * the following pin mapping:
+ *
+ * SCLK, MOSI, MISO --> SCLK, MOSI, MISO
+ * INT --> SD_DETECT_PIN
+ * SS --> SDSS
+ */
+ //#define USB_FLASH_DRIVE_SUPPORT
+ #if ENABLED(USB_FLASH_DRIVE_SUPPORT)
+ #define USB_CS_PIN SDSS
+ #define USB_INTR_PIN SD_DETECT_PIN
+ #endif
+
+ /**
+ * When using a bootloader that supports SD-Firmware-Flashing,
+ * add a menu item to activate SD-FW-Update on the next reboot.
+ *
+ * Requires ATMEGA2560 (Arduino Mega)
+ *
+ * Tested with this bootloader:
+ * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560
+ */
+ //#define SD_FIRMWARE_UPDATE
+ #if ENABLED(SD_FIRMWARE_UPDATE)
+ #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF
+ #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0
+ #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF
+ #endif
+
+ // Add an optimized binary file transfer mode, initiated with 'M28 B1'
+ //#define FAST_FILE_TRANSFER
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if HAS_GRAPHICAL_LCD
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ #if ENABLED(U8GLIB_ST7920)
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+ /**
+ * Status (Info) Screen customizations
+ * These options may affect code size and screen render time.
+ * Custom status screens can forcibly override these settings.
+ */
+ //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones
+ //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends)
+ #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM)
+ #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
+ #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
+ //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
+ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
+ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
+ //#define STATUS_HEAT_PERCENT // Show heating in a progress bar
+
+#endif // HAS_GRAPHICAL_LCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+
+ #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ #endif
+
+ #define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
+ #if ENABLED(MOVE_Z_WHEN_IDLE)
+ #define MOVE_Z_IDLE_MULTIPLICATOR 5 // Multiply 1mm by this factor for the move step size.
+ #endif
+
+ //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
+ #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
+ //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+ #endif
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * 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
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 400 : Minimum for A5984 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// 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
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// Printrun may have trouble receiving long strings all at once.
+// This option inserts short delays between lines of serial output.
+#define SERIAL_OVERRUN_PROTECTION
+
+// @section extras
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT
+#if ENABLED(FWRETRACT)
+ #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM
+ #if ENABLED(FWRETRACT_AUTORETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #endif
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm)
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+ #if ENABLED(MIXING_EXTRUDER)
+ //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously
+ #endif
+#endif
+
+/**
+ * Universal tool change settings.
+ * Applies to all types of extruders except where explicitly noted.
+ */
+#if EXTRUDERS > 1
+ // Z raise distance for tool-change, as needed for some extruders
+ #define TOOLCHANGE_ZRAISE 2 // (mm)
+
+ // Retract and prime filament on tool-change
+ //#define TOOLCHANGE_FILAMENT_SWAP
+ #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
+ #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
+ #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
+ #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
+ #endif
+
+ /**
+ * Position to park head during tool change.
+ * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
+ */
+ //#define TOOLCHANGE_PARK
+ #if ENABLED(TOOLCHANGE_PARK)
+ #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
+ #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m)
+ #endif
+#endif
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+#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.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 400 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 400 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #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 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
+ */
+#if HAS_DRIVER(TMC26X)
+
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
+
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
+
+#endif // TMC26X
+
+// @section tmc_smart
+
+/**
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * TMCStepper library is required to use TMC stepper drivers.
+ * https://github.com/teemuatlut/TMCStepper
+ */
+#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 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
+
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
+
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #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 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #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 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #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_12V
+
+ /**
+ * 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 S0/1 - 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 ENABLED(SENSORLESS_HOMING) || ENABLED(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/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // HAS_TRINAMIC
+
+// @section L6470
+
+/**
+ * L6470 Stepper Driver options
+ *
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
+ */
+#if HAS_DRIVER(L6470)
+
+ //#define L6470_CHITCHAT // Display additional status info
+
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
+
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
+
+#endif // L6470
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Canon Hack Development Kit
+ * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+ */
+//#define CHDK_PIN 4 // Set and enable a pin for triggering CHDK to take a picture
+#if PIN_EXISTS(CHDK)
+ #define CHDK_DELAY 50 // (ms) How long the pin should remain HIGH
+#endif
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * CNC G-code options
+ * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
+ * Note that G0 feedrates should be used with care for 3D printing (if used at all).
+ * High feedrates may cause ringing and harm print quality.
+ */
+//#define PAREN_COMMENTS // Support for parentheses-delimited comments
+//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
+
+// Enable and set a (default) feedrate for all G0 moves
+//#define G0_FEEDRATE 3000 // (mm/m)
+#ifdef G0_FEEDRATE
+ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
+#endif
+
+/**
+ * G-code Macros
+ *
+ * Add G-codes M810-M819 to define and run G-code macros.
+ * Macros are not saved to EEPROM.
+ */
+//#define GCODE_MACROS
+#if ENABLED(GCODE_MACROS)
+ #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
+ #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
+#endif
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ //#define CUSTOM_USER_MENU_TITLE "Custom Commands"
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
+ */
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reliabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
+ //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
+// @section develop
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
diff --git a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
index c53ddeb137..c5760fa4f1 100644
--- a/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -595,8 +637,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1004,6 +1047,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2037,7 +2083,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
index ae3315108f..defc532246 100644
--- a/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h
index e2a3c31db7..902bc89d1b 100644
--- a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -587,8 +629,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -996,6 +1039,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2029,7 +2075,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
index 0c38cfb2ca..6beed43529 100644
--- a/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
+++ b/Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -951,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1499,7 @@
/**
* 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.
*/
@@ -1382,6 +1509,15 @@
//#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.
*/
@@ -1406,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1561,7 @@
#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.
@@ -1447,6 +1584,7 @@
#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.
@@ -1501,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1780,35 +2002,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1932,6 +2158,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
index cd8488a191..111c835b89 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -595,8 +637,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1005,6 +1048,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2038,7 +2084,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
index 4aa68e4c01..2740842127 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -595,8 +637,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1004,6 +1047,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2037,7 +2083,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
index c1d41d7dc8..19c485b17a 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
index bd0b4e2503..eb1bdb0781 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
index 7a4b81c758..3dc8058226 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
index bd0b4e2503..eb1bdb0781 100644
--- a/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
+++ b/Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
index fe00fb7e34..2f5fccaa1f 100644
--- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
+++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -584,8 +626,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -993,6 +1036,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2026,7 +2072,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
index b50fc49ec2..cbabfcd2b0 100644
--- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
+++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration.h b/Marlin/src/config/examples/JGAurora/A5/Configuration.h
index 552055959f..6a0a4ba3c0 100644
--- a/Marlin/src/config/examples/JGAurora/A5/Configuration.h
+++ b/Marlin/src/config/examples/JGAurora/A5/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -179,6 +179,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -189,25 +199,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -239,6 +276,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -393,7 +434,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -592,8 +634,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1001,6 +1044,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2034,7 +2080,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
index 1ee5c7c159..47c486081a 100644
--- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
+++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/MakerParts/Configuration.h b/Marlin/src/config/examples/MakerParts/Configuration.h
index fbd360eb65..f8202fac2b 100644
--- a/Marlin/src/config/examples/MakerParts/Configuration.h
+++ b/Marlin/src/config/examples/MakerParts/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -194,6 +194,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -204,25 +214,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -254,6 +291,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -408,7 +449,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -600,8 +642,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1009,6 +1052,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2042,7 +2088,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h
index 334dda831a..252394aeaf 100644
--- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h
+++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/MakerParts/_Bootscreen.h b/Marlin/src/config/examples/MakerParts/_Bootscreen.h
index 5ddf5c7ff4..907d612194 100644
--- a/Marlin/src/config/examples/MakerParts/_Bootscreen.h
+++ b/Marlin/src/config/examples/MakerParts/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration.h b/Marlin/src/config/examples/Malyan/M150/Configuration.h
index 90d3776ade..4872c33555 100644
--- a/Marlin/src/config/examples/Malyan/M150/Configuration.h
+++ b/Marlin/src/config/examples/Malyan/M150/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -179,6 +179,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -189,25 +199,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -239,6 +276,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -396,7 +437,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -589,8 +631,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1013,6 +1056,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2050,7 +2096,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
index 5d2a93dcc0..19b82d8ad6 100644
--- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
+++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Malyan/M150/_Bootscreen.h b/Marlin/src/config/examples/Malyan/M150/_Bootscreen.h
index 678a7a106f..5700d37a0f 100644
--- a/Marlin/src/config/examples/Malyan/M150/_Bootscreen.h
+++ b/Marlin/src/config/examples/Malyan/M150/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration.h b/Marlin/src/config/examples/Malyan/M200/Configuration.h
index f6408af9f7..bba8cd5e84 100644
--- a/Marlin/src/config/examples/Malyan/M200/Configuration.h
+++ b/Marlin/src/config/examples/Malyan/M200/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -579,8 +621,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -988,6 +1031,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2021,7 +2067,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
index 6f91d8e24e..47ab205d93 100644
--- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
+++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
index 9743b70f8a..847cbf84d8 100644
--- a/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
+++ b/Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -993,6 +1036,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2026,7 +2072,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
index 9f0cea7753..bab117890f 100644
--- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
+++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -993,6 +1036,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2026,7 +2072,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
index 256ef68634..90fd28ce01 100644
--- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
+++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Mks/Robin/Configuration.h b/Marlin/src/config/examples/Mks/Robin/Configuration.h
index aa280cce02..0fff472f0d 100644
--- a/Marlin/src/config/examples/Mks/Robin/Configuration.h
+++ b/Marlin/src/config/examples/Mks/Robin/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -175,6 +175,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -185,25 +195,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -235,6 +272,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -389,7 +430,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -581,8 +623,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -990,6 +1033,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2024,7 +2070,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Mks/Robin/Configuration_adv.h b/Marlin/src/config/examples/Mks/Robin/Configuration_adv.h
index 00eb5fbec2..78c5b1a3de 100644
--- a/Marlin/src/config/examples/Mks/Robin/Configuration_adv.h
+++ b/Marlin/src/config/examples/Mks/Robin/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -951,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1499,7 @@
/**
* 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.
*/
@@ -1382,6 +1509,15 @@
//#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.
*/
@@ -1406,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1561,7 @@
#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.
@@ -1447,6 +1584,7 @@
#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.
@@ -1501,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1795,35 +2017,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1947,6 +2173,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration.h b/Marlin/src/config/examples/Mks/Sbase/Configuration.h
index ab1d1c0314..f835e98bbc 100644
--- a/Marlin/src/config/examples/Mks/Sbase/Configuration.h
+++ b/Marlin/src/config/examples/Mks/Sbase/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,22 +622,23 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
-//#define Y_DRIVER_TYPE A4988
-//#define Z_DRIVER_TYPE A4988
-//#define X2_DRIVER_TYPE A4988
-//#define Y2_DRIVER_TYPE A4988
-//#define Z2_DRIVER_TYPE A4988
-//#define Z3_DRIVER_TYPE A4988
-//#define E0_DRIVER_TYPE A4988
-//#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
+#define X_DRIVER_TYPE DRV8825
+#define Y_DRIVER_TYPE DRV8825
+#define Z_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE DRV8825
+//#define Y2_DRIVER_TYPE DRV8825
+//#define Z2_DRIVER_TYPE DRV8825
+//#define Z3_DRIVER_TYPE DRV8825
+#define E0_DRIVER_TYPE DRV8825
+#define E1_DRIVER_TYPE DRV8825
+//#define E2_DRIVER_TYPE DRV8825
+//#define E3_DRIVER_TYPE DRV8825
+//#define E4_DRIVER_TYPE DRV8825
+//#define E5_DRIVER_TYPE DRV8825
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
index b8d47ad827..698d05d59e 100644
--- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
+++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -630,7 +695,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -958,13 +1023,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1167,6 +1226,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1217,6 +1277,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1244,124 +1305,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1380,6 +1506,7 @@
/**
* 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.
*/
@@ -1389,6 +1516,15 @@
//#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.
*/
@@ -1413,7 +1549,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1432,6 +1568,7 @@
#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.
@@ -1454,6 +1591,7 @@
#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.
@@ -1508,62 +1646,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1802,35 +2024,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1954,6 +2180,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/RapideLite/RL200/Configuration.h b/Marlin/src/config/examples/RapideLite/RL200/Configuration.h
new file mode 100644
index 0000000000..f9975e37da
--- /dev/null
+++ b/Marlin/src/config/examples/RapideLite/RL200/Configuration.h
@@ -0,0 +1,2098 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Configuration.h
+ *
+ * Basic settings such as:
+ *
+ * - Type of electronics
+ * - Type of temperature sensor
+ * - Printer geometry
+ * - Endstop configuration
+ * - LCD controller
+ * - Extra features
+ *
+ * Advanced settings can be found in Configuration_adv.h
+ *
+ */
+#define CONFIGURATION_H_VERSION 020000
+
+//===========================================================================
+//============================= Getting Started =============================
+//===========================================================================
+
+/**
+ * Here are some standard links for getting your machine calibrated:
+ *
+ * http://reprap.org/wiki/Calibration
+ * http://youtu.be/wAL9d7FgInk
+ * http://calculator.josefprusa.cz
+ * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
+ * http://www.thingiverse.com/thing:5573
+ * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
+ * http://www.thingiverse.com/thing:298812
+ */
+
+//===========================================================================
+//============================= DELTA Printer ===============================
+//===========================================================================
+// For a Delta printer start with one of the configuration files in the
+// config/examples/delta directory and customize for your machine.
+//
+
+//===========================================================================
+//============================= SCARA Printer ===============================
+//===========================================================================
+// For a SCARA printer start with the configuration files in
+// config/examples/SCARA and customize for your machine.
+//
+
+// @section info
+
+// User-specified version info of this build to display in [Pronterface, etc] terminal window during
+// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
+// build by the user have been successfully uploaded into firmware.
+#define STRING_CONFIG_H_AUTHOR "(platon42)" // Who made the changes.
+//#define SHOW_BOOTSCREEN
+#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1
+#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2
+
+/**
+ * *** VENDORS PLEASE READ ***
+ *
+ * Marlin allows you to add a custom boot image for Graphical LCDs.
+ * With this option Marlin will first show your custom screen followed
+ * by the standard Marlin logo with version number and web URL.
+ *
+ * We encourage you to take advantage of this new feature and we also
+ * respectfully request that you retain the unmodified Marlin boot screen.
+ */
+
+// Enable to show the bitmap in Marlin/_Bootscreen.h on startup.
+//#define SHOW_CUSTOM_BOOTSCREEN
+
+// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen.
+//#define CUSTOM_STATUS_SCREEN_IMAGE
+
+// @section machine
+
+/**
+ * Select the serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+#define SERIAL_PORT 0
+
+/**
+ * Select a secondary serial port on the board to use for communication with the host.
+ * This allows the connection of wireless adapters (for instance) to non-default port pins.
+ * Serial port -1 is the USB emulated serial port, if available.
+ *
+ * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
+ */
+//#define SERIAL_PORT_2 -1
+
+/**
+ * This setting determines the communication speed of the printer.
+ *
+ * 250000 works in most cases, but you might try a lower speed if
+ * you commonly experience drop-outs during host printing.
+ * You may try up to 1000000 to speed up SD file transfer.
+ *
+ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
+ */
+#define BAUDRATE 115200
+
+// Enable the Bluetooth serial interface on AT90USB devices
+//#define BLUETOOTH
+
+// The following define selects which electronics board you have.
+// Please choose the name from boards.h that matches your setup
+#ifndef MOTHERBOARD
+ #define MOTHERBOARD BOARD_RL200
+#endif
+
+// Optional custom name for your RepStrap or other custom machine
+// Displayed in the LCD "Ready" message
+#define CUSTOM_MACHINE_NAME "Rapide Lite 200"
+
+// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
+// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
+//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
+
+// @section extruder
+
+// This defines the number of extruders
+// :[1, 2, 3, 4, 5, 6]
+#define EXTRUDERS 1
+
+// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
+
+// For Cyclops or any "multi-extruder" that shares a single nozzle.
+//#define SINGLENOZZLE
+
+/**
+ * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
+ *
+ * This device allows one stepper driver on a control board to drive
+ * two to eight stepper motors, one at a time, in a manner suitable
+ * for extruders.
+ *
+ * This option only allows the multiplexer to switch on tool-change.
+ * Additional options to configure custom E moves are pending.
+ */
+//#define MK2_MULTIPLEXER
+#if ENABLED(MK2_MULTIPLEXER)
+ // Override the default DIO selector pins here, if needed.
+ // Some pins files may provide defaults for these pins.
+ //#define E_MUX0_PIN 40 // Always Required
+ //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs
+ //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
+#endif
+
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
+// A dual extruder that uses a single stepper motor
+//#define SWITCHING_EXTRUDER
+#if ENABLED(SWITCHING_EXTRUDER)
+ #define SWITCHING_EXTRUDER_SERVO_NR 0
+ #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
+ #if EXTRUDERS > 3
+ #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
+ #endif
+#endif
+
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
+//#define SWITCHING_NOZZLE
+#if ENABLED(SWITCHING_NOZZLE)
+ #define SWITCHING_NOZZLE_SERVO_NR 0
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
+#endif
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ */
+//#define PARKING_EXTRUDER
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
+#endif
+
+/**
+ * Switching Toolhead
+ *
+ * Support for swappable and dockable toolheads, such as
+ * the E3D Tool Changer. Toolheads are locked with a servo.
+ */
+//#define SWITCHING_TOOLHEAD
+#if ENABLED(SWITCHING_TOOLHEAD)
+ #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector
+ #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock
+ #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock
+ #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis
+ #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis
+ #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders
+#endif
+
+/**
+ * "Mixing Extruder"
+ * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
+ * - Extends the stepping routines to move multiple steppers in proportion to the mix.
+ * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools.
+ * - This implementation supports up to two mixing extruders.
+ * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
+ */
+//#define MIXING_EXTRUDER
+#if ENABLED(MIXING_EXTRUDER)
+ #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
+ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
+ //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
+#endif
+
+// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
+// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
+// For the other hotends it is their distance from the extruder 0 hotend.
+//#define HOTEND_OFFSET_X {0.0, 20.00} // (mm) relative X-offset for each nozzle
+//#define HOTEND_OFFSET_Y {0.0, 5.00} // (mm) relative Y-offset for each nozzle
+//#define HOTEND_OFFSET_Z {0.0, 0.00} // (mm) relative Z-offset for each nozzle
+
+// @section machine
+
+/**
+ * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN
+ *
+ * 0 = No Power Switch
+ * 1 = ATX
+ * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
+ *
+ * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' }
+ */
+#define POWER_SUPPLY 1
+
+#if POWER_SUPPLY > 0
+ // Enable this option to leave the PSU off at startup.
+ // Power to steppers and heaters will need to be turned on with M80.
+ //#define PS_DEFAULT_OFF
+
+ //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
+ #if ENABLED(AUTO_POWER_CONTROL)
+ #define AUTO_POWER_FANS // Turn on PSU if fans need power
+ #define AUTO_POWER_E_FANS
+ #define AUTO_POWER_CONTROLLERFAN
+ #define POWER_TIMEOUT 30
+ #endif
+
+#endif
+
+// @section temperature
+
+//===========================================================================
+//============================= Thermal Settings ============================
+//===========================================================================
+
+/**
+ * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
+ *
+ * Temperature sensors available:
+ *
+ * -4 : thermocouple with AD8495
+ * -3 : thermocouple with MAX31855 (only for sensor 0)
+ * -2 : thermocouple with MAX6675 (only for sensor 0)
+ * -1 : thermocouple with AD595
+ * 0 : not used
+ * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
+ * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
+ * 3 : Mendel-parts thermistor (4.7k pullup)
+ * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
+ * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
+ * 501 : 100K Zonestar (Tronxy X3A) Thermistor
+ * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
+ * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
+ * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
+ * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
+ * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
+ * 10 : 100k RS thermistor 198-961 (4.7k pullup)
+ * 11 : 100k beta 3950 1% thermistor (4.7k pullup)
+ * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
+ * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
+ * 15 : 100k thermistor calibration for JGAurora A5 hotend
+ * 20 : the PT100 circuit found in the Ultimainboard V2.x
+ * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
+ * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
+ * 66 : 4.7M High Temperature thermistor from Dyze Design
+ * 70 : the 100K thermistor found in the bq Hephestos 2
+ * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
+ *
+ * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
+ * (but gives greater accuracy and more stable PID)
+ * 51 : 100k thermistor - EPCOS (1k pullup)
+ * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
+ * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
+ *
+ * 1047 : Pt1000 with 4k7 pullup
+ * 1010 : Pt1000 with 1k pullup (non standard)
+ * 147 : Pt100 with 4k7 pullup
+ * 110 : Pt100 with 1k pullup (non standard)
+ *
+ * Use these for Testing or Development purposes. NEVER for production machine.
+ * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
+ * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
+ *
+ * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" }
+ */
+#define TEMP_SENSOR_0 1
+#define TEMP_SENSOR_1 0
+#define TEMP_SENSOR_2 0
+#define TEMP_SENSOR_3 0
+#define TEMP_SENSOR_4 0
+#define TEMP_SENSOR_5 0
+#define TEMP_SENSOR_BED 1
+#define TEMP_SENSOR_CHAMBER 0
+
+// Dummy thermistor constant temperature readings, for use with 998 and 999
+#define DUMMY_THERMISTOR_998_VALUE 25
+#define DUMMY_THERMISTOR_999_VALUE 100
+
+// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
+// from the two sensors differ too much the print will be aborted.
+//#define TEMP_SENSOR_1_AS_REDUNDANT
+#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
+
+// Extruder temperature must be close to target for this long before M109 returns success
+#define TEMP_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// Bed temperature must be close to target for this long before M190 returns success
+#define TEMP_BED_RESIDENCY_TIME 10 // (seconds)
+#define TEMP_BED_HYSTERESIS 3 // (degC) range of +/- temperatures considered "close" to the target one
+#define TEMP_BED_WINDOW 1 // (degC) Window around target to start the residency timer x degC early.
+
+// The minimal temperature defines the temperature below which the heater will not be enabled It is used
+// to check that the wiring to the thermistor is not broken.
+// Otherwise this would lead to the heater being powered on all the time.
+#define HEATER_0_MINTEMP 5
+#define HEATER_1_MINTEMP 5
+#define HEATER_2_MINTEMP 5
+#define HEATER_3_MINTEMP 5
+#define HEATER_4_MINTEMP 5
+#define HEATER_5_MINTEMP 5
+#define BED_MINTEMP 5
+
+// When temperature exceeds max temp, your heater will be switched off.
+// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
+// You should use MINTEMP for thermistor short/failure protection.
+#define HEATER_0_MAXTEMP 250
+#define HEATER_1_MAXTEMP 250
+#define HEATER_2_MAXTEMP 250
+#define HEATER_3_MAXTEMP 250
+#define HEATER_4_MAXTEMP 250
+#define HEATER_5_MAXTEMP 250
+#define BED_MAXTEMP 120
+
+//===========================================================================
+//============================= PID Settings ================================
+//===========================================================================
+// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning
+
+// Comment the following line to disable PID and enable bang-bang.
+#define PIDTEMP
+#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
+#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
+#define PID_K1 0.95 // Smoothing factor within any PID loop
+#if ENABLED(PIDTEMP)
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
+ //#define PID_DEBUG // Sends debug data to the serial port.
+ //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
+ //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
+ //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
+ // Set/get with gcode: M301 E[extruder number, 0-2]
+ #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
+ // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
+
+ // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
+
+ // Ultimaker
+ #define DEFAULT_Kp 22.2
+ #define DEFAULT_Ki 1.08
+ #define DEFAULT_Kd 114
+
+ // MakerGear
+ //#define DEFAULT_Kp 7.0
+ //#define DEFAULT_Ki 0.1
+ //#define DEFAULT_Kd 12
+
+ // Mendel Parts V9 on 12V
+ //#define DEFAULT_Kp 63.0
+ //#define DEFAULT_Ki 2.25
+ //#define DEFAULT_Kd 440
+
+#endif // PIDTEMP
+
+//===========================================================================
+//============================= PID > Bed Temperature Control ===============
+//===========================================================================
+
+/**
+ * PID Bed Heating
+ *
+ * If this option is enabled set PID constants below.
+ * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
+ *
+ * The PID frequency will be the same as the extruder PWM.
+ * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
+ * which is fine for driving a square wave into a resistive load and does not significantly
+ * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
+ * 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 BED_LIMIT_SWITCHING
+
+/**
+ * Max Bed Power
+ * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
+ * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
+ * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
+ */
+#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
+
+#if ENABLED(PIDTEMPBED)
+
+ //#define PID_BED_DEBUG // Sends debug data to the serial port.
+
+ //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
+
+ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
+ //from pidautotune
+ //#define DEFAULT_bedKp 97.1
+ //#define DEFAULT_bedKi 1.41
+ //#define DEFAULT_bedKd 1675.16
+
+ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
+#endif // PIDTEMPBED
+
+// @section extruder
+
+/**
+ * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
+ * Add M302 to set the minimum extrusion temperature and/or turn
+ * cold extrusion prevention on and off.
+ *
+ * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
+ */
+#define PREVENT_COLD_EXTRUSION
+#define EXTRUDE_MINTEMP 170
+
+/**
+ * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
+ * Note: For Bowden Extruders make this large enough to allow load/unload.
+ */
+#define PREVENT_LENGTHY_EXTRUDE
+#define EXTRUDE_MAXLENGTH 200
+
+//===========================================================================
+//======================== Thermal Runaway Protection =======================
+//===========================================================================
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * If you get "Thermal Runaway" or "Heating failed" errors the
+ * details can be tuned in Configuration_adv.h
+ */
+
+#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
+#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
+
+//===========================================================================
+//============================= 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
+
+//===========================================================================
+//============================== Endstop Settings ===========================
+//===========================================================================
+
+// @section homing
+
+// Specify here all the endstop connectors that are connected to any endstop or probe.
+// Almost all printers will be using one per axis. Probes will use one or more of the
+// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
+#define USE_XMIN_PLUG
+#define USE_YMIN_PLUG
+#define USE_ZMIN_PLUG
+//#define USE_XMAX_PLUG
+//#define USE_YMAX_PLUG
+//#define USE_ZMAX_PLUG
+
+// Enable pullup for all endstops to prevent a floating state
+#define ENDSTOPPULLUPS
+#if DISABLED(ENDSTOPPULLUPS)
+ // Disable ENDSTOPPULLUPS to set pullups individually
+ //#define ENDSTOPPULLUP_XMAX
+ //#define ENDSTOPPULLUP_YMAX
+ //#define ENDSTOPPULLUP_ZMAX
+ //#define ENDSTOPPULLUP_XMIN
+ //#define ENDSTOPPULLUP_YMIN
+ //#define ENDSTOPPULLUP_ZMIN
+ //#define ENDSTOPPULLUP_ZMIN_PROBE
+#endif
+
+// Enable pulldown for all endstops to prevent a floating state
+//#define ENDSTOPPULLDOWNS
+#if DISABLED(ENDSTOPPULLDOWNS)
+ // Disable ENDSTOPPULLDOWNS to set pulldowns individually
+ //#define ENDSTOPPULLDOWN_XMAX
+ //#define ENDSTOPPULLDOWN_YMAX
+ //#define ENDSTOPPULLDOWN_ZMAX
+ //#define ENDSTOPPULLDOWN_XMIN
+ //#define ENDSTOPPULLDOWN_YMIN
+ //#define ENDSTOPPULLDOWN_ZMIN
+ //#define ENDSTOPPULLDOWN_ZMIN_PROBE
+#endif
+
+// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
+#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 true // set to true to invert the logic of the probe.
+
+/**
+ * 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 DRV8825
+#define Y_DRIVER_TYPE DRV8825
+#define Z_DRIVER_TYPE DRV8825
+//#define X2_DRIVER_TYPE A4988
+//#define Y2_DRIVER_TYPE A4988
+#define Z2_DRIVER_TYPE DRV8825
+//#define Z3_DRIVER_TYPE A4988
+#define E0_DRIVER_TYPE DRV8825
+//#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
+
+// Enable this feature if all enabled endstop pins are interrupt-capable.
+// This will remove the need to poll the interrupt pins, saving many CPU cycles.
+//#define ENDSTOP_INTERRUPTS_FEATURE
+
+/**
+ * Endstop Noise Threshold
+ *
+ * Enable if your probe or endstops falsely trigger due to noise.
+ *
+ * - Higher values may affect repeatability or accuracy of some bed probes.
+ * - To fix noise install a 100nF ceramic capacitor inline with the switch.
+ * - This feature is not required for common micro-switches mounted on PCBs
+ * based on the Makerbot design, which already have the 100nF capacitor.
+ *
+ * :[2,3,4,5,6,7]
+ */
+//#define ENDSTOP_NOISE_THRESHOLD 2
+
+//=============================================================================
+//============================== Movement Settings ============================
+//=============================================================================
+// @section motion
+
+/**
+ * Default Settings
+ *
+ * These settings can be reset by M502
+ *
+ * Note that if EEPROM is enabled, saved values will override these.
+ */
+
+/**
+ * With this option each E stepper can have its own factors for the
+ * following movement settings. If fewer factors are given than the
+ * total number of extruders, the last value applies to the rest.
+ */
+//#define DISTINCT_E_FACTORS
+
+/**
+ * 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 { 157, 157, 800, 195 }
+
+/**
+ * Default Max Feed Rate (mm/s)
+ * Override with M203
+ * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
+ */
+#define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 }
+
+/**
+ * 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 { 9000, 9000, 100, 10000 }
+
+/**
+ * Default Acceleration (change/s) change = mm/s
+ * Override with M204
+ *
+ * M204 P Acceleration
+ * M204 R Retract Acceleration
+ * M204 T Travel Acceleration
+ */
+#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves
+#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts
+#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves
+
+//
+// Use Junction Deviation instead of traditional Jerk Limiting
+//
+//#define JUNCTION_DEVIATION
+#if ENABLED(JUNCTION_DEVIATION)
+ #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
+#endif
+
+/**
+ * Default Jerk (mm/s)
+ * Override with M205 X Y Z E
+ *
+ * "Jerk" specifies the minimum speed change that requires acceleration.
+ * When changing speed and direction, if the difference is less than the
+ * value set here, it may happen instantaneously.
+ */
+#if DISABLED(JUNCTION_DEVIATION)
+ #define DEFAULT_XJERK 10.0
+ #define DEFAULT_YJERK 10.0
+ #define DEFAULT_ZJERK 0.3
+#endif
+
+#define DEFAULT_EJERK 5.0 // May be used by Linear Advance
+
+/**
+ * S-Curve Acceleration
+ *
+ * This option eliminates vibration during printing by fitting a Bézier
+ * curve to move acceleration, producing much smoother direction changes.
+ *
+ * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
+ */
+#define S_CURVE_ACCELERATION
+
+//===========================================================================
+//============================= Z Probe Options =============================
+//===========================================================================
+// @section probes
+
+//
+// See http://marlinfw.org/docs/configuration/probes.html
+//
+
+/**
+ * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+ *
+ * Enable this option for a probe connected to the Z Min endstop pin.
+ */
+#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
+
+/**
+ * Z_MIN_PROBE_ENDSTOP
+ *
+ * Enable this option for a probe connected to any pin except Z-Min.
+ * (By default Marlin assumes the Z-Max endstop pin.)
+ * To use a custom Z Probe pin, set Z_MIN_PROBE_PIN below.
+ *
+ * - The simplest option is to use a free endstop connector.
+ * - Use 5V for powered (usually inductive) sensors.
+ *
+ * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
+ * - For simple switches connect...
+ * - normally-closed switches to GND and D32.
+ * - normally-open switches to 5V and D32.
+ *
+ * WARNING: Setting the wrong pin may have unexpected and potentially
+ * disastrous consequences. Use with caution and do your homework.
+ *
+ */
+//#define Z_MIN_PROBE_ENDSTOP
+
+/**
+ * Probe Type
+ *
+ * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
+ * Activate one of these to use Auto Bed Leveling below.
+ */
+
+/**
+ * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
+ * Use G29 repeatedly, adjusting the Z height at each point with movement commands
+ * or (with LCD_BED_LEVELING) the LCD controller.
+ */
+//#define PROBE_MANUALLY
+//#define MANUAL_PROBE_START_Z 0.2
+
+/**
+ * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
+ * (e.g., an inductive probe or a nozzle-based probe-switch.)
+ */
+//#define FIX_MOUNTED_PROBE
+
+/**
+ * Z Servo Probe, such as an endstop switch on a rotating arm.
+ */
+//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
+//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles
+
+/**
+ * The BLTouch probe uses a Hall effect sensor and emulates a servo.
+ */
+//#define BLTOUCH
+#if ENABLED(BLTOUCH)
+ //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
+#endif
+
+// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
+//#define SOLENOID_PROBE
+
+// A sled-mounted probe like those designed by Charles Bell.
+//#define Z_PROBE_SLED
+//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
+
+// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice.
+//#define RACK_AND_PINION_PROBE
+#if ENABLED(RACK_AND_PINION_PROBE)
+ #define Z_PROBE_DEPLOY_X X_MIN_POS
+ #define Z_PROBE_RETRACT_X X_MAX_POS
+#endif
+
+//
+// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
+//
+
+/**
+ * Z Probe to nozzle (X,Y) offset, relative to (0, 0).
+ * X and Y offsets must be integers.
+ *
+ * In the following example the X and Y offsets are both positive:
+ * #define X_PROBE_OFFSET_FROM_EXTRUDER 10
+ * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10
+ *
+ * +-- BACK ---+
+ * | |
+ * L | (+) P | R <-- probe (20,20)
+ * E | | I
+ * F | (-) N (+) | G <-- nozzle (10,10)
+ * T | | H
+ * | (-) | T
+ * | |
+ * O-- FRONT --+
+ * (0,0)
+ */
+#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
+#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
+#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
+
+// Certain types of probes need to stay away from edges
+#define MIN_PROBE_EDGE 10
+
+// X and Y axis travel speed (mm/m) between probes
+#define XY_PROBE_SPEED 8000
+
+// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
+#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
+
+// Feedrate (mm/m) for the "accurate" probe of each point
+#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
+
+// The number of probes to perform at each point.
+// Set to 2 for a fast/slow probe, using the second probe result.
+// Set to 3 or more for slow probes, averaging the results.
+//#define MULTIPLE_PROBING 2
+
+/**
+ * Z probes require clearance when deploying, stowing, and moving between
+ * probe points to avoid hitting the bed and other hardware.
+ * Servo-mounted probes require extra space for the arm to rotate.
+ * Inductive probes need space to keep from triggering early.
+ *
+ * Use these settings to specify the distance (mm) to raise the probe (or
+ * lower the bed). The values set here apply over and above any (negative)
+ * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD.
+ * Only integer values >= 1 are valid here.
+ *
+ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
+ * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
+ */
+#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
+#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
+#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
+//#define Z_AFTER_PROBING 5 // Z position after probing is done
+
+#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
+
+// For M851 give a range for adjusting the Z probe offset
+#define Z_PROBE_OFFSET_RANGE_MIN -20
+#define Z_PROBE_OFFSET_RANGE_MAX 20
+
+// Enable the M48 repeatability test to test probe accuracy
+//#define Z_MIN_PROBE_REPEATABILITY_TEST
+
+// Before deploy/stow pause for user confirmation
+//#define PAUSE_BEFORE_DEPLOY_STOW
+
+/**
+ * Enable one or more of the following if probing seems unreliable.
+ * Heaters and/or fans can be disabled during probing to minimize electrical
+ * noise. A delay can also be added to allow noise and vibration to settle.
+ * These options are most useful for the BLTouch probe, but may also improve
+ * readings with inductive probes and piezo sensors.
+ */
+//#define PROBING_HEATERS_OFF // Turn heaters off when probing
+#if ENABLED(PROBING_HEATERS_OFF)
+ //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
+#endif
+//#define PROBING_FANS_OFF // Turn fans off when probing
+//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
+//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
+
+// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
+// :{ 0:'Low', 1:'High' }
+#define X_ENABLE_ON 0
+#define Y_ENABLE_ON 0
+#define Z_ENABLE_ON 0
+#define E_ENABLE_ON 0 // For all extruders
+
+// Disables axis stepper immediately when it's not being used.
+// WARNING: When motors turn off there is a chance of losing position accuracy!
+#define DISABLE_X false
+#define DISABLE_Y false
+#define DISABLE_Z false
+
+// Warn on display about possibly reduced accuracy
+//#define DISABLE_REDUCED_ACCURACY_WARNING
+
+// @section extruder
+
+#define DISABLE_E false // For all extruders
+#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
+
+// @section machine
+
+// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
+#define INVERT_X_DIR true
+#define INVERT_Y_DIR true
+#define INVERT_Z_DIR true
+
+// @section extruder
+
+// For direct drive extruder v9 set to true, for geared extruder set to false.
+#define INVERT_E0_DIR true
+#define INVERT_E1_DIR true
+#define INVERT_E2_DIR false
+#define INVERT_E3_DIR false
+#define INVERT_E4_DIR false
+#define INVERT_E5_DIR false
+
+// @section homing
+
+//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
+
+//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
+
+//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
+ // Be sure you have this distance over your Z_MAX_POS in case.
+
+// Direction of endstops when homing; 1=MAX, -1=MIN
+// :[-1,1]
+#define X_HOME_DIR -1
+#define Y_HOME_DIR -1
+#define Z_HOME_DIR -1
+
+// @section machine
+
+// The size of the print bed
+#define X_BED_SIZE 200
+#define Y_BED_SIZE 200
+
+// Travel limits (mm) after homing, corresponding to endstop positions.
+#define X_MIN_POS 0
+#define Y_MIN_POS 0
+#define Z_MIN_POS 0
+#define X_MAX_POS X_BED_SIZE
+#define Y_MAX_POS Y_BED_SIZE
+#define Z_MAX_POS 190
+
+/**
+ * Software Endstops
+ *
+ * - Prevent moves outside the set machine bounds.
+ * - Individual axes can be disabled, if desired.
+ * - X and Y only apply to Cartesian robots.
+ * - Use 'M211' to set software endstops on/off or report current state
+ */
+
+// Min software endstops constrain movement within minimum coordinate bounds
+#define MIN_SOFTWARE_ENDSTOPS
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
+ #define MIN_SOFTWARE_ENDSTOP_X
+ #define MIN_SOFTWARE_ENDSTOP_Y
+ #define MIN_SOFTWARE_ENDSTOP_Z
+#endif
+
+// Max software endstops constrain movement within maximum coordinate bounds
+#define MAX_SOFTWARE_ENDSTOPS
+#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ #define MAX_SOFTWARE_ENDSTOP_X
+ #define MAX_SOFTWARE_ENDSTOP_Y
+ #define MAX_SOFTWARE_ENDSTOP_Z
+#endif
+
+#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
+ //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
+#endif
+
+/**
+ * Filament Runout Sensors
+ * Mechanical or opto endstops are used to check for the presence of filament.
+ *
+ * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
+ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
+ * By default the firmware assumes HIGH=FILAMENT PRESENT.
+ */
+//#define FILAMENT_RUNOUT_SENSOR
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
+ #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
+ #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
+ //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
+ #define FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // After a runout is detected, continue printing this length of filament
+ // before executing the runout script. Useful for a sensor at the end of
+ // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
+ //#define FILAMENT_RUNOUT_DISTANCE_MM 25
+
+ #ifdef FILAMENT_RUNOUT_DISTANCE_MM
+ // Enable this option to use an encoder disc that toggles the runout pin
+ // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
+ // large enough to avoid false positives.)
+ //#define FILAMENT_MOTION_SENSOR
+ #endif
+#endif
+
+//===========================================================================
+//=============================== Bed Leveling ==============================
+//===========================================================================
+// @section calibrate
+
+/**
+ * Choose one of the options below to enable G29 Bed Leveling. The parameters
+ * and behavior of G29 will change depending on your selection.
+ *
+ * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
+ *
+ * - AUTO_BED_LEVELING_3POINT
+ * Probe 3 arbitrary points on the bed (that aren't collinear)
+ * You specify the XY coordinates of all 3 points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_LINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a single tilted plane. Best for a flat bed.
+ *
+ * - AUTO_BED_LEVELING_BILINEAR
+ * Probe several points in a grid.
+ * You specify the rectangle and the density of sample points.
+ * The result is a mesh, best for large or uneven beds.
+ *
+ * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
+ * A comprehensive bed leveling system combining the features and benefits
+ * of other systems. UBL also includes integrated Mesh Generation, Mesh
+ * Validation and Mesh Editing systems.
+ *
+ * - MESH_BED_LEVELING
+ * Probe a grid manually
+ * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
+ * For machines without a probe, Mesh Bed Leveling provides a method to perform
+ * leveling in steps so you can manually adjust the Z height at each grid-point.
+ * With an LCD controller the process is guided step-by-step.
+ */
+//#define AUTO_BED_LEVELING_3POINT
+//#define AUTO_BED_LEVELING_LINEAR
+//#define AUTO_BED_LEVELING_BILINEAR
+//#define AUTO_BED_LEVELING_UBL
+//#define MESH_BED_LEVELING
+
+/**
+ * Normally G28 leaves leveling disabled on completion. Enable
+ * this option to have G28 restore the prior leveling state.
+ */
+//#define RESTORE_LEVELING_AFTER_G28
+
+/**
+ * Enable detailed logging of G28, G29, M48, etc.
+ * Turn on with the command 'M111 S32'.
+ * NOTE: Requires a lot of PROGMEM!
+ */
+//#define DEBUG_LEVELING_FEATURE
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Gradually reduce leveling correction until a set height is reached,
+ // at which point movement will be level to the machine's XY plane.
+ // The height can be set with M420 Z
+ #define ENABLE_LEVELING_FADE_HEIGHT
+
+ // For Cartesian machines, instead of dividing moves on mesh boundaries,
+ // split up moves into short segments like a Delta. This follows the
+ // contours of the bed more closely than edge-to-edge straight moves.
+ #define SEGMENT_LEVELED_MOVES
+ #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
+
+ /**
+ * Enable the G26 Mesh Validation Pattern tool.
+ */
+ //#define G26_MESH_VALIDATION
+ #if ENABLED(G26_MESH_VALIDATION)
+ #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
+ #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
+ #define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
+ #define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
+ #endif
+
+#endif
+
+#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Set the number of grid points per dimension.
+ #define GRID_MAX_POINTS_X 3
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ // Set the boundaries for probing (where the probe can reach).
+ //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE))
+ //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
+ //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE))
+
+ // Probe along the Y axis, advancing X after each column
+ //#define PROBE_Y_FIRST
+
+ #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
+
+ // Beyond the probed grid, continue the implied tilt?
+ // Default is to maintain the height of the nearest edge.
+ //#define EXTRAPOLATE_BEYOND_GRID
+
+ //
+ // Experimental Subdivision of the grid by Catmull-Rom method.
+ // Synthesizes intermediate points to produce a more detailed mesh.
+ //
+ //#define ABL_BILINEAR_SUBDIVISION
+ #if ENABLED(ABL_BILINEAR_SUBDIVISION)
+ // Number of subdivisions between probe points
+ #define BILINEAR_SUBDIVISIONS 3
+ #endif
+
+ #endif
+
+#elif ENABLED(AUTO_BED_LEVELING_UBL)
+
+ //===========================================================================
+ //========================= Unified Bed Leveling ============================
+ //===========================================================================
+
+ //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
+
+ #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
+ #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
+
+ //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
+ // as the Z-Height correction value.
+
+#elif ENABLED(MESH_BED_LEVELING)
+
+ //===========================================================================
+ //=================================== Mesh ==================================
+ //===========================================================================
+
+ #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
+ #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
+ #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
+
+ //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
+
+#endif // BED_LEVELING
+
+/**
+ * Points to probe for all 3-point Leveling procedures.
+ * Override if the automatically selected points are inadequate.
+ */
+#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL)
+ //#define PROBE_PT_1_X 15
+ //#define PROBE_PT_1_Y 180
+ //#define PROBE_PT_2_X 15
+ //#define PROBE_PT_2_Y 20
+ //#define PROBE_PT_3_X 170
+ //#define PROBE_PT_3_Y 20
+#endif
+
+/**
+ * Add a bed leveling sub-menu for ABL or MBL.
+ * Include a guided procedure if manual probing is enabled.
+ */
+//#define LCD_BED_LEVELING
+
+#if ENABLED(LCD_BED_LEVELING)
+ #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis.
+ #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
+ //#define MESH_EDIT_MENU // Add a menu to edit mesh points
+#endif
+
+// Add a menu item to move between bed corners for manual bed adjustment
+//#define LEVEL_BED_CORNERS
+
+#if ENABLED(LEVEL_BED_CORNERS)
+ #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling
+ #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners
+ //#define LEVEL_CENTER_TOO // Move to the center after the last corner
+#endif
+
+/**
+ * Commands to execute at the end of G29 probing.
+ * Useful to retract or move the Z probe out of the way.
+ */
+//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
+
+
+// @section homing
+
+// The center of the bed is at (X=0, Y=0)
+//#define BED_CENTER_AT_0_0
+
+// 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_Z_HOME_POS 0
+
+// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
+//
+// With this feature enabled:
+//
+// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
+// - If stepper drivers time out, it will need X and Y homing again before Z homing.
+// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
+// - Prevent Z homing when the Z probe is outside bed area.
+//
+//#define Z_SAFE_HOMING
+
+#if ENABLED(Z_SAFE_HOMING)
+ #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28).
+ #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28).
+#endif
+
+// Homing speeds (mm/m)
+#define HOMING_FEEDRATE_XY (50*60)
+#define HOMING_FEEDRATE_Z (4*60)
+
+// Validate that endstops are triggered on homing moves
+#define VALIDATE_HOMING_ENDSTOPS
+
+// @section calibrate
+
+/**
+ * Bed Skew Compensation
+ *
+ * This feature corrects for misalignment in the XYZ axes.
+ *
+ * Take the following steps to get the bed skew in the XY plane:
+ * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
+ * 2. For XY_DIAG_AC measure the diagonal A to C
+ * 3. For XY_DIAG_BD measure the diagonal B to D
+ * 4. For XY_SIDE_AD measure the edge A to D
+ *
+ * Marlin automatically computes skew factors from these measurements.
+ * Skew factors may also be computed and set manually:
+ *
+ * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
+ * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
+ *
+ * If desired, follow the same procedure for XZ and YZ.
+ * Use these diagrams for reference:
+ *
+ * Y Z Z
+ * ^ B-------C ^ B-------C ^ B-------C
+ * | / / | / / | / /
+ * | / / | / / | / /
+ * | A-------D | A-------D | A-------D
+ * +-------------->X +-------------->X +-------------->Y
+ * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
+ */
+//#define SKEW_CORRECTION
+
+#if ENABLED(SKEW_CORRECTION)
+ // Input all length measurements here:
+ #define XY_DIAG_AC 282.8427124746
+ #define XY_DIAG_BD 282.8427124746
+ #define XY_SIDE_AD 200
+
+ // Or, set the default skew factors directly here
+ // to override the above measurements:
+ #define XY_SKEW_FACTOR 0.0
+
+ //#define SKEW_CORRECTION_FOR_Z
+ #if ENABLED(SKEW_CORRECTION_FOR_Z)
+ #define XZ_DIAG_AC 282.8427124746
+ #define XZ_DIAG_BD 282.8427124746
+ #define YZ_DIAG_AC 282.8427124746
+ #define YZ_DIAG_BD 282.8427124746
+ #define YZ_SIDE_AD 200
+ #define XZ_SKEW_FACTOR 0.0
+ #define YZ_SKEW_FACTOR 0.0
+ #endif
+
+ // Enable this option for M852 to set skew at runtime
+ //#define SKEW_CORRECTION_GCODE
+#endif
+
+//=============================================================================
+//============================= Additional Features ===========================
+//=============================================================================
+
+// @section extras
+
+//
+// EEPROM
+//
+// The microcontroller can store settings in the EEPROM, e.g. max velocity...
+// M500 - stores parameters in EEPROM
+// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
+// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
+//
+#define EEPROM_SETTINGS // Enable for M500 and M501 commands
+//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
+#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
+
+//
+// Host Keepalive
+//
+// When enabled Marlin will send a busy status message to the host
+// every couple of seconds when it can't accept commands.
+//
+#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
+#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
+#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
+
+//
+// M100 Free Memory Watcher
+//
+//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage
+
+//
+// G20/G21 Inch mode support
+//
+//#define INCH_MODE_SUPPORT
+
+//
+// M149 Set temperature units support
+//
+//#define TEMPERATURE_UNITS_SUPPORT
+
+// @section temperature
+
+// Preheat Constants
+#define PREHEAT_1_LABEL "PLA"
+#define PREHEAT_1_TEMP_HOTEND 180
+#define PREHEAT_1_TEMP_BED 70
+#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
+
+#define PREHEAT_2_LABEL "ABS"
+#define PREHEAT_2_TEMP_HOTEND 240
+#define PREHEAT_2_TEMP_BED 110
+#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
+
+/**
+ * Nozzle Park
+ *
+ * Park the nozzle at the given XYZ position on idle or G27.
+ *
+ * The "P" parameter controls the action applied to the Z axis:
+ *
+ * P0 (Default) If Z is below park Z raise the nozzle.
+ * 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
+
+#if ENABLED(NOZZLE_PARK_FEATURE)
+ // Specify a park position as { X, Y, Z }
+ #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
+ #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
+ #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
+#endif
+
+/**
+ * Clean Nozzle Feature -- EXPERIMENTAL
+ *
+ * Adds the G12 command to perform a nozzle cleaning process.
+ *
+ * Parameters:
+ * P Pattern
+ * S Strokes / Repetitions
+ * T Triangles (P1 only)
+ *
+ * Patterns:
+ * P0 Straight line (default). This process requires a sponge type material
+ * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
+ * between the start / end points.
+ *
+ * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
+ * number of zig-zag triangles to do. "S" defines the number of strokes.
+ * Zig-zags are done in whichever is the narrower dimension.
+ * For example, "G12 P1 S1 T3" will execute:
+ *
+ * --
+ * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
+ * | | / \ / \ / \ |
+ * A | | / \ / \ / \ |
+ * | | / \ / \ / \ |
+ * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
+ * -- +--------------------------------+
+ * |________|_________|_________|
+ * T1 T2 T3
+ *
+ * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
+ * "R" specifies the radius. "S" specifies the stroke count.
+ * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
+ *
+ * Caveats: The ending Z should be the same as starting Z.
+ * Attention: EXPERIMENTAL. G-code arguments may change.
+ *
+ */
+//#define NOZZLE_CLEAN_FEATURE
+
+#if ENABLED(NOZZLE_CLEAN_FEATURE)
+ // Default number of pattern repetitions
+ #define NOZZLE_CLEAN_STROKES 12
+
+ // Default number of triangles
+ #define NOZZLE_CLEAN_TRIANGLES 3
+
+ // Specify positions as { X, Y, Z }
+ #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
+ #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
+
+ // Circular pattern radius
+ #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
+ // Circular pattern circle fragments number
+ #define NOZZLE_CLEAN_CIRCLE_FN 10
+ // Middle point of circle
+ #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
+
+ // Moves the nozzle to the initial position
+ #define NOZZLE_CLEAN_GOBACK
+#endif
+
+/**
+ * Print Job Timer
+ *
+ * Automatically start and stop the print job timer on M104/M109/M190.
+ *
+ * M104 (hotend, no wait) - high temp = none, low temp = stop timer
+ * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
+ * M190 (bed, wait) - high temp = start timer, low temp = none
+ *
+ * The timer can also be controlled with the following commands:
+ *
+ * M75 - Start the print job timer
+ * M76 - Pause the print job timer
+ * M77 - Stop the print job timer
+ */
+#define PRINTJOB_TIMER_AUTOSTART
+
+/**
+ * Print Counter
+ *
+ * Track statistical data such as:
+ *
+ * - Total print jobs
+ * - Total successful print jobs
+ * - Total failed print jobs
+ * - Total time printing
+ *
+ * View the current statistics with M78.
+ */
+//#define PRINTCOUNTER
+
+//=============================================================================
+//============================= LCD and SD support ============================
+//=============================================================================
+
+// @section lcd
+
+/**
+ * LCD LANGUAGE
+ *
+ * Select the language to display on the LCD. These languages are available:
+ *
+ * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
+ * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test
+ *
+ * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
+ */
+#define LCD_LANGUAGE en
+
+/**
+ * LCD Character Set
+ *
+ * Note: This option is NOT applicable to Graphical Displays.
+ *
+ * All character-based LCDs provide ASCII plus one of these
+ * language extensions:
+ *
+ * - JAPANESE ... the most common
+ * - WESTERN ... with more accented characters
+ * - CYRILLIC ... for the Russian language
+ *
+ * To determine the language extension installed on your controller:
+ *
+ * - Compile and upload with LCD_LANGUAGE set to 'test'
+ * - Click the controller to view the LCD menu
+ * - The LCD will display Japanese, Western, or Cyrillic text
+ *
+ * See http://marlinfw.org/docs/development/lcd_language.html
+ *
+ * :['JAPANESE', 'WESTERN', 'CYRILLIC']
+ */
+#define DISPLAY_CHARSET_HD44780 JAPANESE
+
+/**
+ * Info Screen Style (0:Classic, 1:Prusa)
+ *
+ * :[0:'Classic', 1:'Prusa']
+ */
+#define LCD_INFO_SCREEN_STYLE 0
+
+/**
+ * SD CARD
+ *
+ * SD Card support is disabled by default. If your controller has an SD slot,
+ * you must uncomment the following option or it won't work.
+ *
+ */
+#define SDSUPPORT
+
+/**
+ * SD CARD: SPI SPEED
+ *
+ * Enable one of the following items for a slower SPI transfer speed.
+ * This may be required to resolve "volume init" errors.
+ */
+//#define SPI_SPEED SPI_HALF_SPEED
+//#define SPI_SPEED SPI_QUARTER_SPEED
+//#define SPI_SPEED SPI_EIGHTH_SPEED
+
+/**
+ * SD CARD: ENABLE CRC
+ *
+ * Use CRC checks and retries on the SD communication.
+ */
+//#define SD_CHECK_AND_RETRY
+
+/**
+ * LCD Menu Items
+ *
+ * Disable all menus and only display the Status Screen, or
+ * just remove some extraneous menu items to recover space.
+ */
+//#define NO_LCD_MENUS
+//#define SLIM_LCD_MENUS
+
+//
+// ENCODER SETTINGS
+//
+// 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
+
+//
+// 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
+
+/**
+ * Encoder Direction Options
+ *
+ * Test your encoder's behavior first with both options disabled.
+ *
+ * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
+ * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION.
+ * Reversed Value Editing only? Enable BOTH options.
+ */
+
+//
+// This option reverses the encoder direction everywhere.
+//
+// Set this option if CLOCKWISE causes values to DECREASE
+//
+//#define REVERSE_ENCODER_DIRECTION
+
+//
+// This option reverses the encoder direction for navigating LCD menus.
+//
+// If CLOCKWISE normally moves DOWN this makes it go UP.
+// If CLOCKWISE normally moves UP this makes it go DOWN.
+//
+//#define REVERSE_MENU_DIRECTION
+
+//
+// Individual Axis Homing
+//
+// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
+//
+//#define INDIVIDUAL_AXIS_HOMING_MENU
+
+//
+// SPEAKER/BUZZER
+//
+// If you have a speaker that can produce tones, enable it here.
+// By default Marlin assumes you have a buzzer with a fixed frequency.
+//
+//#define SPEAKER
+
+//
+// The duration and frequency for the UI feedback sound.
+// Set these to 0 to disable audio feedback in the LCD menus.
+//
+// Note: Test audio output with the G-Code:
+// M300 S P
+//
+//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
+//#define LCD_FEEDBACK_FREQUENCY_HZ 5000
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//======================== (Character-based LCDs) =========================
+//=============================================================================
+
+//
+// RepRapDiscount Smart Controller.
+// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
+//
+// Note: Usually sold with a white PCB.
+//
+#define REPRAP_DISCOUNT_SMART_CONTROLLER
+
+//
+// Original RADDS LCD Display+Encoder+SDCardReader
+// http://doku.radds.org/dokumentation/lcd-display/
+//
+//#define RADDS_DISPLAY
+
+//
+// ULTIMAKER Controller.
+//
+//#define ULTIMAKERCONTROLLER
+
+//
+// ULTIPANEL as seen on Thingiverse.
+//
+//#define ULTIPANEL
+
+//
+// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
+// http://reprap.org/wiki/PanelOne
+//
+//#define PANEL_ONE
+
+//
+// GADGETS3D G3D LCD/SD Controller
+// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
+//
+// Note: Usually sold with a blue PCB.
+//
+//#define G3D_PANEL
+
+//
+// RigidBot Panel V1.0
+// http://www.inventapart.com/
+//
+//#define RIGIDBOT_PANEL
+
+//
+// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
+// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
+//
+//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
+
+//
+// ANET and Tronxy 20x4 Controller
+//
+//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
+ // This LCD is known to be susceptible to electrical interference
+ // which scrambles the display. Pressing any button clears it up.
+ // This is a LCD2004 display with 5 analog buttons.
+
+//
+// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
+//
+//#define ULTRA_LCD
+
+//=============================================================================
+//======================== LCD / Controller Selection =========================
+//===================== (I2C and Shift-Register LCDs) =====================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: I2C
+//
+// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C
+// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C
+//
+
+//
+// Elefu RA Board Control Panel
+// http://www.elefu.com/index.php?route=product/product&product_id=53
+//
+//#define RA_CONTROL_PANEL
+
+//
+// Sainsmart (YwRobot) LCD Displays
+//
+// These require F.Malpartida's LiquidCrystal_I2C library
+// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
+//
+//#define LCD_SAINSMART_I2C_1602
+//#define LCD_SAINSMART_I2C_2004
+
+//
+// Generic LCM1602 LCD adapter
+//
+//#define LCM1602
+
+//
+// PANELOLU2 LCD with status LEDs,
+// separate encoder and click inputs.
+//
+// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later.
+// For more info: https://github.com/lincomatic/LiquidTWI2
+//
+// Note: The PANELOLU2 encoder click input can either be directly connected to
+// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
+//
+//#define LCD_I2C_PANELOLU2
+
+//
+// Panucatt VIKI LCD with status LEDs,
+// integrated click & L/R/U/D buttons, separate encoder inputs.
+//
+//#define LCD_I2C_VIKI
+
+//
+// CONTROLLER TYPE: Shift register panels
+//
+
+//
+// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
+//
+//#define SAV_3DLCD
+
+//
+// 3-wire SR LCD with strobe using 74HC4094
+// https://github.com/mikeshub/SailfishLCD
+// Uses the code directly from Sailfish
+//
+//#define FF_INTERFACEBOARD
+
+//=============================================================================
+//======================= LCD / Controller Selection =======================
+//========================= (Graphical LCDs) ========================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Graphical 128x64 (DOGM)
+//
+// IMPORTANT: The U8glib library is required for Graphical Display!
+// https://github.com/olikraus/U8glib_Arduino
+//
+
+//
+// RepRapDiscount FULL GRAPHIC Smart Controller
+// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
+//
+//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
+
+//
+// ReprapWorld Graphical LCD
+// https://reprapworld.com/?products_details&products_id/1218
+//
+//#define REPRAPWORLD_GRAPHICAL_LCD
+
+//
+// Activate one of these if you have a Panucatt Devices
+// Viki 2.0 or mini Viki with Graphic LCD
+// http://panucatt.com
+//
+//#define VIKI2
+//#define miniVIKI
+
+//
+// MakerLab Mini Panel with graphic
+// controller and SD support - http://reprap.org/wiki/Mini_panel
+//
+//#define MINIPANEL
+
+//
+// MaKr3d Makr-Panel with graphic controller and SD support.
+// http://reprap.org/wiki/MaKr3d_MaKrPanel
+//
+//#define MAKRPANEL
+
+//
+// Adafruit ST7565 Full Graphic Controller.
+// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
+//
+//#define ELB_FULL_GRAPHIC_CONTROLLER
+
+//
+// BQ LCD Smart Controller shipped by
+// default with the BQ Hephestos 2 and Witbox 2.
+//
+//#define BQ_LCD_SMART_CONTROLLER
+
+//
+// Cartesio UI
+// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
+//
+//#define CARTESIO_UI
+
+//
+// LCD for Melzi Card with Graphical LCD
+//
+//#define LCD_FOR_MELZI
+
+//
+// SSD1306 OLED full graphics generic display
+//
+//#define U8GLIB_SSD1306
+
+//
+// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
+//
+//#define SAV_3DGLCD
+#if ENABLED(SAV_3DGLCD)
+ //#define U8GLIB_SSD1306
+ #define U8GLIB_SH1106
+#endif
+
+//
+// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
+// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
+//
+//#define ULTI_CONTROLLER
+
+//
+// TinyBoy2 128x64 OLED / Encoder Panel
+//
+//#define OLED_PANEL_TINYBOY2
+
+//
+// MKS MINI12864 with graphic controller and SD support
+// http://reprap.org/wiki/MKS_MINI_12864
+//
+//#define MKS_MINI_12864
+
+//
+// Factory display for Creality CR-10
+// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
+//
+// This is RAMPS-compatible using a single 10-pin connector.
+// (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
+//
+//#define CR10_STOCKDISPLAY
+
+//
+// ANET and Tronxy Graphical Controller
+//
+// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
+// A clone of the RepRapDiscount full graphics display but with
+// different pins/wiring (see pins_ANET_10.h).
+//
+//#define ANET_FULL_GRAPHICS_LCD
+
+//
+// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
+// http://reprap.org/wiki/MKS_12864OLED
+//
+// Tiny, but very sharp OLED display
+//
+//#define MKS_12864OLED // Uses the SH1106 controller (default)
+//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
+
+//
+// AZSMZ 12864 LCD with SD
+// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html
+//
+//#define AZSMZ_12864
+
+//
+// Silvergate GLCD controller
+// http://github.com/android444/Silvergate
+//
+//#define SILVER_GATE_GLCD_CONTROLLER
+
+//
+// Extensible UI
+//
+// Enable third-party or vendor customized user interfaces that aren't
+// packaged with Marlin. Source code for the user interface will need to
+// be placed in "src/lcd/extensible_ui/lib"
+//
+//#define EXTENSIBLE_UI
+
+//=============================================================================
+//=============================== Graphical TFTs ==============================
+//=============================================================================
+
+//
+// MKS Robin 320x240 color display
+//
+//#define MKS_ROBIN_TFT
+
+//=============================================================================
+//============================ Other Controllers ============================
+//=============================================================================
+
+//
+// CONTROLLER TYPE: Standalone / Serial
+//
+
+//
+// LCD for Malyan M200 printers.
+//
+//#define MALYAN_LCD
+
+//
+// CONTROLLER TYPE: Keypad / Add-on
+//
+
+//
+// RepRapWorld REPRAPWORLD_KEYPAD v1.1
+// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
+//
+// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
+// is pressed, a value of 10.0 means 10mm per click.
+//
+//#define REPRAPWORLD_KEYPAD
+//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
+
+//=============================================================================
+//=============================== Extra Features ==============================
+//=============================================================================
+
+// @section extras
+
+// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
+//#define FAST_PWM_FAN
+
+// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
+// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
+// is too low, you should also increment SOFT_PWM_SCALE.
+//#define FAN_SOFT_PWM
+
+// Incrementing this by 1 will double the software PWM frequency,
+// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
+// However, control resolution will be halved for each increment;
+// at zero value, there are 128 effective control positions.
+#define SOFT_PWM_SCALE 0
+
+// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
+// be used to mitigate the associated resolution loss. If enabled,
+// some of the PWM cycles are stretched so on average the desired
+// duty cycle is attained.
+//#define SOFT_PWM_DITHER
+
+// Temperature status LEDs that display the hotend and bed temperature.
+// If all hotends, bed temperature, and target temperature are under 54C
+// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
+//#define TEMP_STAT_LEDS
+
+// M240 Triggers a camera by emulating a Canon RC-1 Remote
+// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
+//#define PHOTOGRAPH_PIN 23
+
+// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
+//#define SF_ARC_FIX
+
+// Support for the BariCUDA Paste Extruder
+//#define BARICUDA
+
+// Support for BlinkM/CyzRgb
+//#define BLINKM
+
+// Support for PCA9632 PWM LED driver
+//#define PCA9632
+
+// Support for PCA9533 PWM LED driver
+// https://github.com/mikeshub/SailfishRGB_LED
+//#define PCA9533
+
+/**
+ * RGB LED / LED Strip Control
+ *
+ * Enable support for an RGB LED connected to 5V digital pins, or
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
+ *
+ * Adds the M150 command to set the LED (or LED strip) color.
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
+ * luminance values can be set from 0 to 255.
+ * For Neopixel LED an overall brightness parameter is also available.
+ *
+ * *** CAUTION ***
+ * LED Strips require a MOSFET Chip between PWM lines and LEDs,
+ * as the Arduino cannot handle the current the LEDs will require.
+ * Failure to follow this precaution can destroy your Arduino!
+ * NOTE: A separate 5V power supply is required! The Neopixel LED needs
+ * more current than the Arduino 5V linear regulator can produce.
+ * *** CAUTION ***
+ *
+ * LED Type. Enable only one of the following two options.
+ *
+ */
+//#define RGB_LED
+//#define RGBW_LED
+
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ #define RGB_LED_R_PIN 34
+ #define RGB_LED_G_PIN 43
+ #define RGB_LED_B_PIN 35
+ #define RGB_LED_W_PIN -1
+#endif
+
+// Support for Adafruit Neopixel LED driver
+//#define NEOPIXEL_LED
+#if ENABLED(NEOPIXEL_LED)
+ #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
+ #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba)
+ #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip
+ #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
+ #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
+ //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
+#endif
+
+/**
+ * Printer Event LEDs
+ *
+ * During printing, the LEDs will reflect the printer status:
+ *
+ * - Gradually change from blue to violet as the heated bed gets to target temp
+ * - Gradually change from violet to red as the hotend gets to temperature
+ * - Change to white to illuminate work surface
+ * - Change to green once print has finished
+ * - Turn off after the print has finished and the user has pushed a button
+ */
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
+ #define PRINTER_EVENT_LEDS
+#endif
+
+/**
+ * R/C SERVO support
+ * Sponsored by TrinityLabs, Reworked by codexmas
+ */
+
+/**
+ * Number of servos
+ *
+ * For some servo-related options NUM_SERVOS will be set automatically.
+ * Set this manually if there are extra servos needing manual control.
+ * Leave undefined or set to 0 to entirely disable the servo subsystem.
+ */
+//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
+
+// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
+// 300ms is a good value but you can try less delay.
+// If the servo can't reach the requested position, increase it.
+#define SERVO_DELAY { 300 }
+
+// Only power servos during movement, otherwise leave off to prevent jitter
+//#define DEACTIVATE_SERVOS_AFTER_MOVE
+
+// Allow servo angle to be edited and saved to EEPROM
+//#define EDITABLE_SERVO_ANGLES
diff --git a/Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h b/Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h
new file mode 100644
index 0000000000..a5564b4526
--- /dev/null
+++ b/Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h
@@ -0,0 +1,2251 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * Configuration_adv.h
+ *
+ * Advanced settings.
+ * Only change these if you know exactly what you're doing.
+ * Some of these settings can damage your printer if improperly set!
+ *
+ * Basic settings can be found in Configuration.h
+ *
+ */
+#define CONFIGURATION_ADV_H_VERSION 020000
+
+// @section temperature
+
+//===========================================================================
+//=============================Thermal Settings ============================
+//===========================================================================
+
+//
+// Hephestos 2 24V heated bed upgrade kit.
+// https://store.bq.com/en/heated-bed-kit-hephestos2
+//
+//#define HEPHESTOS2_HEATED_BED_KIT
+#if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
+ #undef TEMP_SENSOR_BED
+ #define TEMP_SENSOR_BED 70
+ #define HEATER_BED_INVERTING true
+#endif
+
+#if DISABLED(PIDTEMPBED)
+ #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control
+ #if ENABLED(BED_LIMIT_SWITCHING)
+ #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS
+ #endif
+#endif
+
+/**
+ * Thermal Protection provides additional protection to your printer from damage
+ * and fire. Marlin always includes safe min and max temperature ranges which
+ * protect against a broken or disconnected thermistor wire.
+ *
+ * The issue: If a thermistor falls out, it will report the much lower
+ * temperature of the air in the room, and the the firmware will keep
+ * the heater on.
+ *
+ * The solution: Once the temperature reaches the target, start observing.
+ * If the temperature stays too far below the target (hysteresis) for too
+ * long (period), the firmware will halt the machine as a safety precaution.
+ *
+ * If you get false positives for "Thermal Runaway", increase
+ * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
+ */
+#if ENABLED(THERMAL_PROTECTION_HOTENDS)
+ #define THERMAL_PROTECTION_PERIOD 40 // Seconds
+ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
+
+ //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
+
+ /**
+ * Whenever an M104, M109, or M303 increases the target temperature, the
+ * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
+ * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
+ * requires a hard reset. This test restarts with any M104/M109/M303, but only
+ * if the current temperature is far enough below the target for a reliable
+ * test.
+ *
+ * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
+ * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
+ * below 2.
+ */
+ #define WATCH_TEMP_PERIOD 20 // Seconds
+ #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+/**
+ * Thermal Protection parameters for the bed are just as above for hotends.
+ */
+#if ENABLED(THERMAL_PROTECTION_BED)
+ #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
+ #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
+
+ /**
+ * As described above, except for the bed (M140/M190/M303).
+ */
+ #define WATCH_BED_TEMP_PERIOD 60 // Seconds
+ #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
+#endif
+
+#if ENABLED(PIDTEMP)
+ // this adds an experimental additional term to the heating power, proportional to the extrusion speed.
+ // if Kc is chosen well, the additional required power due to increased melting should be compensated.
+ //#define PID_EXTRUSION_SCALING
+ #if ENABLED(PID_EXTRUSION_SCALING)
+ #define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
+ #define LPQ_MAX_LEN 50
+ #endif
+#endif
+
+/**
+ * Automatic Temperature:
+ * The hotend target temperature is calculated by all the buffered lines of gcode.
+ * The maximum buffered steps/sec of the extruder motor is called "se".
+ * Start autotemp mode with M109 S B F
+ * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
+ * mintemp and maxtemp. Turn this off by executing M109 without F*
+ * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
+ * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
+ */
+#define AUTOTEMP
+#if ENABLED(AUTOTEMP)
+ #define AUTOTEMP_OLDWEIGHT 0.98
+#endif
+
+// Show extra position information in M114
+//#define M114_DETAIL
+
+// Show Temperature ADC value
+// Enable for M105 to include ADC values read from temperature sensors.
+//#define SHOW_TEMP_ADC_VALUES
+
+/**
+ * High Temperature Thermistor Support
+ *
+ * Thermistors able to support high temperature tend to have a hard time getting
+ * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
+ * will probably be caught when the heating element first turns on during the
+ * preheating process, which will trigger a min_temp_error as a safety measure
+ * and force stop everything.
+ * To circumvent this limitation, we allow for a preheat time (during which,
+ * min_temp_error won't be triggered) and add a min_temp buffer to handle
+ * aberrant readings.
+ *
+ * If you want to enable this feature for your hotend thermistor(s)
+ * uncomment and set values > 0 in the constants below
+ */
+
+// The number of consecutive low temperature errors that can occur
+// before a min_temp_error is triggered. (Shouldn't be more than 10.)
+//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
+
+// The number of milliseconds a hotend will preheat before starting to check
+// the temperature. This value should NOT be set to the time it takes the
+// hot end to reach the target temperature, but the time it takes to reach
+// the minimum temperature your thermistor can read. The lower the better/safer.
+// This shouldn't need to be more than 30 seconds (30000)
+//#define MILLISECONDS_PREHEAT_TIME 0
+
+// @section extruder
+
+// Extruder runout prevention.
+// If the machine is idle and the temperature over MINTEMP
+// then extrude some filament every couple of SECONDS.
+//#define EXTRUDER_RUNOUT_PREVENT
+#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
+ #define EXTRUDER_RUNOUT_MINTEMP 190
+ #define EXTRUDER_RUNOUT_SECONDS 30
+ #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m)
+ #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm)
+#endif
+
+// @section temperature
+
+// Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
+// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
+#define TEMP_SENSOR_AD595_OFFSET 0.0
+#define TEMP_SENSOR_AD595_GAIN 1.0
+#define TEMP_SENSOR_AD8495_OFFSET 0.0
+#define TEMP_SENSOR_AD8495_GAIN 1.0
+
+/**
+ * Controller Fan
+ * To cool down the stepper drivers and MOSFETs.
+ *
+ * The fan will turn on automatically whenever any stepper is enabled
+ * and turn off after a set period after all steppers are turned off.
+ */
+//#define USE_CONTROLLER_FAN
+#if ENABLED(USE_CONTROLLER_FAN)
+ //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
+ #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
+ #define CONTROLLERFAN_SPEED 255 // 255 == full speed
+#endif
+
+// 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
+
+/**
+ * PWM Fan Scaling
+ *
+ * Define the min/max speeds for PWM fans (as set with M106).
+ *
+ * With these options the M106 0-255 value range is scaled to a subset
+ * to ensure that the fan has enough power to spin, or to run lower
+ * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
+ * Value 0 always turns off the fan.
+ *
+ * Define one or both of these to override the default 0-255 range.
+ */
+//#define FAN_MIN_PWM 50
+//#define FAN_MAX_PWM 128
+
+// @section extruder
+
+/**
+ * Extruder cooling fans
+ *
+ * Extruder auto fans automatically turn on when their extruders'
+ * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
+ *
+ * Your board's pins file specifies the recommended pins. Override those here
+ * or set to -1 to disable completely.
+ *
+ * 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 -1
+#define E1_AUTO_FAN_PIN -1
+#define E2_AUTO_FAN_PIN -1
+#define E3_AUTO_FAN_PIN -1
+#define E4_AUTO_FAN_PIN -1
+#define E5_AUTO_FAN_PIN -1
+#define CHAMBER_AUTO_FAN_PIN -1
+#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
+#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
+
+/**
+ * Part-Cooling Fan Multiplexer
+ *
+ * This feature allows you to digitally multiplex the fan output.
+ * The multiplexer is automatically switched at tool-change.
+ * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
+ */
+#define FANMUX0_PIN -1
+#define FANMUX1_PIN -1
+#define FANMUX2_PIN -1
+
+/**
+ * M355 Case Light on-off / brightness
+ */
+//#define CASE_LIGHT_ENABLE
+#if ENABLED(CASE_LIGHT_ENABLE)
+ //#define CASE_LIGHT_PIN 4 // 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 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)
+ #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
+ #endif
+#endif
+
+//===========================================================================
+//============================ Mechanical Settings ==========================
+//===========================================================================
+
+// @section homing
+
+// If you want endstops to stay on (by default) even when not homing
+// enable this option. Override at any time with M120, M121.
+//#define ENDSTOPS_ALWAYS_ON_DEFAULT
+
+// @section extras
+
+//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
+
+// Employ an external closed loop controller. Override pins here if needed.
+//#define EXTERNAL_CLOSED_LOOP_CONTROLLER
+#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
+ //#define CLOSED_LOOP_ENABLE_PIN -1
+ //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
+#endif
+
+/**
+ * Dual Steppers / Dual Endstops
+ *
+ * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
+ *
+ * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
+ * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
+ * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
+ * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
+ *
+ * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
+ * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
+ * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'.
+ */
+
+//#define X_DUAL_STEPPER_DRIVERS
+#if ENABLED(X_DUAL_STEPPER_DRIVERS)
+ #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
+ //#define X_DUAL_ENDSTOPS
+ #if ENABLED(X_DUAL_ENDSTOPS)
+ #define X2_USE_ENDSTOP _XMAX_
+ #define X_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Y_DUAL_STEPPER_DRIVERS
+#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
+ #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
+ //#define Y_DUAL_ENDSTOPS
+ #if ENABLED(Y_DUAL_ENDSTOPS)
+ #define Y2_USE_ENDSTOP _YMAX_
+ #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+#define Z_DUAL_STEPPER_DRIVERS
+#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
+ //#define Z_DUAL_ENDSTOPS
+ #if ENABLED(Z_DUAL_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0
+ #endif
+#endif
+
+//#define Z_TRIPLE_STEPPER_DRIVERS
+#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS)
+ //#define Z_TRIPLE_ENDSTOPS
+ #if ENABLED(Z_TRIPLE_ENDSTOPS)
+ #define Z2_USE_ENDSTOP _XMAX_
+ #define Z3_USE_ENDSTOP _YMAX_
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0
+ #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0
+ #endif
+#endif
+
+/**
+ * Dual X Carriage
+ *
+ * This setup has two X carriages that can move independently, each with its own hotend.
+ * The carriages can be used to print an object with two colors or materials, or in
+ * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
+ * The inactive carriage is parked automatically to prevent oozing.
+ * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
+ * By default the X2 stepper is assigned to the first unused E plug on the board.
+ */
+//#define DUAL_X_CARRIAGE
+#if ENABLED(DUAL_X_CARRIAGE)
+ #define X1_MIN_POS X_MIN_POS // set minimum to ensure first x-carriage doesn't hit the parked second X-carriage
+ #define X1_MAX_POS X_BED_SIZE // set maximum to ensure first x-carriage doesn't hit the parked second X-carriage
+ #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
+ #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
+ #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
+ #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
+ // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
+ // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
+ // without modifying the firmware (through the "M218 T1 X???" command).
+ // Remember: you should set the second extruder x-offset to 0 in your slicer.
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
+
+ // This is the default power-up mode which can be later using M605.
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
+
+ // Default x offset in duplication mode (typically set to half print bed width)
+ #define DEFAULT_DUPLICATION_X_OFFSET 100
+
+#endif // DUAL_X_CARRIAGE
+
+// Activate a solenoid on the active extruder with M380. Disable all with M381.
+// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
+//#define EXT_SOLENOID
+
+// @section homing
+
+// Homing hits each endstop, retracts by these distances, then does a slower bump.
+#define X_HOME_BUMP_MM 5
+#define Y_HOME_BUMP_MM 5
+#define Z_HOME_BUMP_MM 2
+#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
+//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially
+
+// When G28 is called, this option will make Y home before X
+//#define HOME_Y_BEFORE_X
+
+// Enable this if X or Y can't home without homing the other axis first.
+//#define CODEPENDENT_XY_HOMING
+
+/**
+ * Z Steppers Auto-Alignment
+ * Add the G34 command to align multiple Z steppers using a bed probe.
+ */
+//#define Z_STEPPER_AUTO_ALIGN
+#if ENABLED(Z_STEPPER_AUTO_ALIGN)
+ // Define probe X and Y positions for Z1, Z2 [, Z3]
+ #define Z_STEPPER_ALIGN_X { 10, 150, 290 }
+ #define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
+ // Set number of iterations to align
+ #define Z_STEPPER_ALIGN_ITERATIONS 3
+ // Enable to restore leveling setup after operation
+ #define RESTORE_LEVELING_AFTER_G34
+ // Use the amplification factor to de-/increase correction step.
+ // In case the stepper (spindle) position is further out than the test point
+ // Use a value > 1. NOTE: This may cause instability
+ #define Z_STEPPER_ALIGN_AMP 1.0
+ // Stop criterion. If the accuracy is better than this stop iterating early
+ #define Z_STEPPER_ALIGN_ACC 0.02
+#endif
+
+// @section machine
+
+#define AXIS_RELATIVE_MODES {false, false, false, false}
+
+// Allow duplication mode with a basic dual-nozzle extruder
+//#define DUAL_NOZZLE_DUPLICATION_MODE
+
+// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
+#define INVERT_X_STEP_PIN false
+#define INVERT_Y_STEP_PIN false
+#define INVERT_Z_STEP_PIN false
+#define INVERT_E_STEP_PIN false
+
+// Default stepper release if idle. Set to 0 to deactivate.
+// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
+// Time can be set by M18 and M84.
+#define DEFAULT_STEPPER_DEACTIVE_TIME 120
+#define DISABLE_INACTIVE_X true
+#define DISABLE_INACTIVE_Y true
+#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished.
+#define DISABLE_INACTIVE_E true
+
+#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
+#define DEFAULT_MINTRAVELFEEDRATE 0.0
+
+//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
+
+// @section lcd
+
+#if ENABLED(ULTIPANEL)
+ #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
+ #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions
+ #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder
+#endif
+
+// @section extras
+
+// minimum time in microseconds that a movement needs to take if the buffer is emptied.
+#define DEFAULT_MINSEGMENTTIME 20000
+
+// If defined the movements slow down when the look ahead buffer is only half full
+#define SLOWDOWN
+
+// Frequency limit
+// See nophead's blog for more info
+// Not working O
+//#define XY_FREQUENCY_LIMIT 15
+
+// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
+// of the buffer and all stops. This should not be much greater than zero and should only be changed
+// if unwanted behavior is observed on a user's machine when running at very slow speeds.
+#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s)
+
+//
+// Backlash Compensation
+// Adds extra movement to axes on direction-changes to account for backlash.
+//
+//#define BACKLASH_COMPENSATION
+#if ENABLED(BACKLASH_COMPENSATION)
+ // Define values for backlash distance and correction.
+ // If BACKLASH_GCODE is enabled these values are the defaults.
+ #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
+ #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
+
+ // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
+ // to reduce print artifacts. (Enabling this is costly in memory and computation!)
+ //#define BACKLASH_SMOOTHING_MM 3 // (mm)
+
+ // Add runtime configuration and tuning of backlash values (M425)
+ //#define BACKLASH_GCODE
+
+ #if ENABLED(BACKLASH_GCODE)
+ // Measure the Z backlash when probing (G29) and set with "M425 Z"
+ #define MEASURE_BACKLASH_WHEN_PROBING
+
+ #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
+ // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
+ // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
+ // increments while checking for the contact to be broken.
+ #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm)
+ #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm)
+ #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m)
+ #endif
+ #endif
+#endif
+
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
+/**
+ * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
+ * lowest stepping frequencies.
+ */
+//#define ADAPTIVE_STEP_SMOOTHING
+
+/**
+ * Custom Microstepping
+ * Override as-needed for your setup. Up to 3 MS pins are supported.
+ */
+//#define MICROSTEP1 LOW,LOW,LOW
+//#define MICROSTEP2 HIGH,LOW,LOW
+//#define MICROSTEP4 LOW,HIGH,LOW
+//#define MICROSTEP8 HIGH,HIGH,LOW
+//#define MICROSTEP16 LOW,LOW,HIGH
+//#define MICROSTEP32 HIGH,LOW,HIGH
+
+// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU.
+#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
+
+/**
+ * @section stepper motor current
+ *
+ * Some boards have a means of setting the stepper motor current via firmware.
+ *
+ * The power on motor currents are set by:
+ * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
+ * known compatible chips: A4982
+ * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
+ * known compatible chips: AD5206
+ * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
+ * known compatible chips: MCP4728
+ * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE
+ * known compatible chips: MCP4451, MCP4018
+ *
+ * Motor currents can also be set by M907 - M910 and by the LCD.
+ * M907 - applies to all.
+ * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
+ * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
+ */
+//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
+//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
+//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
+
+// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro)
+//#define DIGIPOT_I2C
+#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A)
+ /**
+ * Common slave addresses:
+ *
+ * A (A shifted) B (B shifted) IC
+ * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
+ * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
+ * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451
+ * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
+ */
+ #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT
+ #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT
+#endif
+
+//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster
+#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5
+// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
+// These correspond to the physical drivers, so be mindful if the order is changed.
+#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
+
+//===========================================================================
+//=============================Additional Features===========================
+//===========================================================================
+
+// @section lcd
+
+// Change values more rapidly when the encoder is rotated faster
+#define ENCODER_RATE_MULTIPLIER
+#if ENABLED(ENCODER_RATE_MULTIPLIER)
+ #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed
+ #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed
+#endif
+
+// Play a beep when the feedrate is changed from the Status Screen
+//#define BEEP_ON_FEEDRATE_CHANGE
+#if ENABLED(BEEP_ON_FEEDRATE_CHANGE)
+ #define FEEDRATE_CHANGE_BEEP_DURATION 10
+ #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
+#endif
+
+// Include a page of printer information in the LCD Main Menu
+//#define LCD_INFO_MENU
+
+// Scroll a longer status message into view
+//#define STATUS_MESSAGE_SCROLLING
+
+// On the Info Screen, display XY with one decimal place when possible
+//#define LCD_DECIMAL_SMALL_XY
+
+// The timeout (in ms) to return to the status screen from sub-menus
+//#define LCD_TIMEOUT_TO_STATUS 15000
+
+// Add an 'M73' G-code to set the current percentage
+//#define LCD_SET_PROGRESS_MANUALLY
+
+#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
+ //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
+ #if ENABLED(LCD_PROGRESS_BAR)
+ #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
+ #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
+ #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
+ //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
+ //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
+ #endif
+#endif
+
+/**
+ * LED Control Menu
+ * Enable this feature to add LED Control to the LCD menu
+ */
+//#define LED_CONTROL_MENU
+#if ENABLED(LED_CONTROL_MENU)
+ #define LED_COLOR_PRESETS // Enable the Preset Color menu option
+ #if ENABLED(LED_COLOR_PRESETS)
+ #define LED_USER_PRESET_RED 255 // User defined RED value
+ #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
+ #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
+ #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
+ #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
+ //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
+ #endif
+#endif // LED_CONTROL_MENU
+
+#if ENABLED(SDSUPPORT)
+
+ // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
+ // around this by connecting a push button or single throw switch to the pin defined
+ // as SD_DETECT_PIN in your board's pins definitions.
+ // This setting should be disabled unless you are using a push button, pulling the pin to ground.
+ // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
+ #define SD_DETECT_INVERTED
+
+ #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
+ #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
+
+ // Reverse SD sort to show "more recent" files first, according to the card's FAT.
+ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
+ #define SDCARD_RATHERRECENTFIRST
+
+ // Add an option in the menu to run all auto#.g files
+ //#define MENU_ADDAUTOSTART
+
+ /**
+ * Continue after Power-Loss (Creality3D)
+ *
+ * Store the current state to the SD Card at the start of each layer
+ * during SD printing. If the recovery file is found at boot time, present
+ * an option on the LCD screen to continue the print from the last-known
+ * point in the file.
+ */
+ //#define POWER_LOSS_RECOVERY
+ #if ENABLED(POWER_LOSS_RECOVERY)
+ //#define POWER_LOSS_PIN 44 // Pin to detect power loss
+ //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
+ #endif
+
+ /**
+ * Sort SD file listings in alphabetical order.
+ *
+ * With this option enabled, items on SD cards will be sorted
+ * by name for easier navigation.
+ *
+ * By default...
+ *
+ * - Use the slowest -but safest- method for sorting.
+ * - Folders are sorted to the top.
+ * - The sort key is statically allocated.
+ * - No added G-code (M34) support.
+ * - 40 item sorting limit. (Items after the first 40 are unsorted.)
+ *
+ * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
+ * compiler to calculate the worst-case usage and throw an error if the SRAM
+ * limit is exceeded.
+ *
+ * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
+ * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
+ * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
+ * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
+ */
+ //#define SDCARD_SORT_ALPHA
+
+ // SD Card Sorting options
+ #if ENABLED(SDCARD_SORT_ALPHA)
+ #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
+ #define FOLDER_SORTING -1 // -1=above 0=none 1=below
+ #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
+ #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
+ #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
+ #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
+ #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
+ #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
+ // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
+ #endif
+
+ // This allows hosts to request long names for files and folders with M33
+ //#define LONG_FILENAME_HOST_SUPPORT
+
+ // Enable this option to scroll long filenames in the SD card menu
+ //#define SCROLL_LONG_FILENAMES
+
+ /**
+ * This option allows you to abort SD printing when any endstop is triggered.
+ * This feature must be enabled with "M540 S1" or from the LCD menu.
+ * To have any effect, endstops must be enabled during SD printing.
+ */
+ //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+
+ /**
+ * This option makes it easier to print the same SD Card file again.
+ * On print completion the LCD Menu will open with the file selected.
+ * You can just click to start the print, or navigate elsewhere.
+ */
+ //#define SD_REPRINT_LAST_SELECTED_FILE
+
+ /**
+ * Auto-report SdCard status with M27 S
+ */
+ //#define AUTO_REPORT_SD_STATUS
+
+ /**
+ * Support for USB thumb drives using an Arduino USB Host Shield or
+ * equivalent MAX3421E breakout board. The USB thumb drive will appear
+ * to Marlin as an SD card.
+ *
+ * The MAX3421E must be assigned the same pins as the SD card reader, with
+ * the following pin mapping:
+ *
+ * SCLK, MOSI, MISO --> SCLK, MOSI, MISO
+ * INT --> SD_DETECT_PIN
+ * SS --> SDSS
+ */
+ //#define USB_FLASH_DRIVE_SUPPORT
+ #if ENABLED(USB_FLASH_DRIVE_SUPPORT)
+ #define USB_CS_PIN SDSS
+ #define USB_INTR_PIN SD_DETECT_PIN
+ #endif
+
+ /**
+ * When using a bootloader that supports SD-Firmware-Flashing,
+ * add a menu item to activate SD-FW-Update on the next reboot.
+ *
+ * Requires ATMEGA2560 (Arduino Mega)
+ *
+ * Tested with this bootloader:
+ * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560
+ */
+ //#define SD_FIRMWARE_UPDATE
+ #if ENABLED(SD_FIRMWARE_UPDATE)
+ #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF
+ #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0
+ #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF
+ #endif
+
+ // Add an optimized binary file transfer mode, initiated with 'M28 B1'
+ //#define FAST_FILE_TRANSFER
+
+#endif // SDSUPPORT
+
+/**
+ * Additional options for Graphical Displays
+ *
+ * Use the optimizations here to improve printing performance,
+ * which can be adversely affected by graphical display drawing,
+ * especially when doing several short moves, and when printing
+ * on DELTA and SCARA machines.
+ *
+ * Some of these options may result in the display lagging behind
+ * controller events, as there is a trade-off between reliable
+ * printing performance versus fast display updates.
+ */
+#if HAS_GRAPHICAL_LCD
+ // Show SD percentage next to the progress bar
+ //#define DOGM_SD_PERCENT
+
+ // Enable to save many cycles by drawing a hollow frame on the Info Screen
+ #define XYZ_HOLLOW_FRAME
+
+ // Enable to save many cycles by drawing a hollow frame on Menu Screens
+ #define MENU_HOLLOW_FRAME
+
+ // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_BIG_EDIT_FONT
+
+ // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
+ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
+ //#define USE_SMALL_INFOFONT
+
+ // Enable this option and reduce the value to optimize screen updates.
+ // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
+ //#define DOGM_SPI_DELAY_US 5
+
+ // Swap the CW/CCW indicators in the graphics overlay
+ //#define OVERLAY_GFX_REVERSE
+
+ /**
+ * ST7920-based LCDs can emulate a 16 x 4 character display using
+ * the ST7920 character-generator for very fast screen updates.
+ * Enable LIGHTWEIGHT_UI to use this special display mode.
+ *
+ * Since LIGHTWEIGHT_UI has limited space, the position and status
+ * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
+ * length of time to display the status message before clearing.
+ *
+ * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
+ * This will prevent position updates from being displayed.
+ */
+ #if ENABLED(U8GLIB_ST7920)
+ //#define LIGHTWEIGHT_UI
+ #if ENABLED(LIGHTWEIGHT_UI)
+ #define STATUS_EXPIRE_SECONDS 20
+ #endif
+ #endif
+
+ /**
+ * Status (Info) Screen customizations
+ * These options may affect code size and screen render time.
+ * Custom status screens can forcibly override these settings.
+ */
+ //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones
+ //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends)
+ #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM)
+ #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
+ #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
+ //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
+ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
+ //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
+ //#define STATUS_HEAT_PERCENT // Show heating in a progress bar
+
+#endif // HAS_GRAPHICAL_LCD
+
+// @section safety
+
+// The hardware watchdog should reset the microcontroller disabling all outputs,
+// in case the firmware gets stuck and doesn't do temperature regulation.
+#define USE_WATCHDOG
+
+#if ENABLED(USE_WATCHDOG)
+ // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
+ // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
+ // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
+ //#define WATCHDOG_RESET_MANUAL
+#endif
+
+// @section lcd
+
+/**
+ * Babystepping enables movement of the axes by tiny increments without changing
+ * the current position values. This feature is used primarily to adjust the Z
+ * axis in the first layer of a print in real-time.
+ *
+ * Warning: Does not respect endstops!
+ */
+//#define BABYSTEPPING
+#if ENABLED(BABYSTEPPING)
+ //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
+ #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
+ #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion.
+
+ //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
+ #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
+ #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
+ // Note: Extra time may be added to mitigate controller latency.
+ #endif
+
+ //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
+ #if ENABLED(MOVE_Z_WHEN_IDLE)
+ #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
+ #endif
+
+ //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
+ #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
+ //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
+ //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
+ #endif
+#endif
+
+// @section extruder
+
+/**
+ * Linear Pressure Control v1.5
+ *
+ * Assumption: advance [steps] = k * (delta velocity [steps/s])
+ * K=0 means advance disabled.
+ *
+ * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
+ *
+ * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
+ * Larger K values will be needed for flexible filament and greater distances.
+ * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
+ * print acceleration will be reduced during the affected moves to keep within the limit.
+ *
+ * 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
+#if ENABLED(LIN_ADVANCE)
+ #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
+ //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
+#endif
+
+// @section leveling
+
+#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL)
+ // Override the mesh area if the automatic (max) area is too large
+ //#define MESH_MIN_X MESH_INSET
+ //#define MESH_MIN_Y MESH_INSET
+ //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
+ //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
+#endif
+
+/**
+ * Repeatedly attempt G29 leveling until it succeeds.
+ * Stop after G29_MAX_RETRIES attempts.
+ */
+//#define G29_RETRY_AND_RECOVER
+#if ENABLED(G29_RETRY_AND_RECOVER)
+ #define G29_MAX_RETRIES 3
+ #define G29_HALT_ON_FAILURE
+ /**
+ * Specify the GCODE commands that will be executed when leveling succeeds,
+ * between attempts, and after the maximum number of retries have been tried.
+ */
+ #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
+ #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
+ #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
+
+#endif
+
+// @section extras
+
+//
+// G2/G3 Arc Support
+//
+#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
+#if ENABLED(ARC_SUPPORT)
+ #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
+ #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
+ //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
+ //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
+#endif
+
+// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
+//#define BEZIER_CURVE_SUPPORT
+
+// G38.2 and G38.3 Probe Target
+// Set MULTIPLE_PROBING if you want G38 to double touch
+//#define G38_PROBE_TARGET
+#if ENABLED(G38_PROBE_TARGET)
+ #define G38_MINIMUM_MOVE 0.0275 // minimum distance in mm that will produce a move (determined using the print statement in check_move)
+#endif
+
+// Moves (or segments) with fewer steps than this will be joined with the next move
+#define MIN_STEPS_PER_SEGMENT 6
+
+/**
+ * Minimum delay after setting the stepper DIR (in ns)
+ * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
+ * 20 : Minimum for TMC2xxx drivers
+ * 200 : Minimum for A4988 drivers
+ * 400 : Minimum for A5984 drivers
+ * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
+ * 650 : Minimum for DRV8825 drivers
+ * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
+ * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_DIR_DELAY 650
+
+/**
+ * Minimum stepper driver pulse width (in µs)
+ * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
+ * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers
+ * 2 : Minimum for DRV8825 stepper drivers
+ * 3 : Minimum for TB6600 stepper drivers
+ * 30 : Minimum for TB6560 stepper drivers
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MINIMUM_STEPPER_PULSE 2
+
+/**
+ * Maximum stepping rate (in Hz) the stepper driver allows
+ * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
+ * 500000 : Maximum for A4988 stepper driver
+ * 400000 : Maximum for TMC2xxx stepper drivers
+ * 250000 : Maximum for DRV8825 stepper driver
+ * 150000 : Maximum for TB6600 stepper driver
+ * 130000 : Maximum for LV8729 stepper driver
+ * 15000 : Maximum for TB6560 stepper driver
+ *
+ * Override the default value based on the driver type set in Configuration.h.
+ */
+//#define MAXIMUM_STEPPER_RATE 250000
+
+// @section temperature
+
+// Control heater 0 and heater 1 in parallel.
+//#define HEATERS_PARALLEL
+
+//===========================================================================
+//================================= Buffers =================================
+//===========================================================================
+
+// @section hidden
+
+// 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
+#else
+ #define BLOCK_BUFFER_SIZE 16 // maximize block buffer
+#endif
+
+// @section serial
+
+// The ASCII buffer for serial input
+#define MAX_CMD_SIZE 96
+#define BUFSIZE 4
+
+// Transmission to Host Buffer Size
+// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
+// To buffer a simple "ok" you need 4 bytes.
+// For ADVANCED_OK (M105) you need 32 bytes.
+// For debug-echo: 128 bytes for the optimal speed.
+// Other output doesn't need to be that speedy.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
+#define TX_BUFFER_SIZE 0
+
+// Host Receive Buffer Size
+// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
+// To use flow control, set this buffer size to at least 1024 bytes.
+// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
+//#define RX_BUFFER_SIZE 1024
+
+#if RX_BUFFER_SIZE >= 1024
+ // Enable to have the controller send XON/XOFF control characters to
+ // the host to signal the RX buffer is becoming full.
+ //#define SERIAL_XON_XOFF
+#endif
+
+#if ENABLED(SDSUPPORT)
+ // Enable this option to collect and display the maximum
+ // RX queue usage after transferring a file to SD.
+ //#define SERIAL_STATS_MAX_RX_QUEUED
+
+ // Enable this option to collect and display the number
+ // of dropped bytes after a file transfer to SD.
+ //#define SERIAL_STATS_DROPPED_RX
+#endif
+
+// Enable an emergency-command parser to intercept certain commands as they
+// enter the serial receive buffer, so they cannot be blocked.
+// Currently handles M108, M112, M410
+// Does not work on boards using AT90USB (USBCON) processors!
+//#define EMERGENCY_PARSER
+
+// Bad Serial-connections can miss a received command by sending an 'ok'
+// Therefore some clients abort after 30 seconds in a timeout.
+// Some other clients start sending commands while receiving a 'wait'.
+// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
+//#define NO_TIMEOUTS 1000 // Milliseconds
+
+// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
+//#define ADVANCED_OK
+
+// Printrun may have trouble receiving long strings all at once.
+// This option inserts short delays between lines of serial output.
+#define SERIAL_OVERRUN_PROTECTION
+
+// @section extras
+
+/**
+ * Extra Fan Speed
+ * Adds a secondary fan speed for each print-cooling fan.
+ * 'M106 P T3-255' : Set a secondary speed for
+ * 'M106 P T2' : Use the set secondary speed
+ * 'M106 P T1' : Restore the previous fan speed
+ */
+//#define EXTRA_FAN_SPEED
+
+/**
+ * Firmware-based and LCD-controlled retract
+ *
+ * Add G10 / G11 commands for automatic firmware-based retract / recover.
+ * Use M207 and M208 to define parameters for retract / recover.
+ *
+ * Use M209 to enable or disable auto-retract.
+ * With auto-retract enabled, all G1 E moves within the set range
+ * will be converted to firmware-based retract/recover moves.
+ *
+ * Be sure to turn off auto-retract during filament change.
+ *
+ * Note that M207 / M208 / M209 settings are saved to EEPROM.
+ *
+ */
+//#define FWRETRACT
+#if ENABLED(FWRETRACT)
+ #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM
+ #if ENABLED(FWRETRACT_AUTORETRACT)
+ #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
+ #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
+ #endif
+ #define RETRACT_LENGTH 3 // Default retract length (positive mm)
+ #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
+ #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
+ #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm)
+ #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
+ #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
+ #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
+ #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
+ #if ENABLED(MIXING_EXTRUDER)
+ //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously
+ #endif
+#endif
+
+/**
+ * Universal tool change settings.
+ * Applies to all types of extruders except where explicitly noted.
+ */
+#if EXTRUDERS > 1
+ // Z raise distance for tool-change, as needed for some extruders
+ #define TOOLCHANGE_ZRAISE 2 // (mm)
+
+ // Retract and prime filament on tool-change
+ //#define TOOLCHANGE_FILAMENT_SWAP
+ #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
+ #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
+ #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
+ #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
+ #endif
+
+ /**
+ * Position to park head during tool change.
+ * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
+ */
+ //#define TOOLCHANGE_PARK
+ #if ENABLED(TOOLCHANGE_PARK)
+ #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
+ #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m)
+ #endif
+#endif
+
+/**
+ * Advanced Pause
+ * Experimental feature for filament change support and for parking the nozzle when paused.
+ * Adds the GCode M600 for initiating filament change.
+ * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
+ *
+ * Requires an LCD display.
+ * Requires NOZZLE_PARK_FEATURE.
+ * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
+ */
+//#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.
+ // This short retract is done immediately, before parking the nozzle.
+ #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ // Set to 0 for manual unloading.
+ #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
+ #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
+ // 0 to disable start loading and skip to fast load only
+ #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
+ #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
+ #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
+ // For Bowden, the full length of the tube and nozzle.
+ // For direct drive, the full length of the nozzle.
+ //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
+ #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
+ #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
+ // Set to 0 for manual extrusion.
+ // Filament can be extruded repeatedly from the Filament Change menu
+ // until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
+
+ // Filament Unload does a Retract, Delay, and Purge first:
+ #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
+ #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
+ #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
+
+ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
+ #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 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_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
+#endif
+
+// @section tmc
+
+/**
+ * TMC26X Stepper Driver options
+ *
+ * The TMC26XStepper library is required for this stepper driver.
+ * https://github.com/trinamic/TMC26XStepper
+ */
+#if HAS_DRIVER(TMC26X)
+
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
+
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
+
+#endif // TMC26X
+
+// @section tmc_smart
+
+/**
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * You may also use software SPI if you wish to use general purpose IO pins.
+ *
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
+ * The drivers can also be used with hardware serial.
+ *
+ * TMCStepper library is required to use TMC stepper drivers.
+ * https://github.com/teemuatlut/TMCStepper
+ */
+#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 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
+
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
+
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #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 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #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 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #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_12V
+
+ /**
+ * 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 S0/1 - 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 ENABLED(SENSORLESS_HOMING) || ENABLED(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/TMC2130Stepper
+ * https://github.com/teemuatlut/TMC2208Stepper
+ *
+ * Example:
+ * #define TMC_ADV() { \
+ * stepperX.diag0_temp_prewarn(1); \
+ * stepperY.interpolate(0); \
+ * }
+ */
+ #define TMC_ADV() { }
+
+#endif // HAS_TRINAMIC
+
+// @section L6470
+
+/**
+ * L6470 Stepper Driver options
+ *
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
+ * https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
+ */
+#if HAS_DRIVER(L6470)
+
+ //#define L6470_CHITCHAT // Display additional status info
+
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
+
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
+
+#endif // L6470
+
+/**
+ * TWI/I2C BUS
+ *
+ * This feature is an EXPERIMENTAL feature so it shall not be used on production
+ * machines. Enabling this will allow you to send and receive I2C data from slave
+ * devices on the bus.
+ *
+ * ; Example #1
+ * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
+ * ; It uses multiple M260 commands with one B arg
+ * M260 A99 ; Target slave address
+ * M260 B77 ; M
+ * M260 B97 ; a
+ * M260 B114 ; r
+ * M260 B108 ; l
+ * M260 B105 ; i
+ * M260 B110 ; n
+ * M260 S1 ; Send the current buffer
+ *
+ * ; Example #2
+ * ; Request 6 bytes from slave device with address 0x63 (99)
+ * M261 A99 B5
+ *
+ * ; Example #3
+ * ; Example serial output of a M261 request
+ * echo:i2c-reply: from:99 bytes:5 data:hello
+ */
+
+// @section i2cbus
+
+//#define EXPERIMENTAL_I2CBUS
+#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
+
+// @section extras
+
+/**
+ * Canon Hack Development Kit
+ * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
+ */
+//#define CHDK_PIN 4 // Set and enable a pin for triggering CHDK to take a picture
+#if PIN_EXISTS(CHDK)
+ #define CHDK_DELAY 50 // (ms) How long the pin should remain HIGH
+#endif
+
+/**
+ * Spindle & Laser control
+ *
+ * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
+ * to set spindle speed, spindle direction, and laser power.
+ *
+ * SuperPid is a router/spindle speed controller used in the CNC milling community.
+ * Marlin can be used to turn the spindle on and off. It can also be used to set
+ * the spindle speed from 5,000 to 30,000 RPM.
+ *
+ * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
+ * hardware PWM pin for the speed control and a pin for the rotation direction.
+ *
+ * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
+ */
+//#define SPINDLE_LASER_ENABLE
+#if ENABLED(SPINDLE_LASER_ENABLE)
+
+ #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed
+ #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power
+ #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower
+ #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power
+ #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop
+ #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction
+ #define SPINDLE_INVERT_DIR false
+ #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction
+
+ /**
+ * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power
+ *
+ * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT
+ * where PWM duty cycle varies from 0 to 255
+ *
+ * set the following for your controller (ALL MUST BE SET)
+ */
+
+ #define SPEED_POWER_SLOPE 118.4
+ #define SPEED_POWER_INTERCEPT 0
+ #define SPEED_POWER_MIN 5000
+ #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM
+
+ //#define SPEED_POWER_SLOPE 0.3922
+ //#define SPEED_POWER_INTERCEPT 0
+ //#define SPEED_POWER_MIN 10
+ //#define SPEED_POWER_MAX 100 // 0-100%
+#endif
+
+/**
+ * Filament Width Sensor
+ *
+ * Measures the filament width in real-time and adjusts
+ * flow rate to compensate for any irregularities.
+ *
+ * Also allows the measured filament diameter to set the
+ * extrusion rate, so the slicer only has to specify the
+ * volume.
+ *
+ * Only a single extruder is supported at this time.
+ *
+ * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
+ * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
+ * 301 RAMBO : Analog input 3
+ *
+ * Note: May require analog pins to be defined for other boards.
+ */
+//#define FILAMENT_WIDTH_SENSOR
+
+#if ENABLED(FILAMENT_WIDTH_SENSOR)
+ #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
+ #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
+
+ #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
+ #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
+
+ #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
+
+ // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
+ //#define FILAMENT_LCD_DISPLAY
+#endif
+
+/**
+ * CNC Coordinate Systems
+ *
+ * Enables G53 and G54-G59.3 commands to select coordinate systems
+ * and G92.1 to reset the workspace to native machine space.
+ */
+//#define CNC_COORDINATE_SYSTEMS
+
+/**
+ * Auto-report temperatures with M155 S
+ */
+#define AUTO_REPORT_TEMPERATURES
+
+/**
+ * Include capabilities in M115 output
+ */
+#define EXTENDED_CAPABILITIES_REPORT
+
+/**
+ * Disable all Volumetric extrusion options
+ */
+//#define NO_VOLUMETRICS
+
+#if DISABLED(NO_VOLUMETRICS)
+ /**
+ * Volumetric extrusion default state
+ * Activate to make volumetric extrusion the default method,
+ * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
+ *
+ * M200 D0 to disable, M200 Dn to set a new diameter.
+ */
+ //#define VOLUMETRIC_DEFAULT_ON
+#endif
+
+/**
+ * Enable this option for a leaner build of Marlin that removes all
+ * workspace offsets, simplifying coordinate transformations, leveling, etc.
+ *
+ * - M206 and M428 are disabled.
+ * - G92 will revert to its behavior from Marlin 1.0.
+ */
+//#define NO_WORKSPACE_OFFSETS
+
+/**
+ * Set the number of proportional font spaces required to fill up a typical character space.
+ * This can help to better align the output of commands like `G29 O` Mesh Output.
+ *
+ * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
+ * Otherwise, adjust according to your client and font.
+ */
+#define PROPORTIONAL_FONT_RATIO 1.0
+
+/**
+ * Spend 28 bytes of SRAM to optimize the GCode parser
+ */
+#define FASTER_GCODE_PARSER
+
+/**
+ * CNC G-code options
+ * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
+ * Note that G0 feedrates should be used with care for 3D printing (if used at all).
+ * High feedrates may cause ringing and harm print quality.
+ */
+//#define PAREN_COMMENTS // Support for parentheses-delimited comments
+//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
+
+// Enable and set a (default) feedrate for all G0 moves
+//#define G0_FEEDRATE 3000 // (mm/m)
+#ifdef G0_FEEDRATE
+ //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
+#endif
+
+/**
+ * G-code Macros
+ *
+ * Add G-codes M810-M819 to define and run G-code macros.
+ * Macros are not saved to EEPROM.
+ */
+//#define GCODE_MACROS
+#if ENABLED(GCODE_MACROS)
+ #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
+ #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
+#endif
+
+/**
+ * User-defined menu items that execute custom GCode
+ */
+//#define CUSTOM_USER_MENUS
+#if ENABLED(CUSTOM_USER_MENUS)
+ //#define CUSTOM_USER_MENU_TITLE "Custom Commands"
+ #define USER_SCRIPT_DONE "M117 User Script Done"
+ #define USER_SCRIPT_AUDIBLE_FEEDBACK
+ //#define USER_SCRIPT_RETURN // Return to status screen after a script
+
+ #define USER_DESC_1 "Home & UBL Info"
+ #define USER_GCODE_1 "G28\nG29 W"
+
+ #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
+ #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
+
+ #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
+ #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
+
+ #define USER_DESC_4 "Heat Bed/Home/Level"
+ #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
+
+ #define USER_DESC_5 "Home & Info"
+ #define USER_GCODE_5 "G28\nM503"
+#endif
+
+/**
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
+ */
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
+
+//===========================================================================
+//====================== I2C Position Encoder Settings ======================
+//===========================================================================
+
+/**
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
+ *
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
+ *
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
+ *
+ * Reliabuild encoders have been modified to improve reliability.
+ */
+
+//#define I2C_POSITION_ENCODERS
+#if ENABLED(I2C_POSITION_ENCODERS)
+
+ #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
+ // encoders supported currently.
+
+ #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
+ #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS.
+ #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
+ // I2CPE_ENC_TYPE_ROTARY.
+ #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
+ // 1mm poles. For linear encoders this is ticks / mm,
+ // for rotary encoders this is ticks / revolution.
+ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
+ // steps per full revolution (motor steps/rev * microstepping)
+ //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
+ #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
+ #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
+ // printer will attempt to correct the error; errors
+ // smaller than this are ignored to minimize effects of
+ // measurement noise / latency (filter).
+
+ #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
+ #define I2CPE_ENC_2_AXIS Y_AXIS
+ #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_ENC_2_TICKS_UNIT 2048
+ //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
+ //#define I2CPE_ENC_2_INVERT
+ #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
+ #define I2CPE_ENC_2_EC_THRESH 0.10
+
+ #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
+ #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
+
+ #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
+ #define I2CPE_ENC_4_AXIS E_AXIS
+
+ #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
+ #define I2CPE_ENC_5_AXIS E_AXIS
+
+ // Default settings for encoders which are enabled, but without settings configured above.
+ #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
+ #define I2CPE_DEF_ENC_TICKS_UNIT 2048
+ #define I2CPE_DEF_TICKS_REV (16 * 200)
+ #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
+ #define I2CPE_DEF_EC_THRESH 0.1
+
+ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
+ // axis after which the printer will abort. Comment out to
+ // disable abort behaviour.
+
+ #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
+ // for this amount of time (in ms) before the encoder
+ // is trusted again.
+
+ /**
+ * Position is checked every time a new command is executed from the buffer but during long moves,
+ * this setting determines the minimum update time between checks. A value of 100 works well with
+ * error rolling average when attempting to correct only for skips and not for vibration.
+ */
+ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
+
+ // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
+ #define I2CPE_ERR_ROLLING_AVERAGE
+
+#endif // I2C_POSITION_ENCODERS
+
+/**
+ * MAX7219 Debug Matrix
+ *
+ * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
+ * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
+ */
+//#define MAX7219_DEBUG
+#if ENABLED(MAX7219_DEBUG)
+ #define MAX7219_CLK_PIN 64
+ #define MAX7219_DIN_PIN 57
+ #define MAX7219_LOAD_PIN 44
+
+ //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
+ #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
+ #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
+ #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
+ // connector at: right=0 bottom=-90 top=90 left=180
+ //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
+
+ /**
+ * Sample debug features
+ * If you add more debug displays, be careful to avoid conflicts!
+ */
+ #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
+ #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
+ #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
+
+ #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
+ // If you experience stuttering, reboots, etc. this option can reveal how
+ // tweaks made to the configuration are affecting the printer in real-time.
+#endif
+
+/**
+ * NanoDLP Sync support
+ *
+ * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
+ * string to enable synchronization with DLP projector exposure. This change will allow to use
+ * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
+ */
+//#define NANODLP_Z_SYNC
+#if ENABLED(NANODLP_Z_SYNC)
+ //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
+ // Default behaviour is limited to Z axis only.
+#endif
+
+/**
+ * WiFi Support (Espressif ESP32 WiFi)
+ */
+//#define WIFISUPPORT
+#if ENABLED(WIFISUPPORT)
+ #define WIFI_SSID "Wifi SSID"
+ #define WIFI_PWD "Wifi Password"
+#endif
+
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
+// @section develop
+
+/**
+ * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins
+ */
+//#define PINS_DEBUGGING
+
+// Enable Marlin dev mode which adds some special commands
+//#define MARLIN_DEV_MODE
diff --git a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
index 21469f9f76..ed3087c68e 100644
--- a/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
+++ b/Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1038,6 +1081,9 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2071,7 +2117,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
index 06ce2c3e02..f8c59ae703 100644
--- a/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
+++ b/Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/RigidBot/Configuration.h b/Marlin/src/config/examples/RigidBot/Configuration.h
index c350722fc8..f23f30441a 100644
--- a/Marlin/src/config/examples/RigidBot/Configuration.h
+++ b/Marlin/src/config/examples/RigidBot/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -177,6 +177,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -187,25 +197,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -237,6 +274,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -391,7 +432,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -576,8 +618,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -987,6 +1030,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h
index ba5e1f13af..3bc9dadc56 100644
--- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h
+++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/SCARA/Configuration.h b/Marlin/src/config/examples/SCARA/Configuration.h
index 81f6181f9e..01fa377595 100644
--- a/Marlin/src/config/examples/SCARA/Configuration.h
+++ b/Marlin/src/config/examples/SCARA/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -205,6 +205,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -215,25 +225,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -265,6 +302,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -419,7 +460,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -593,8 +635,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1002,6 +1045,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2035,7 +2081,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h
index d13b74fc65..0de5c93191 100644
--- a/Marlin/src/config/examples/SCARA/Configuration_adv.h
+++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/STM32F10/Configuration.h b/Marlin/src/config/examples/STM32F10/Configuration.h
index 2f5c4caba8..c00d66f7db 100644
--- a/Marlin/src/config/examples/STM32F10/Configuration.h
+++ b/Marlin/src/config/examples/STM32F10/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -389,7 +430,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -582,8 +624,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -991,6 +1034,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2024,7 +2070,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/STM32F4/Configuration.h b/Marlin/src/config/examples/STM32F4/Configuration.h
index 5ed9b3a182..8429742bd4 100644
--- a/Marlin/src/config/examples/STM32F4/Configuration.h
+++ b/Marlin/src/config/examples/STM32F4/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration.h b/Marlin/src/config/examples/Sanguinololu/Configuration.h
index 19f9fcea78..d4af4aa05b 100644
--- a/Marlin/src/config/examples/Sanguinololu/Configuration.h
+++ b/Marlin/src/config/examples/Sanguinololu/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1020,6 +1063,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2053,7 +2099,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
index 6b299f4cae..a31a036c3d 100644
--- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
+++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/TheBorg/Configuration.h b/Marlin/src/config/examples/TheBorg/Configuration.h
index 8c62573881..f342cfdaab 100644
--- a/Marlin/src/config/examples/TheBorg/Configuration.h
+++ b/Marlin/src/config/examples/TheBorg/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h
index c94c859e2d..cd109d042d 100644
--- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h
+++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration.h b/Marlin/src/config/examples/TinyBoy2/Configuration.h
index cbb7612d31..0117848dbd 100644
--- a/Marlin/src/config/examples/TinyBoy2/Configuration.h
+++ b/Marlin/src/config/examples/TinyBoy2/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -196,6 +196,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -206,25 +216,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -256,6 +293,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -415,7 +456,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -631,8 +673,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1045,6 +1088,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2078,7 +2124,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
index c52b37bb92..fb5947f4e5 100644
--- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
+++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Tronxy/X1/Configuration.h b/Marlin/src/config/examples/Tronxy/X1/Configuration.h
index 4ea3bdf9fd..a7f711cd85 100644
--- a/Marlin/src/config/examples/Tronxy/X1/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/X1/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h
index 52ff0f85f3..6248bf3dda 100644
--- a/Marlin/src/config/examples/Tronxy/X3A/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -993,6 +1036,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2026,7 +2072,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
index eb4fd82ca3..fcc36213f1 100644
--- a/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
+++ b/Marlin/src/config/examples/Tronxy/X3A/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
index 6440ed0067..4bc9c84694 100644
--- a/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/X5S/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -580,8 +621,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1031,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2067,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
index b5578145ed..38a5a16947 100644
--- a/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
+++ b/Marlin/src/config/examples/Tronxy/XY100/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -591,8 +633,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1000,6 +1043,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2033,7 +2079,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h
index d3116256db..a22fa2cc62 100644
--- a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h
+++ b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 DRV8825
#define Y_DRIVER_TYPE DRV8825
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h
index 8814c5f392..df1425ca72 100644
--- a/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h
+++ b/Marlin/src/config/examples/UltiMachine/Archim1/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -951,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1499,7 @@
/**
* 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.
*/
@@ -1382,6 +1509,15 @@
//#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.
*/
@@ -1406,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1561,7 @@
#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.
@@ -1447,6 +1584,7 @@
#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.
@@ -1501,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1795,35 +2017,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1947,6 +2173,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
index 02f16c5860..eabb31ef81 100644
--- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
+++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 TMC2130
#define Y_DRIVER_TYPE TMC2130
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
index b6971b5689..8396a3dfc0 100644
--- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
+++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/VORONDesign/Configuration.h b/Marlin/src/config/examples/VORONDesign/Configuration.h
index c56e35bda7..1db4a7c590 100644
--- a/Marlin/src/config/examples/VORONDesign/Configuration.h
+++ b/Marlin/src/config/examples/VORONDesign/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -589,8 +631,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 DRV8825
#define Y_DRIVER_TYPE DRV8825
@@ -998,6 +1041,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2031,7 +2077,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/VORONDesign/Configuration_adv.h b/Marlin/src/config/examples/VORONDesign/Configuration_adv.h
index cede5e5a59..710438482d 100644
--- a/Marlin/src/config/examples/VORONDesign/Configuration_adv.h
+++ b/Marlin/src/config/examples/VORONDesign/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -951,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1499,7 @@
/**
* 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.
*/
@@ -1382,6 +1509,15 @@
//#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.
*/
@@ -1406,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1561,7 @@
#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.
@@ -1447,6 +1584,7 @@
#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.
@@ -1501,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1795,35 +2017,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1947,6 +2173,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/VORONDesign/_Bootscreen.h b/Marlin/src/config/examples/VORONDesign/_Bootscreen.h
index 13e777f032..cb2bef631f 100644
--- a/Marlin/src/config/examples/VORONDesign/_Bootscreen.h
+++ b/Marlin/src/config/examples/VORONDesign/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration.h b/Marlin/src/config/examples/Velleman/K8200/Configuration.h
index 1eeaa07771..3e64081bb5 100644
--- a/Marlin/src/config/examples/Velleman/K8200/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8200/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -194,6 +194,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -204,25 +214,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -254,6 +291,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -408,7 +449,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -610,8 +652,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1019,6 +1062,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2057,7 +2103,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
index cac9ccebb3..a725e2531c 100644
--- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
+++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -88,6 +88,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 8 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -386,18 +389,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -530,6 +542,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -642,7 +707,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -963,13 +1028,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1172,6 +1231,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1222,6 +1282,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1249,124 +1310,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1385,6 +1511,7 @@
/**
* 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.
*/
@@ -1394,6 +1521,15 @@
//#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.
*/
@@ -1418,7 +1554,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1437,6 +1573,7 @@
#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.
@@ -1459,6 +1596,7 @@
#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.
@@ -1513,62 +1651,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1807,35 +2029,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1959,6 +2185,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Configuration.h
index da2ade6237..79a4e73de5 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2023,7 +2069,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
index c89864b109..39e3261a4c 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
index 3876a07412..eaccacfed3 100644
--- a/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
+++ b/Marlin/src/config/examples/Velleman/K8400/Dual-head/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2023,7 +2069,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/WASP/PowerWASP/Configuration.h b/Marlin/src/config/examples/WASP/PowerWASP/Configuration.h
index a5841c7464..1256eff163 100644
--- a/Marlin/src/config/examples/WASP/PowerWASP/Configuration.h
+++ b/Marlin/src/config/examples/WASP/PowerWASP/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -193,6 +193,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -203,25 +213,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -253,6 +290,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -407,7 +448,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -599,8 +641,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1008,6 +1051,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -1742,11 +1788,18 @@
//
//
-// 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
+// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
//
//#define SAV_3DLCD
+//
+// 3-wire SR LCD with strobe using 74HC4094
+// https://github.com/mikeshub/SailfishLCD
+// Uses the code directly from Sailfish
+//
+//#define FF_INTERFACEBOARD
+
//=============================================================================
//======================= LCD / Controller Selection =======================
//========================= (Graphical LCDs) ========================
@@ -1976,6 +2029,10 @@
// Support for PCA9632 PWM LED driver
//#define PCA9632
+// Support for PCA9533 PWM LED driver
+// https://github.com/mikeshub/SailfishRGB_LED
+//#define PCA9533
+
/**
* RGB LED / LED Strip Control
*
@@ -2030,7 +2087,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h b/Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h
index f7973f219b..3c34b26b98 100644
--- a/Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h
+++ b/Marlin/src/config/examples/WASP/PowerWASP/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -951,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1499,7 @@
/**
* 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.
*/
@@ -1382,6 +1509,15 @@
//#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.
*/
@@ -1406,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1561,7 @@
#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.
@@ -1447,6 +1584,7 @@
#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.
@@ -1501,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1795,35 +2017,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1947,6 +2173,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
index b7ef0acd2a..6aba140e0d 100644
--- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
+++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -590,8 +632,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -999,6 +1042,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2031,7 +2077,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
index f05c4f2c09..387353a634 100644
--- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
+++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2018,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2174,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
index 35c98e0e77..fd10f96a8a 100644
--- a/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
+++ b/Marlin/src/config/examples/adafruit/ST7565/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -580,8 +622,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -989,6 +1032,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2022,7 +2068,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h
index e0d8b8bddc..ca1be14cc0 100644
--- a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h
+++ b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -189,6 +189,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -199,25 +209,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -249,6 +286,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -409,7 +450,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -701,8 +743,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1177,6 +1220,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2212,7 +2258,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
index 5448b034fe..34daff9b49 100644
--- a/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2018,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2174,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
index 20d2d38e3b..383679ed31 100644
--- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -653,8 +695,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1117,6 +1160,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2150,7 +2196,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
index d654a7ae51..1dcd9ff369 100644
--- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2018,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2174,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
index fea7a17e54..d736fd6629 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -653,8 +695,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1116,6 +1159,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2149,7 +2195,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
index d654a7ae51..1dcd9ff369 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2018,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2174,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
index dae0eabe43..848b7d1a25 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -653,8 +695,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1116,6 +1159,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2149,7 +2195,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
index e6e981bd82..0a60097b4d 100644
--- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2018,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2174,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h
index e0a65b6337..a5096665c1 100644
--- a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h
+++ b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -154,17 +154,6 @@
// For Cyclops or any "multi-extruder" that shares a single nozzle.
#define SINGLENOZZLE
-#if ENABLED(SINGLENOZZLE)
- // Parameters for filament retract / prime on toolchange
- #define SINGLENOZZLE_SWAP_LENGTH 12 // (mm)
- #define SINGLENOZZLE_SWAP_RETRACT_SPEED 3600 // (mm/m)
- #define SINGLENOZZLE_SWAP_PRIME_SPEED 3600 // (mm/m)
- //#define SINGLENOZZLE_SWAP_PARK
- #if ENABLED(SINGLENOZZLE_SWAP_PARK)
- #define SINGLENOZZLE_TOOLCHANGE_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
- #define SINGLENOZZLE_PARK_XY_FEEDRATE 6000 // (mm/m)
- #endif
-#endif
/**
* Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
@@ -185,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -195,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -245,6 +271,10 @@
#define MIXING_STEPPERS 3 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -399,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -641,7 +672,7 @@
#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_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
+#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
/**
* Stepper Drivers
@@ -654,8 +685,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1118,6 +1150,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2151,7 +2186,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
index 6ce497c2d8..957a89b7de 100644
--- a/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -896,6 +961,7 @@
#if ENABLED(MOVE_Z_WHEN_IDLE)
#define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
#endif
+
//#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
@@ -952,13 +1018,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1149,6 +1209,34 @@
#endif
#endif
+/**
+ * Universal tool change settings.
+ * Applies to all types of extruders except where explicitly noted.
+ */
+#if EXTRUDERS > 1
+ // Z raise distance for tool-change, as needed for some extruders
+ #define TOOLCHANGE_ZRAISE 2 // (mm)
+
+ // Retract and prime filament on tool-change
+ //#define TOOLCHANGE_FILAMENT_SWAP
+ #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
+ #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
+ #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
+ #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
+ #endif
+
+ /**
+ * Position to park head during tool change.
+ * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
+ */
+ //#define TOOLCHANGE_PARK
+ #if ENABLED(TOOLCHANGE_PARK)
+ #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
+ #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m)
+ #endif
+#endif
+
/**
* Advanced Pause
* Experimental feature for filament change support and for parking the nozzle when paused.
@@ -1184,6 +1272,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1211,124 +1300,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1347,6 +1501,7 @@
/**
* 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.
*/
@@ -1356,6 +1511,15 @@
//#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.
*/
@@ -1380,7 +1544,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1399,6 +1563,7 @@
#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.
@@ -1421,6 +1586,7 @@
#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.
@@ -1475,62 +1641,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1769,35 +2019,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1921,6 +2175,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
index 41d8e9d70d..02a187566e 100644
--- a/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
+++ b/Marlin/src/config/examples/delta/Hatchbox_Alpha/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -179,6 +179,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -189,25 +199,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -239,6 +276,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -393,7 +434,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -658,8 +700,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1119,6 +1162,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2152,7 +2198,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h
index 012cc2f7a2..3d77f12151 100644
--- a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h
+++ b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
#define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -643,8 +685,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1104,6 +1147,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2137,7 +2183,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h
index 431005b5d7..ea498067e9 100644
--- a/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/MKS/SBASE/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2018,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2174,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h
index 6c0e825cd2..23f1252432 100644
--- a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h
+++ b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -647,8 +689,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1108,6 +1151,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2141,7 +2187,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h
index 099afcf439..20d50d1b6e 100644
--- a/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/Tevo Little Monster/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1784,35 +2006,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1936,6 +2162,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/generic/Configuration.h b/Marlin/src/config/examples/delta/generic/Configuration.h
index 6aad3a64e7..0fd4825190 100644
--- a/Marlin/src/config/examples/delta/generic/Configuration.h
+++ b/Marlin/src/config/examples/delta/generic/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -643,8 +685,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1104,6 +1147,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2137,7 +2183,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h
index e6e981bd82..0a60097b4d 100644
--- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2018,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2174,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
index e0895dddae..1daaf27cdb 100644
--- a/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -643,8 +685,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1106,6 +1149,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2139,7 +2185,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
index e6e981bd82..2d8be8a76c 100644
--- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,58 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +695,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1499,7 @@
/**
* 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.
*/
@@ -1383,6 +1509,15 @@
//#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.
*/
@@ -1407,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1561,7 @@
#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.
@@ -1448,6 +1584,7 @@
#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.
@@ -1502,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2017,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2173,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
index a796abe6fd..de07fe9da4 100644
--- a/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -178,6 +178,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -188,25 +198,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -238,6 +275,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -392,7 +433,8 @@
#define PID_MAX 125 // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -629,8 +671,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1107,6 +1150,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2140,7 +2186,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
index c21ea8bb04..42a6fde20a 100644
--- a/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
+++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -647,8 +689,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1107,6 +1150,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2140,7 +2186,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
index a59aafb7b7..4af96d10f0 100644
--- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
+++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -519,6 +531,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -631,7 +696,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -952,13 +1017,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1161,6 +1220,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1211,6 +1271,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1238,124 +1299,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1374,6 +1500,7 @@
/**
* 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.
*/
@@ -1383,6 +1510,15 @@
//#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.
*/
@@ -1407,7 +1543,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1426,6 +1562,7 @@
#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.
@@ -1448,6 +1585,7 @@
#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.
@@ -1502,62 +1640,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1796,35 +2018,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1948,6 +2174,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
index 51d4ddce0b..15d8952d49 100644
--- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
+++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -179,6 +179,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -189,25 +199,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -239,6 +276,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -396,7 +437,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -593,8 +635,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -1003,6 +1046,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2036,7 +2082,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
index 8f9bd831aa..2fe1643212 100644
--- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
+++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 3 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h b/Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h
index 9fa6b953af..003a7978be 100644
--- a/Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h
+++ b/Marlin/src/config/examples/gCreate/gMax1.5+/_Bootscreen.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/config/examples/makibox/Configuration.h b/Marlin/src/config/examples/makibox/Configuration.h
index 831d199ea7..ed854867a6 100644
--- a/Marlin/src/config/examples/makibox/Configuration.h
+++ b/Marlin/src/config/examples/makibox/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -583,8 +625,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -992,6 +1035,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2025,7 +2071,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h
index c85a134808..3f8ea624f8 100644
--- a/Marlin/src/config/examples/makibox/Configuration_adv.h
+++ b/Marlin/src/config/examples/makibox/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/stm32f103ret6/Configuration.h b/Marlin/src/config/examples/stm32f103ret6/Configuration.h
index 934d3fdbcd..6d8f3e0049 100644
--- a/Marlin/src/config/examples/stm32f103ret6/Configuration.h
+++ b/Marlin/src/config/examples/stm32f103ret6/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 3 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -389,7 +430,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- #define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ #define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ #define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -582,8 +624,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -991,6 +1034,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2024,7 +2070,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
index 1da1864f88..74f24cabb3 100644
--- a/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
+++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -569,8 +611,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -984,6 +1027,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2017,7 +2063,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
index a74920bdbb..6b940b5f12 100644
--- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
+++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -629,7 +694,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -950,13 +1015,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1159,6 +1218,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1209,6 +1269,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1236,124 +1297,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1372,6 +1498,7 @@
/**
* 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.
*/
@@ -1381,6 +1508,15 @@
//#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.
*/
@@ -1405,7 +1541,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1424,6 +1560,7 @@
#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.
@@ -1446,6 +1583,7 @@
#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.
@@ -1500,62 +1638,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1794,35 +2016,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1946,6 +2172,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/config/examples/wt150/Configuration.h b/Marlin/src/config/examples/wt150/Configuration.h
index cec24b0c4f..74eb7b791c 100644
--- a/Marlin/src/config/examples/wt150/Configuration.h
+++ b/Marlin/src/config/examples/wt150/Configuration.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -174,6 +174,16 @@
//#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ *
+ * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
+ * Requires EXTRUDERS = 5
+ *
+ * For additional configuration see Configuration_adv.h
+ */
+//#define PRUSA_MMU2
+
// A dual extruder that uses a single stepper motor
//#define SWITCHING_EXTRUDER
#if ENABLED(SWITCHING_EXTRUDER)
@@ -184,25 +194,52 @@
#endif
#endif
-// A dual-nozzle that uses a servomotor to raise/lower one of the nozzles
+// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
//#define SWITCHING_NOZZLE
#if ENABLED(SWITCHING_NOZZLE)
#define SWITCHING_NOZZLE_SERVO_NR 0
- #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1
+ //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
+ #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
#endif
/**
* Two separate X-carriages with extruders that connect to a moving part
- * via a magnetic docking mechanism. Requires SOL1_PIN and SOL2_PIN.
+ * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
*/
//#define PARKING_EXTRUDER
-#if ENABLED(PARKING_EXTRUDER)
- #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
- #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
- #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // Delay (ms) for magnetic field. No delay if 0 or not defined.
+
+/**
+ * Two separate X-carriages with extruders that connect to a moving part
+ * via a magnetic docking mechanism using movements and no solenoid
+ *
+ * project : https://www.thingiverse.com/thing:3080893
+ * movements : https://youtu.be/0xCEiG9VS3k
+ * https://youtu.be/Bqbcs0CU2FE
+ */
+//#define MAGNETIC_PARKING_EXTRUDER
+
+#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
#define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
- #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
+ #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // mm to move beyond the parking point to grab the extruder
//#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #if ENABLED(PARKING_EXTRUDER)
+
+ #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
+ #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
+ #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
+ //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
+
+ #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
+
+ #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point
+ #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple
+ #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
+ #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
+
+ #endif
+
#endif
/**
@@ -234,6 +271,10 @@
#define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
#define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
//#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
+ //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
+ #if ENABLED(GRADIENT_MIX)
+ //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
+ #endif
#endif
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@@ -388,7 +429,8 @@
#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_K1 0.95 // Smoothing factor within any PID loop
#if ENABLED(PIDTEMP)
- //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
+ //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
+ //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
@@ -585,8 +627,9 @@
* Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100,
* TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE,
* TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
- * TMC5130, TMC5130_STANDALONE
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_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 A4988
//#define Y_DRIVER_TYPE A4988
@@ -994,6 +1037,9 @@
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
+
+ // Set one or more commands to execute on filament runout.
+ // (After 'M412 H' Marlin will ask the host to handle the process.)
#define FILAMENT_RUNOUT_SCRIPT "M600"
// After a runout is detected, continue printing this length of filament
@@ -2027,7 +2073,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
-#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_LED)
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED)
#define PRINTER_EVENT_LEDS
#endif
diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h
index 1e08eb58ce..06b149ce8f 100644
--- a/Marlin/src/config/examples/wt150/Configuration_adv.h
+++ b/Marlin/src/config/examples/wt150/Configuration_adv.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -78,6 +78,9 @@
#define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
//#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
+ #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP)
+ //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
+ #endif
/**
* Whenever an M104, M109, or M303 increases the target temperature, the
@@ -373,18 +376,27 @@
// override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
// without modifying the firmware (through the "M218 T1 X???" command).
// Remember: you should set the second extruder x-offset to 0 in your slicer.
-
- // There are a few selectable movement modes for dual x-carriages using M605 S
- // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
- // as long as it supports dual x-carriages. (M605 S0)
- // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
- // that additional slicer support is not required. (M605 S1)
- // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
- // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
- // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ /**
+ * There are a few selectable movement modes for dual x-carriages using M605 S
+ *
+ * Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
+ * as long as it supports dual x-carriages. (M605 S0)
+ *
+ * Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
+ * that additional slicer support is not required. (M605 S1)
+ *
+ * Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
+ * actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
+ * once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
+ *
+ * Mode 3 (DXC_MIRRORED_MODE) : Enable the Formbot/Vivedino inspired Mirrored mode. The second extruder will duplicate the first extruder's
+ * movement similar to DXC_DUPLICATION_MODE. However, the second extruder will be producing
+ * a mirror image of the first extruder. The initial x-offset and temperature differential are
+ * set with M605 S2 [Xnnn] [Rmmm] and then followed with a M605 S3 to start the mirrored movement.
+ */
// This is the default power-up mode which can be later using M605.
- #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
+ #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 100
@@ -517,6 +529,59 @@
#endif
#endif
+/**
+ * Automatic backlash, position and hotend offset calibration
+ *
+ * Enable G425 to run automatic calibration using an electrically-
+ * conductive cube, bolt, or washer mounted on the bed.
+ *
+ * G425 uses the probe to touch the top and sides of the calibration object
+ * on the bed and measures and/or correct positional offsets, axis backlash
+ * and hotend offsets.
+ *
+ * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
+ * ±5mm of true values for G425 to succeed.
+ */
+//#define CALIBRATION_GCODE
+#if ENABLED(CALIBRATION_GCODE)
+
+ #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
+
+ #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m
+ #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m
+ #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m
+
+ // The following parameters refer to the conical section of the nozzle tip.
+ #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
+ #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
+
+ // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
+ //#define CALIBRATION_REPORTING
+
+ // The true location and dimension the cube/bolt/washer on the bed.
+ #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
+ #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
+
+ // Comment out any sides which are unreachable by the probe. For best
+ // auto-calibration results, all sides must be reachable.
+ #define CALIBRATION_MEASURE_RIGHT
+ #define CALIBRATION_MEASURE_FRONT
+ #define CALIBRATION_MEASURE_LEFT
+ #define CALIBRATION_MEASURE_BACK
+
+ // Probing at the exact top center only works if the center is flat. If
+ // probing on a screwhead or hollow washer, probe near the edges.
+ //#define CALIBRATION_MEASURE_AT_TOP_EDGES
+
+ // Define pin which is read during calibration
+ #ifndef CALIBRATION_PIN
+ #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop
+ #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin
+ //#define CALIBRATION_PIN_PULLDOWN
+ #define CALIBRATION_PIN_PULLUP
+ #endif
+#endif
+
/**
* Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
* below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
@@ -630,7 +695,7 @@
//#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
//#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
#endif
-#endif // HAS_PRINT_PROGRESS
+#endif
/**
* LED Control Menu
@@ -951,13 +1016,7 @@
#define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
#define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
#define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1"
- /**
- * Specify an action command to send to the host on a recovery attempt or failure.
- * Will be sent in the form '//action:ACTION_ON_G29_FAILURE', e.g. '//action:probe_failed'.
- * The host must be configured to handle the action command.
- */
- #define G29_ACTION_ON_RECOVER "probe_rewipe"
- #define G29_ACTION_ON_FAILURE "probe_failed"
+
#endif
// @section extras
@@ -1160,6 +1219,7 @@
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
+ #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
@@ -1210,6 +1270,7 @@
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
+ #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length.
@@ -1237,124 +1298,189 @@
*/
#if HAS_DRIVER(TMC26X)
- #define X_MAX_CURRENT 1000 // in mA
- #define X_SENSE_RESISTOR 91 // in mOhms
- #define X_MICROSTEPS 16 // number of microsteps
+ #if AXIS_DRIVER_TYPE_X(TMC26X)
+ #define X_MAX_CURRENT 1000 // (mA)
+ #define X_SENSE_RESISTOR 91 // (mOhms)
+ #define X_MICROSTEPS 16 // Number of microsteps
+ #endif
- #define X2_MAX_CURRENT 1000
- #define X2_SENSE_RESISTOR 91
- #define X2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_X2(TMC26X)
+ #define X2_MAX_CURRENT 1000
+ #define X2_SENSE_RESISTOR 91
+ #define X2_MICROSTEPS 16
+ #endif
- #define Y_MAX_CURRENT 1000
- #define Y_SENSE_RESISTOR 91
- #define Y_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y(TMC26X)
+ #define Y_MAX_CURRENT 1000
+ #define Y_SENSE_RESISTOR 91
+ #define Y_MICROSTEPS 16
+ #endif
- #define Y2_MAX_CURRENT 1000
- #define Y2_SENSE_RESISTOR 91
- #define Y2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Y2(TMC26X)
+ #define Y2_MAX_CURRENT 1000
+ #define Y2_SENSE_RESISTOR 91
+ #define Y2_MICROSTEPS 16
+ #endif
- #define Z_MAX_CURRENT 1000
- #define Z_SENSE_RESISTOR 91
- #define Z_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z(TMC26X)
+ #define Z_MAX_CURRENT 1000
+ #define Z_SENSE_RESISTOR 91
+ #define Z_MICROSTEPS 16
+ #endif
- #define Z2_MAX_CURRENT 1000
- #define Z2_SENSE_RESISTOR 91
- #define Z2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z2(TMC26X)
+ #define Z2_MAX_CURRENT 1000
+ #define Z2_SENSE_RESISTOR 91
+ #define Z2_MICROSTEPS 16
+ #endif
- #define Z3_MAX_CURRENT 1000
- #define Z3_SENSE_RESISTOR 91
- #define Z3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_Z3(TMC26X)
+ #define Z3_MAX_CURRENT 1000
+ #define Z3_SENSE_RESISTOR 91
+ #define Z3_MICROSTEPS 16
+ #endif
- #define E0_MAX_CURRENT 1000
- #define E0_SENSE_RESISTOR 91
- #define E0_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E0(TMC26X)
+ #define E0_MAX_CURRENT 1000
+ #define E0_SENSE_RESISTOR 91
+ #define E0_MICROSTEPS 16
+ #endif
- #define E1_MAX_CURRENT 1000
- #define E1_SENSE_RESISTOR 91
- #define E1_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E1(TMC26X)
+ #define E1_MAX_CURRENT 1000
+ #define E1_SENSE_RESISTOR 91
+ #define E1_MICROSTEPS 16
+ #endif
- #define E2_MAX_CURRENT 1000
- #define E2_SENSE_RESISTOR 91
- #define E2_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E2(TMC26X)
+ #define E2_MAX_CURRENT 1000
+ #define E2_SENSE_RESISTOR 91
+ #define E2_MICROSTEPS 16
+ #endif
- #define E3_MAX_CURRENT 1000
- #define E3_SENSE_RESISTOR 91
- #define E3_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E3(TMC26X)
+ #define E3_MAX_CURRENT 1000
+ #define E3_SENSE_RESISTOR 91
+ #define E3_MICROSTEPS 16
+ #endif
- #define E4_MAX_CURRENT 1000
- #define E4_SENSE_RESISTOR 91
- #define E4_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E4(TMC26X)
+ #define E4_MAX_CURRENT 1000
+ #define E4_SENSE_RESISTOR 91
+ #define E4_MICROSTEPS 16
+ #endif
- #define E5_MAX_CURRENT 1000
- #define E5_SENSE_RESISTOR 91
- #define E5_MICROSTEPS 16
+ #if AXIS_DRIVER_TYPE_E5(TMC26X)
+ #define E5_MAX_CURRENT 1000
+ #define E5_SENSE_RESISTOR 91
+ #define E5_MICROSTEPS 16
+ #endif
#endif // TMC26X
// @section tmc_smart
/**
- * To use TMC2130 stepper drivers in SPI mode connect your SPI pins to
- * the hardware SPI interface on your board and define the required CS pins
- * in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
+ * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
+ * connect your SPI pins to the hardware SPI interface on your board and define
+ * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
+ * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
* You may also use software SPI if you wish to use general purpose IO pins.
*
- * To use TMC2208 stepper UART-configurable stepper drivers
- * connect #_SERIAL_TX_PIN to the driver side PDN_UART pin with a 1K resistor.
- * To use the reading capabilities, also connect #_SERIAL_RX_PIN
- * to PDN_UART without a resistor.
+ * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
+ * to the driver side PDN_UART pin with a 1K resistor.
+ * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
+ * a resistor.
* The drivers can also be used with hardware serial.
*
- * TMCStepper library is required for connected TMC stepper drivers.
+ * TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
- #define R_SENSE 0.11 // R_sense resistor for SilentStepStick2130
#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
- #define X_CURRENT 800 // rms current in mA. Multiply by 1.41 for peak current.
- #define X_MICROSTEPS 16 // 0..256
+ #if AXIS_IS_TMC(X)
+ #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
+ #define X_MICROSTEPS 16 // 0..256
+ #define X_RSENSE 0.11
+ #endif
- #define Y_CURRENT 800
- #define Y_MICROSTEPS 16
+ #if AXIS_IS_TMC(X2)
+ #define X2_CURRENT 800
+ #define X2_MICROSTEPS 16
+ #define X2_RSENSE 0.11
+ #endif
- #define Z_CURRENT 800
- #define Z_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y)
+ #define Y_CURRENT 800
+ #define Y_MICROSTEPS 16
+ #define Y_RSENSE 0.11
+ #endif
- #define X2_CURRENT 800
- #define X2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Y2)
+ #define Y2_CURRENT 800
+ #define Y2_MICROSTEPS 16
+ #define Y2_RSENSE 0.11
+ #endif
- #define Y2_CURRENT 800
- #define Y2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z)
+ #define Z_CURRENT 800
+ #define Z_MICROSTEPS 16
+ #define Z_RSENSE 0.11
+ #endif
- #define Z2_CURRENT 800
- #define Z2_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z2)
+ #define Z2_CURRENT 800
+ #define Z2_MICROSTEPS 16
+ #define Z2_RSENSE 0.11
+ #endif
- #define Z3_CURRENT 800
- #define Z3_MICROSTEPS 16
+ #if AXIS_IS_TMC(Z3)
+ #define Z3_CURRENT 800
+ #define Z3_MICROSTEPS 16
+ #define Z3_RSENSE 0.11
+ #endif
- #define E0_CURRENT 800
- #define E0_MICROSTEPS 16
+ #if AXIS_IS_TMC(E0)
+ #define E0_CURRENT 800
+ #define E0_MICROSTEPS 16
+ #define E0_RSENSE 0.11
+ #endif
- #define E1_CURRENT 800
- #define E1_MICROSTEPS 16
+ #if AXIS_IS_TMC(E1)
+ #define E1_CURRENT 800
+ #define E1_MICROSTEPS 16
+ #define E1_RSENSE 0.11
+ #endif
- #define E2_CURRENT 800
- #define E2_MICROSTEPS 16
+ #if AXIS_IS_TMC(E2)
+ #define E2_CURRENT 800
+ #define E2_MICROSTEPS 16
+ #define E2_RSENSE 0.11
+ #endif
- #define E3_CURRENT 800
- #define E3_MICROSTEPS 16
+ #if AXIS_IS_TMC(E3)
+ #define E3_CURRENT 800
+ #define E3_MICROSTEPS 16
+ #define E3_RSENSE 0.11
+ #endif
- #define E4_CURRENT 800
- #define E4_MICROSTEPS 16
+ #if AXIS_IS_TMC(E4)
+ #define E4_CURRENT 800
+ #define E4_MICROSTEPS 16
+ #define E4_RSENSE 0.11
+ #endif
- #define E5_CURRENT 800
- #define E5_MICROSTEPS 16
+ #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 and TMC2660 drivers here.
+ * 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
@@ -1373,6 +1499,7 @@
/**
* 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.
*/
@@ -1382,6 +1509,15 @@
//#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.
*/
@@ -1406,7 +1542,7 @@
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
/**
- * Monitor Trinamic TMC2130 and TMC2208 drivers for error conditions,
+ * 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.
@@ -1425,6 +1561,7 @@
#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.
@@ -1447,6 +1584,7 @@
#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.
@@ -1501,62 +1639,146 @@
/**
* L6470 Stepper Driver options
*
- * The Arduino-L6470 library is required for this stepper driver.
+ * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver.
* https://github.com/ameyer/Arduino-L6470
+ *
+ * Requires the following to be defined in your pins_YOUR_BOARD file
+ * L6470_CHAIN_SCK_PIN
+ * L6470_CHAIN_MISO_PIN
+ * L6470_CHAIN_MOSI_PIN
+ * L6470_CHAIN_SS_PIN
+ * L6470_RESET_CHAIN_PIN (optional)
*/
#if HAS_DRIVER(L6470)
- #define X_MICROSTEPS 16 // number of microsteps
- #define X_OVERCURRENT 2000 // maxc current in mA. If the current goes over this value, the driver will switch off
- #define X_STALLCURRENT 1500 // current in mA where the driver will detect a stall
+ //#define L6470_CHITCHAT // Display additional status info
- #define X2_MICROSTEPS 16
- #define X2_OVERCURRENT 2000
- #define X2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X(L6470)
+ #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128)
+ #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down)
+ #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
+ #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper
+ #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
+ #endif
- #define Y_MICROSTEPS 16
- #define Y_OVERCURRENT 2000
- #define Y_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_X2(L6470)
+ #define X2_MICROSTEPS 128
+ #define X2_OVERCURRENT 2000
+ #define X2_STALLCURRENT 1500
+ #define X2_MAX_VOLTAGE 127
+ #define X2_CHAIN_POS 0
+ #endif
- #define Y2_MICROSTEPS 16
- #define Y2_OVERCURRENT 2000
- #define Y2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y(L6470)
+ #define Y_MICROSTEPS 128
+ #define Y_OVERCURRENT 2000
+ #define Y_STALLCURRENT 1500
+ #define Y_MAX_VOLTAGE 127
+ #define Y_CHAIN_POS 0
+ #endif
- #define Z_MICROSTEPS 16
- #define Z_OVERCURRENT 2000
- #define Z_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Y2(L6470)
+ #define Y2_MICROSTEPS 128
+ #define Y2_OVERCURRENT 2000
+ #define Y2_STALLCURRENT 1500
+ #define Y2_MAX_VOLTAGE 127
+ #define Y2_CHAIN_POS 0
+ #endif
- #define Z2_MICROSTEPS 16
- #define Z2_OVERCURRENT 2000
- #define Z2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z(L6470)
+ #define Z_MICROSTEPS 128
+ #define Z_OVERCURRENT 2000
+ #define Z_STALLCURRENT 1500
+ #define Z_MAX_VOLTAGE 127
+ #define Z_CHAIN_POS 0
+ #endif
- #define Z3_MICROSTEPS 16
- #define Z3_OVERCURRENT 2000
- #define Z3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z2(L6470)
+ #define Z2_MICROSTEPS 128
+ #define Z2_OVERCURRENT 2000
+ #define Z2_STALLCURRENT 1500
+ #define Z2_MAX_VOLTAGE 127
+ #define Z2_CHAIN_POS 0
+ #endif
- #define E0_MICROSTEPS 16
- #define E0_OVERCURRENT 2000
- #define E0_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_Z3(L6470)
+ #define Z3_MICROSTEPS 128
+ #define Z3_OVERCURRENT 2000
+ #define Z3_STALLCURRENT 1500
+ #define Z3_MAX_VOLTAGE 127
+ #define Z3_CHAIN_POS 0
+ #endif
- #define E1_MICROSTEPS 16
- #define E1_OVERCURRENT 2000
- #define E1_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E0(L6470)
+ #define E0_MICROSTEPS 128
+ #define E0_OVERCURRENT 2000
+ #define E0_STALLCURRENT 1500
+ #define E0_MAX_VOLTAGE 127
+ #define E0_CHAIN_POS 0
+ #endif
- #define E2_MICROSTEPS 16
- #define E2_OVERCURRENT 2000
- #define E2_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E1(L6470)
+ #define E1_MICROSTEPS 128
+ #define E1_OVERCURRENT 2000
+ #define E1_STALLCURRENT 1500
+ #define E1_MAX_VOLTAGE 127
+ #define E1_CHAIN_POS 0
+ #endif
- #define E3_MICROSTEPS 16
- #define E3_OVERCURRENT 2000
- #define E3_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E2(L6470)
+ #define E2_MICROSTEPS 128
+ #define E2_OVERCURRENT 2000
+ #define E2_STALLCURRENT 1500
+ #define E2_MAX_VOLTAGE 127
+ #define E2_CHAIN_POS 0
+ #endif
- #define E4_MICROSTEPS 16
- #define E4_OVERCURRENT 2000
- #define E4_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E3(L6470)
+ #define E3_MICROSTEPS 128
+ #define E3_OVERCURRENT 2000
+ #define E3_STALLCURRENT 1500
+ #define E3_MAX_VOLTAGE 127
+ #define E3_CHAIN_POS 0
+ #endif
- #define E5_MICROSTEPS 16
- #define E5_OVERCURRENT 2000
- #define E5_STALLCURRENT 1500
+ #if AXIS_DRIVER_TYPE_E4(L6470)
+ #define E4_MICROSTEPS 128
+ #define E4_OVERCURRENT 2000
+ #define E4_STALLCURRENT 1500
+ #define E4_MAX_VOLTAGE 127
+ #define E4_CHAIN_POS 0
+ #endif
+
+ #if AXIS_DRIVER_TYPE_E5(L6470)
+ #define E5_MICROSTEPS 128
+ #define E5_OVERCURRENT 2000
+ #define E5_STALLCURRENT 1500
+ #define E5_MAX_VOLTAGE 127
+ #define E5_CHAIN_POS 0
+ #endif
+
+ /**
+ * Monitor L6470 drivers for error conditions like over temperature and over current.
+ * In the case of over temperature Marlin can decrease the drive until the error condition clears.
+ * Other detected conditions can be used to stop the current print.
+ * Relevant g-codes:
+ * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
+ * I not present or I0 or I1 - X, Y, Z or E0
+ * I2 - X2, Y2, Z2 or E1
+ * I3 - Z3 or E3
+ * I4 - E4
+ * I5 - E5
+ * M916 - Increase drive level until get thermal warning
+ * M917 - Find minimum current thresholds
+ * M918 - Increase speed until max or error
+ * M122 S0/1 - Report driver parameters
+ */
+ //#define MONITOR_L6470_DRIVER_STATUS
+
+ #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
+ #define KVAL_HOLD_STEP_DOWN 1
+ //#define L6470_STOP_ON_ERROR
+ #endif
#endif // L6470
@@ -1795,35 +2017,39 @@
#endif
/**
- * Specify an action command to send to the host when the printer is killed.
- * Will be sent in the form '//action:ACTION_ON_KILL', e.g. '//action:poweroff'.
- * The host must be configured to handle the action command.
+ * Host Action Commands
+ *
+ * Define host streamer action commands in compliance with the standard.
+ *
+ * See https://reprap.org/wiki/G-code#Action_commands
+ * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
+ * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
+ *
+ * Some features add reason codes to extend these commands.
+ *
+ * Host Prompt Support enables Marlin to use the host for user prompts so
+ * filament runout and other processes can be managed from the host side.
*/
-//#define ACTION_ON_KILL "poweroff"
-
-/**
- * Specify an action command to send to the host on pause and resume.
- * Will be sent in the form '//action:ACTION_ON_PAUSE', e.g. '//action:pause'.
- * The host must be configured to handle the action command.
- */
-//#define ACTION_ON_PAUSE "pause"
-//#define ACTION_ON_RESUME "resume"
+//#define HOST_ACTION_COMMANDS
+#if ENABLED(HOST_ACTION_COMMANDS)
+ //#define HOST_PROMPT_SUPPORT
+#endif
//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================
/**
- * I2C position encoders for closed loop control.
- * Developed by Chris Barr at Aus3D.
+ * I2C position encoders for closed loop control.
+ * Developed by Chris Barr at Aus3D.
*
- * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
- * Github: https://github.com/Aus3D/MagneticEncoder
+ * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder
+ * Github: https://github.com/Aus3D/MagneticEncoder
*
- * Supplier: http://aus3d.com.au/magnetic-encoder-module
- * Alternative Supplier: http://reliabuild3d.com/
+ * Supplier: http://aus3d.com.au/magnetic-encoder-module
+ * Alternative Supplier: http://reliabuild3d.com/
*
- * Reilabuild encoders have been modified to improve reliability.
+ * Reliabuild encoders have been modified to improve reliability.
*/
//#define I2C_POSITION_ENCODERS
@@ -1947,6 +2173,73 @@
#define WIFI_PWD "Wifi Password"
#endif
+/**
+ * Prusa Multi-Material Unit v2
+ * Enable in Configuration.h
+ */
+#if ENABLED(PRUSA_MMU2)
+
+ // Serial port used for communication with MMU2.
+ // For AVR enable the UART port used for the MMU. (e.g., internalSerial)
+ // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
+ #define INTERNAL_SERIAL_PORT 2
+ #define MMU2_SERIAL internalSerial
+
+ // Use hardware reset for MMU if a pin is defined for it
+ //#define MMU2_RST_PIN 23
+
+ // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
+ //#define MMU2_MODE_12V
+
+ // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
+ #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
+
+ // Add an LCD menu for MMU2
+ //#define MMU2_MENUS
+ #if ENABLED(MMU2_MENUS)
+ // Settings for filament load / unload from the LCD menu.
+ // This is for Prusa MK3-style extruders. Customize for your hardware.
+ #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
+ #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
+ { 7.2, 562 }, \
+ { 14.4, 871 }, \
+ { 36.0, 1393 }, \
+ { 14.4, 871 }, \
+ { 50.0, 198 }
+
+ #define MMU2_RAMMING_SEQUENCE \
+ { 1.0, 1000 }, \
+ { 1.0, 1500 }, \
+ { 2.0, 2000 }, \
+ { 1.5, 3000 }, \
+ { 2.5, 4000 }, \
+ { -15.0, 5000 }, \
+ { -14.0, 1200 }, \
+ { -6.0, 600 }, \
+ { 10.0, 700 }, \
+ { -10.0, 400 }, \
+ { -50.0, 2000 }
+
+ #endif
+
+ //#define MMU2_DEBUG // Write debug info to serial output
+
+#endif // PRUSA_MMU2
+
+/**
+ * Advanced Print Counter settings
+ */
+#if ENABLED(PRINTCOUNTER)
+ #define SERVICE_WARNING_BUZZES 3
+ // Activate up to 3 service interval watchdogs
+ //#define SERVICE_NAME_1 "Service S"
+ //#define SERVICE_INTERVAL_1 100 // print hours
+ //#define SERVICE_NAME_2 "Service L"
+ //#define SERVICE_INTERVAL_2 200 // print hours
+ //#define SERVICE_NAME_3 "Service 3"
+ //#define SERVICE_INTERVAL_3 1 // print hours
+#endif
+
// @section develop
/**
diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h
index 677682e128..6c1389ef1e 100644
--- a/Marlin/src/core/boards.h
+++ b/Marlin/src/core/boards.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -75,6 +75,7 @@
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
#define BOARD_RUMBA 80 // Rumba
#define BOARD_RUMBA_RAISE3D 333 // Raise3D N series Rumba derivative
+#define BOARD_RL200 801 // Rapide Lite 200 (v1, low-cost RUMBA clone with drv)
#define BOARD_FORMBOT_TREX2PLUS 95 // Formbot T-Rex 2 Plus
#define BOARD_FORMBOT_TREX3 96 // Formbot T-Rex 3
#define BOARD_FORMBOT_RAPTOR 97 // Formbot Raptor
@@ -116,6 +117,7 @@
#define BOARD_GT2560_REV_A_PLUS 75 // Geeetech GT2560 Rev. A+ (with auto level probe)
#define BOARD_GT2560_V3 76 // Geeetech GT2560 Rev B for A10(M/D)
#define BOARD_GT2560_V3_MC2 73 // Geeetech GT2560 Rev B for Mecreator2
+#define BOARD_GT2560_V3_A20 86 // Geeetech GT2560 Rev B for A20(M/D)
#define BOARD_EINSTART_S 666 // Einstart retrofit
//
@@ -220,6 +222,7 @@
#define BOARD_ARCHIM1 1591 // UltiMachine Archim1 (with DRV8825 drivers)
#define BOARD_ARCHIM2 1592 // UltiMachine Archim2 (with TMC2130 drivers)
#define BOARD_ALLIGATOR 1602 // Alligator Board R2
+#define BOARD_ADSK 1610 // Arduino DUE Shield Kit (ADSK)
//
// STM32 ARM Cortex-M3
diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h
index ce2d913b84..25fe2245f6 100644
--- a/Marlin/src/core/drivers.h
+++ b/Marlin/src/core/drivers.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -23,24 +23,31 @@
#include "../inc/MarlinConfigPre.h"
-#define A4988 0x001
-#define A5984 0x002
-#define DRV8825 0x003
-#define LV8729 0x004
-#define L6470 0x105
-#define TB6560 0x006
-#define TB6600 0x007
-#define TMC2100 0x008
-#define TMC2130 2130
-#define TMC2130_STANDALONE 0x009
-#define TMC2208 2208
-#define TMC2208_STANDALONE 0x00A
-#define TMC26X 0x10B
-#define TMC26X_STANDALONE 0x00B
-#define TMC2660 2660
-#define TMC2660_STANDALONE 0x00C
+#define _A4988 0x001
+#define _A5984 0x002
+#define _DRV8825 0x003
+#define _LV8729 0x004
+#define _L6470 0x105
+#define _TB6560 0x006
+#define _TB6600 0x007
+#define _TMC2100 0x008
+#define _TMC2130 2130
+#define _TMC2130_STANDALONE 0x009
+#define _TMC2160 2160
+#define _TMC2160_STANDALONE 2161
+#define _TMC2208 2208
+#define _TMC2208_STANDALONE 0x00A
+#define _TMC26X 0x10B
+#define _TMC26X_STANDALONE 0x00B
+#define _TMC2660 2660
+#define _TMC2660_STANDALONE 0x00C
+#define _TMC5130 5130
+#define _TMC5130_STANDALONE 5131
+#define _TMC5160 5160
+#define _TMC5160_STANDALONE 5161
-#define _AXIS_DRIVER_TYPE(A,T) (defined(A##_DRIVER_TYPE) && (A##_DRIVER_TYPE == T))
+#define _ACTUAL(V) _CAT(_, V)
+#define _AXIS_DRIVER_TYPE(A,T) (defined(A##_DRIVER_TYPE) && _ACTUAL(A##_DRIVER_TYPE) == _CAT(_, T))
#define AXIS_DRIVER_TYPE_X(T) _AXIS_DRIVER_TYPE(X,T)
#define AXIS_DRIVER_TYPE_Y(T) _AXIS_DRIVER_TYPE(Y,T)
@@ -67,8 +74,11 @@
// Test for supported TMC drivers that require advanced configuration
// Does not match standalone configurations
-#define HAS_TRINAMIC (HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2660))
+#define HAS_TRINAMIC ( HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2160) || HAS_DRIVER(TMC2208) || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC5130) || HAS_DRIVER(TMC5160) )
#define AXIS_IS_TMC(A) ( AXIS_DRIVER_TYPE_##A(TMC2130) || \
+ AXIS_DRIVER_TYPE_##A(TMC2160) || \
AXIS_DRIVER_TYPE_##A(TMC2208) || \
- AXIS_DRIVER_TYPE_##A(TMC2660) )
+ AXIS_DRIVER_TYPE_##A(TMC2660) || \
+ AXIS_DRIVER_TYPE_##A(TMC5130) || \
+ AXIS_DRIVER_TYPE_##A(TMC5160))
diff --git a/Marlin/src/core/enum.h b/Marlin/src/core/enum.h
index 7abfe0bb88..d3d7d948da 100644
--- a/Marlin/src/core/enum.h
+++ b/Marlin/src/core/enum.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -43,6 +43,10 @@ enum AxisEnum : unsigned char {
NO_AXIS = 0xFF
};
+#if HAS_DRIVER(L6470)
+ enum L6470_driver_enum : unsigned char { X, Y, Z, X2, Y2, Z2, Z3, E0, E1, E2, E3, E4, E5 };
+#endif
+
#define LOOP_S_LE_N(VAR, S, N) for (uint8_t VAR=(S); VAR<=(N); VAR++)
#define LOOP_S_L_N(VAR, S, N) for (uint8_t VAR=(S); VAR<(N); VAR++)
#define LOOP_LE_N(VAR, N) LOOP_S_LE_N(VAR, 0, N)
diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h
index 7663eabb0c..149a7d3a0b 100644
--- a/Marlin/src/core/language.h
+++ b/Marlin/src/core/language.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -89,9 +89,9 @@
#define MACHINE_UUID DEFAULT_MACHINE_UUID
#endif
-#ifdef DEFAULT_WEBSITE_URL
+#ifdef BOARD_WEBSITE_URL
#undef WEBSITE_URL
- #define WEBSITE_URL DEFAULT_WEBSITE_URL
+ #define WEBSITE_URL BOARD_WEBSITE_URL
#endif
#if HAS_GRAPHICAL_LCD
diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h
index bfdbdd5529..009a7f7b85 100644
--- a/Marlin/src/core/macros.h
+++ b/Marlin/src/core/macros.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -56,9 +56,7 @@
#define NANOSECONDS_PER_CYCLE (1000000000.0 / F_CPU)
// Remove compiler warning on an unused variable
-#if !defined(ARDUINO_ARCH_STM32) || defined(STM32GENERIC)
- #define UNUSED(x) ((void)(x))
-#endif
+#define UNUSED(x) ((void)(x))
// Macros to make a string from a macro
#define STRINGIFY_(M) #M
@@ -154,7 +152,10 @@
#define DECIMAL_SIGNED(a) (DECIMAL(a) || (a) == '-' || (a) == '+')
#define COUNT(a) (sizeof(a)/sizeof(*a))
#define ZERO(a) memset(a,0,sizeof(a))
-#define COPY(a,b) memcpy(a,b,MIN(sizeof(a),sizeof(b)))
+#define COPY(a,b) do{ \
+ static_assert(sizeof(a[0]) == sizeof(b[0]), "COPY: '" STRINGIFY(a) "' and '" STRINGIFY(b) "' types (sizes) don't match!"); \
+ memcpy(&a[0],&b[0],MIN(sizeof(a),sizeof(b))); \
+ }while(0)
// Macros for initializing arrays
#define ARRAY_6(v1, v2, v3, v4, v5, v6, ...) { v1, v2, v3, v4, v5, v6 }
diff --git a/Marlin/src/core/millis_t.h b/Marlin/src/core/millis_t.h
index d38ab65d0a..b2afeb83f0 100644
--- a/Marlin/src/core/millis_t.h
+++ b/Marlin/src/core/millis_t.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/core/minmax.h b/Marlin/src/core/minmax.h
index 0c334fbcda..ddb2117dba 100644
--- a/Marlin/src/core/minmax.h
+++ b/Marlin/src/core/minmax.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp
index 27ccdbf94f..317a026b77 100644
--- a/Marlin/src/core/serial.cpp
+++ b/Marlin/src/core/serial.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h
index b8c8734510..4ee2bfd009 100644
--- a/Marlin/src/core/serial.h
+++ b/Marlin/src/core/serial.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/core/utility.cpp b/Marlin/src/core/utility.cpp
index 7491dd7513..61582b4a26 100644
--- a/Marlin/src/core/utility.cpp
+++ b/Marlin/src/core/utility.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -441,3 +441,10 @@ void safe_delay(millis_t ms) {
}
#endif // DEBUG_LEVELING_FEATURE
+
+void print_bin(const uint16_t val) {
+ for (uint8_t i = 16; i--;) {
+ SERIAL_ECHO(TEST(val, i));
+ if (!(i & 0x3)) SERIAL_CHAR(' ');
+ }
+}
diff --git a/Marlin/src/core/utility.h b/Marlin/src/core/utility.h
index f4944299a6..15c9264cf4 100644
--- a/Marlin/src/core/utility.h
+++ b/Marlin/src/core/utility.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -119,3 +119,19 @@ inline void serial_delay(const millis_t ms) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
void log_machine_info();
#endif
+
+void print_bin(const uint16_t val);
+
+template
+class restorer {
+ T& ref_;
+ T val_;
+public:
+ restorer(T& perm) : ref_(perm), val_(perm) {}
+ restorer(T& perm, T temp_val) : ref_(perm), val_(perm) { perm = temp_val; }
+ ~restorer() { restore(); }
+ inline void restore() { ref_ = val_; }
+};
+
+#define REMEMBER(N,X, ...) restorer N##_restorer(X, ##__VA_ARGS__)
+#define RESTORE(N) N##_restorer.restore()
diff --git a/Marlin/src/feature/I2CPositionEncoder.cpp b/Marlin/src/feature/I2CPositionEncoder.cpp
index 96e8284b1c..3ada505dc9 100644
--- a/Marlin/src/feature/I2CPositionEncoder.cpp
+++ b/Marlin/src/feature/I2CPositionEncoder.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -155,7 +155,7 @@ void I2CPositionEncoder::update() {
#ifdef I2CPE_ERR_THRESH_ABORT
if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) {
//kill(PSTR("Significant Error"));
- SERIAL_ECHOLNPAIR("Axis error greater than set threshold, aborting!", error);
+ SERIAL_ECHOLNPAIR("Axis error over threshold, aborting!", error);
safe_delay(5000);
}
#endif
@@ -379,12 +379,12 @@ bool I2CPositionEncoder::test_axis() {
void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
if (type != I2CPE_ENC_TYPE_LINEAR) {
- SERIAL_ECHOLNPGM("Steps per mm calibration is only available using linear encoders.");
+ SERIAL_ECHOLNPGM("Steps/mm calibration requires linear encoder.");
return;
}
if (!(encoderAxis == X_AXIS || encoderAxis == Y_AXIS || encoderAxis == Z_AXIS)) {
- SERIAL_ECHOLNPGM("Automatic steps / mm calibration not supported for this axis.");
+ SERIAL_ECHOLNPGM("Steps/mm calibration not supported for this axis.");
return;
}
@@ -436,18 +436,18 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
travelledDistance = mm_from_count(ABS(stopCount - startCount));
- SERIAL_ECHOPAIR("Attempted to travel: ", travelDistance);
- SERIAL_ECHOLNPGM("mm.");
+ SERIAL_ECHOPAIR("Attempted travel: ", travelDistance);
+ SERIAL_ECHOLNPGM("mm");
- SERIAL_ECHOPAIR("Actually travelled: ", travelledDistance);
- SERIAL_ECHOLNPGM("mm.");
+ SERIAL_ECHOPAIR(" Actual travel: ", travelledDistance);
+ SERIAL_ECHOLNPGM("mm");
//Calculate new axis steps per unit
old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis];
new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance;
- SERIAL_ECHOLNPAIR("Old steps per mm: ", old_steps_mm);
- SERIAL_ECHOLNPAIR("New steps per mm: ", new_steps_mm);
+ SERIAL_ECHOLNPAIR("Old steps/mm: ", old_steps_mm);
+ SERIAL_ECHOLNPAIR("New steps/mm: ", new_steps_mm);
//Save new value
planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm;
@@ -464,12 +464,12 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) {
if (iter > 1) {
total /= (float)iter;
- SERIAL_ECHOLNPAIR("Average steps per mm: ", total);
+ SERIAL_ECHOLNPAIR("Average steps/mm: ", total);
}
ec = oldec;
- SERIAL_ECHOLNPGM("Calculated steps per mm has been set. Please save to EEPROM (M500) if you wish to keep these values.");
+ SERIAL_ECHOLNPGM("Calculated steps/mm set. Use M500 to save to EEPROM.");
}
void I2CPositionEncoder::reset() {
diff --git a/Marlin/src/feature/I2CPositionEncoder.h b/Marlin/src/feature/I2CPositionEncoder.h
index a3c3225d4f..6be24f681b 100644
--- a/Marlin/src/feature/I2CPositionEncoder.h
+++ b/Marlin/src/feature/I2CPositionEncoder.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/Max7219_Debug_LEDs.cpp b/Marlin/src/feature/Max7219_Debug_LEDs.cpp
index f9b8574453..6f620aed8e 100644
--- a/Marlin/src/feature/Max7219_Debug_LEDs.cpp
+++ b/Marlin/src/feature/Max7219_Debug_LEDs.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/Max7219_Debug_LEDs.h b/Marlin/src/feature/Max7219_Debug_LEDs.h
index 643a560944..627dc42323 100644
--- a/Marlin/src/feature/Max7219_Debug_LEDs.h
+++ b/Marlin/src/feature/Max7219_Debug_LEDs.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/baricuda.cpp b/Marlin/src/feature/baricuda.cpp
index c74e4b60bd..ead6669135 100644
--- a/Marlin/src/feature/baricuda.cpp
+++ b/Marlin/src/feature/baricuda.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/baricuda.h b/Marlin/src/feature/baricuda.h
index a7a70d8dc9..a93bf1b161 100644
--- a/Marlin/src/feature/baricuda.h
+++ b/Marlin/src/feature/baricuda.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/bedlevel/abl/abl.cpp b/Marlin/src/feature/bedlevel/abl/abl.cpp
index f1e736c88b..ba4d5cfacb 100644
--- a/Marlin/src/feature/bedlevel/abl/abl.cpp
+++ b/Marlin/src/feature/bedlevel/abl/abl.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/bedlevel/abl/abl.h b/Marlin/src/feature/bedlevel/abl/abl.h
index 26a5350645..541d98a412 100644
--- a/Marlin/src/feature/bedlevel/abl/abl.h
+++ b/Marlin/src/feature/bedlevel/abl/abl.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/bedlevel/bedlevel.cpp b/Marlin/src/feature/bedlevel/bedlevel.cpp
index f91f134ad0..364e22ed44 100644
--- a/Marlin/src/feature/bedlevel/bedlevel.cpp
+++ b/Marlin/src/feature/bedlevel/bedlevel.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/bedlevel/bedlevel.h b/Marlin/src/feature/bedlevel/bedlevel.h
index b57ed696fa..9801bc9138 100644
--- a/Marlin/src/feature/bedlevel/bedlevel.h
+++ b/Marlin/src/feature/bedlevel/bedlevel.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp
index 2591c9e285..eb1dc4c88a 100644
--- a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp
+++ b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
index 8fbba8f7e8..9a746f6b91 100644
--- a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
+++ b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp
index e2e281aa50..1f0e155f30 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -203,7 +203,7 @@
SERIAL_ECHOPGM("\nBed Topography Report");
if (human) {
- SERIAL_ECHOPGM(":\n\n");
+ SERIAL_ECHOLNPGM(":\n");
serial_echo_xy(4, MESH_MIN_X, MESH_MAX_Y);
serial_echo_xy(twixt, MESH_MAX_X, MESH_MAX_Y);
SERIAL_EOL();
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/src/feature/bedlevel/ubl/ubl.h
index e3b8fab280..db613ddc85 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl.h
+++ b/Marlin/src/feature/bedlevel/ubl/ubl.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
index 57f21124b2..637f9bda4a 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -1241,8 +1241,8 @@
out_mesh.distance = -99999.9f;
// Get our reference position. Either the nozzle or probe location.
- const float px = rx - (probe_as_reference == USE_PROBE_AS_REFERENCE ? X_PROBE_OFFSET_FROM_EXTRUDER : 0),
- py = ry - (probe_as_reference == USE_PROBE_AS_REFERENCE ? Y_PROBE_OFFSET_FROM_EXTRUDER : 0);
+ const float px = rx + (probe_as_reference == USE_PROBE_AS_REFERENCE ? X_PROBE_OFFSET_FROM_EXTRUDER : 0),
+ py = ry + (probe_as_reference == USE_PROBE_AS_REFERENCE ? Y_PROBE_OFFSET_FROM_EXTRUDER : 0);
float best_so_far = 99999.99f;
@@ -1407,7 +1407,7 @@
#endif
if (abort_flag) {
- SERIAL_ECHOPGM("?Error probing point. Aborting operation.\n");
+ SERIAL_ECHOLNPGM("?Error probing point. Aborting operation.");
return;
}
}
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
index 0519f736d9..01773972a1 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/caselight.cpp b/Marlin/src/feature/caselight.cpp
index e2cc23368a..ba662360b2 100644
--- a/Marlin/src/feature/caselight.cpp
+++ b/Marlin/src/feature/caselight.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -69,7 +69,6 @@ void update_case_light() {
#else // !CASE_LIGHT_USE_NEOPIXEL
- SET_OUTPUT(CASE_LIGHT_PIN);
if (USEABLE_HARDWARE_PWM(CASE_LIGHT_PIN))
analogWrite(CASE_LIGHT_PIN, n10ct);
else {
diff --git a/Marlin/src/feature/caselight.h b/Marlin/src/feature/caselight.h
index 4cd6c13770..8ae4df4e2f 100644
--- a/Marlin/src/feature/caselight.h
+++ b/Marlin/src/feature/caselight.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/closedloop.cpp b/Marlin/src/feature/closedloop.cpp
index 2fe60fcf9c..d94181749d 100644
--- a/Marlin/src/feature/closedloop.cpp
+++ b/Marlin/src/feature/closedloop.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/closedloop.h b/Marlin/src/feature/closedloop.h
index 84cec36fe6..50c814df1c 100644
--- a/Marlin/src/feature/closedloop.h
+++ b/Marlin/src/feature/closedloop.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/controllerfan.cpp b/Marlin/src/feature/controllerfan.cpp
index 7ee6671332..26560f4cde 100644
--- a/Marlin/src/feature/controllerfan.cpp
+++ b/Marlin/src/feature/controllerfan.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/controllerfan.h b/Marlin/src/feature/controllerfan.h
index 7badc99d26..fb10f3fd3f 100644
--- a/Marlin/src/feature/controllerfan.h
+++ b/Marlin/src/feature/controllerfan.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/dac/dac_dac084s085.h b/Marlin/src/feature/dac/dac_dac084s085.h
index f1b69c292b..926fa00387 100644
--- a/Marlin/src/feature/dac/dac_dac084s085.h
+++ b/Marlin/src/feature/dac/dac_dac084s085.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/dac/dac_mcp4728.cpp b/Marlin/src/feature/dac/dac_mcp4728.cpp
index 01568fb5c6..9798bbc330 100644
--- a/Marlin/src/feature/dac/dac_mcp4728.cpp
+++ b/Marlin/src/feature/dac/dac_mcp4728.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/dac/dac_mcp4728.h b/Marlin/src/feature/dac/dac_mcp4728.h
index 2e0937fcf6..c1fd6151ec 100644
--- a/Marlin/src/feature/dac/dac_mcp4728.h
+++ b/Marlin/src/feature/dac/dac_mcp4728.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/dac/stepper_dac.cpp b/Marlin/src/feature/dac/stepper_dac.cpp
index a83db09752..3e10592b4a 100644
--- a/Marlin/src/feature/dac/stepper_dac.cpp
+++ b/Marlin/src/feature/dac/stepper_dac.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/dac/stepper_dac.h b/Marlin/src/feature/dac/stepper_dac.h
index a2e2370482..c63b524a76 100644
--- a/Marlin/src/feature/dac/stepper_dac.h
+++ b/Marlin/src/feature/dac/stepper_dac.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/digipot/digipot.h b/Marlin/src/feature/digipot/digipot.h
index d4354c748f..8f94d07786 100644
--- a/Marlin/src/feature/digipot/digipot.h
+++ b/Marlin/src/feature/digipot/digipot.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/digipot/digipot_mcp4018.cpp b/Marlin/src/feature/digipot/digipot_mcp4018.cpp
index e59c3d5269..b601fbc3dd 100644
--- a/Marlin/src/feature/digipot/digipot_mcp4018.cpp
+++ b/Marlin/src/feature/digipot/digipot_mcp4018.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/digipot/digipot_mcp4451.cpp b/Marlin/src/feature/digipot/digipot_mcp4451.cpp
index 4609a2c217..1036196383 100644
--- a/Marlin/src/feature/digipot/digipot_mcp4451.cpp
+++ b/Marlin/src/feature/digipot/digipot_mcp4451.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/emergency_parser.cpp b/Marlin/src/feature/emergency_parser.cpp
index 7908f342db..6840c82556 100644
--- a/Marlin/src/feature/emergency_parser.cpp
+++ b/Marlin/src/feature/emergency_parser.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -34,6 +34,10 @@
bool EmergencyParser::killed_by_M112, // = false
EmergencyParser::enabled;
+#if ENABLED(HOST_PROMPT_SUPPORT)
+ uint8_t EmergencyParser::M876_reason; // = 0
+#endif
+
// Global instance
EmergencyParser emergency_parser;
diff --git a/Marlin/src/feature/emergency_parser.h b/Marlin/src/feature/emergency_parser.h
index 3684a3b126..5494ffda08 100644
--- a/Marlin/src/feature/emergency_parser.h
+++ b/Marlin/src/feature/emergency_parser.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -27,15 +27,20 @@
#define FORCE_INLINE __attribute__((always_inline)) inline
+#if ENABLED(HOST_PROMPT_SUPPORT)
+ #include "host_actions.h"
+#endif
+
// External references
extern volatile bool wait_for_user, wait_for_heatup;
void quickstop_stepper();
+void host_response_handler(const uint8_t response);
class EmergencyParser {
public:
- // Currently looking for: M108, M112, M410
+ // Currently looking for: M108, M112, M410, M876
enum State : char {
EP_RESET,
EP_N,
@@ -48,11 +53,22 @@ public:
EP_M4,
EP_M41,
EP_M410,
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ EP_M8,
+ EP_M87,
+ EP_M876,
+ EP_M876S,
+ EP_M876SN,
+ #endif
EP_IGNORE // to '\n'
};
static bool killed_by_M112;
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ static uint8_t M876_reason;
+ #endif
+
EmergencyParser() { enable(); }
FORCE_INLINE static void enable() { enabled = true; }
@@ -86,6 +102,9 @@ public:
case ' ': break;
case '1': state = EP_M1; break;
case '4': state = EP_M4; break;
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ case '8': state = EP_M8; break;
+ #endif
default: state = EP_IGNORE;
}
break;
@@ -114,6 +133,37 @@ public:
state = (c == '0') ? EP_M410 : EP_IGNORE;
break;
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ case EP_M8:
+ state = (c == '7') ? EP_M87 : EP_IGNORE;
+ break;
+
+ case EP_M87:
+ state = (c == '6') ? EP_M876 : EP_IGNORE;
+ break;
+
+ case EP_M876:
+ switch(c) {
+ case ' ': break;
+ case 'S': state = EP_M876S; break;
+ default: state = EP_IGNORE; break;
+ }
+ break;
+
+ case EP_M876S:
+ switch (c) {
+ case ' ': break;
+ case '0': case '1': case '2':
+ case '3': case '4': case '5':
+ case '6': case '7': case '8':
+ case '9':
+ state = EP_M876SN;
+ M876_reason = (uint8_t)(c - '0');
+ break;
+ }
+ break;
+ #endif
+
case EP_IGNORE:
if (c == '\n') state = EP_RESET;
break;
@@ -121,17 +171,13 @@ public:
default:
if (c == '\n') {
if (enabled) switch (state) {
- case EP_M108:
- wait_for_user = wait_for_heatup = false;
- break;
- case EP_M112:
- killed_by_M112 = true;
- break;
- case EP_M410:
- quickstop_stepper();
- break;
- default:
- break;
+ case EP_M108: wait_for_user = wait_for_heatup = false; break;
+ case EP_M112: killed_by_M112 = true; break;
+ case EP_M410: quickstop_stepper(); break;
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ case EP_M876SN: host_response_handler(M876_reason); break;
+ #endif
+ default: break;
}
state = EP_RESET;
}
diff --git a/Marlin/src/feature/fanmux.cpp b/Marlin/src/feature/fanmux.cpp
index ad22f15030..bba073ebbd 100644
--- a/Marlin/src/feature/fanmux.cpp
+++ b/Marlin/src/feature/fanmux.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/fanmux.h b/Marlin/src/feature/fanmux.h
index 2dfc4aabf8..82bf79be24 100644
--- a/Marlin/src/feature/fanmux.h
+++ b/Marlin/src/feature/fanmux.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/filwidth.cpp b/Marlin/src/feature/filwidth.cpp
index 98743713c8..9c4731a2ce 100644
--- a/Marlin/src/feature/filwidth.cpp
+++ b/Marlin/src/feature/filwidth.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/filwidth.h b/Marlin/src/feature/filwidth.h
index a130e8cf8c..b66a7c7689 100644
--- a/Marlin/src/feature/filwidth.h
+++ b/Marlin/src/feature/filwidth.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp
index 3fc37e3aa3..cb090af716 100644
--- a/Marlin/src/feature/fwretract.cpp
+++ b/Marlin/src/feature/fwretract.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -37,7 +37,7 @@ FWRetract fwretract; // Single instance - this calls the constructor
#include "../module/stepper.h"
#if ENABLED(RETRACT_SYNC_MIXING)
- #include "../feature/mixing.h"
+ #include "mixing.h"
#endif
// private:
@@ -142,7 +142,7 @@ void FWRetract::retract(const bool retracting
set_destination_from_current();
#if ENABLED(RETRACT_SYNC_MIXING)
- uint8_t old_mixing_tool = mixer.get_current_v_tool();
+ uint8_t old_mixing_tool = mixer.get_current_vtool();
mixer.T(MIXER_AUTORETRACT_TOOL);
#endif
diff --git a/Marlin/src/feature/fwretract.h b/Marlin/src/feature/fwretract.h
index 247ea22023..6248833d5f 100644
--- a/Marlin/src/feature/fwretract.h
+++ b/Marlin/src/feature/fwretract.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/host_actions.cpp b/Marlin/src/feature/host_actions.cpp
new file mode 100644
index 0000000000..59297af5f4
--- /dev/null
+++ b/Marlin/src/feature/host_actions.cpp
@@ -0,0 +1,157 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#include "../inc/MarlinConfig.h"
+
+#if ENABLED(HOST_ACTION_COMMANDS)
+
+#include "host_actions.h"
+
+//#define DEBUG_HOST_ACTIONS
+
+#if ENABLED(ADVANCED_PAUSE_FEATURE)
+ #include "pause.h"
+ #include "../gcode/queue.h"
+#endif
+
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #include "runout.h"
+#endif
+
+extern volatile bool wait_for_user;
+
+void host_action(const char * const pstr, const bool eol) {
+ SERIAL_ECHOPGM("//action:");
+ serialprintPGM(pstr);
+ if (eol) SERIAL_EOL();
+}
+
+#ifdef ACTION_ON_KILL
+ void host_action_kill() { host_action(PSTR(ACTION_ON_KILL)); }
+#endif
+#ifdef ACTION_ON_PAUSE
+ void host_action_pause(const bool eol/*=true*/) { host_action(PSTR(ACTION_ON_PAUSE), eol); }
+#endif
+#ifdef ACTION_ON_PAUSED
+ void host_action_paused(const bool eol/*=true*/) { host_action(PSTR(ACTION_ON_PAUSED), eol); }
+#endif
+#ifdef ACTION_ON_RESUME
+ void host_action_resume() { host_action(PSTR(ACTION_ON_RESUME)); }
+#endif
+#ifdef ACTION_ON_RESUMED
+ void host_action_resumed() { host_action(PSTR(ACTION_ON_RESUMED)); }
+#endif
+#ifdef ACTION_ON_CANCEL
+ void host_action_cancel() { host_action(PSTR(ACTION_ON_CANCEL)); }
+#endif
+
+#if ENABLED(HOST_PROMPT_SUPPORT)
+
+ PromptReason host_prompt_reason = PROMPT_NOT_DEFINED;
+
+ void host_action_prompt(const char * const ptype, const bool eol=true) {
+ host_action(PSTR("prompt_"), false);
+ serialprintPGM(ptype);
+ if (eol) SERIAL_EOL();
+ }
+
+ void host_action_prompt_plus(const char * const ptype, const char * const pstr, const bool eol=true) {
+ host_action_prompt(ptype, false);
+ SERIAL_CHAR(' ');
+ serialprintPGM(pstr);
+ if (eol) SERIAL_EOL();
+ }
+ void host_action_prompt_begin(const char * const pstr, const bool eol/*=true*/) { host_action_prompt_plus(PSTR("begin"), pstr, eol); }
+ void host_action_prompt_button(const char * const pstr) { host_action_prompt_plus(PSTR("button"), pstr); }
+ void host_action_prompt_end() { host_action_prompt(PSTR("end")); }
+ void host_action_prompt_show() { host_action_prompt(PSTR("show")); }
+ void host_prompt_do(const PromptReason reason, const char * const pstr, const char * const pbtn/*=NULL*/) {
+ host_prompt_reason = reason;
+ host_action_prompt_end();
+ host_action_prompt_begin(pstr);
+ if (pbtn) host_action_prompt_button(pbtn);
+ host_action_prompt_show();
+ }
+
+ inline void say_m876_response(const char * const pstr) {
+ SERIAL_ECHOPGM("M876 Responding PROMPT_");
+ serialprintPGM(pstr);
+ SERIAL_EOL();
+ }
+
+ void host_response_handler(const uint8_t response) {
+ #ifdef DEBUG_HOST_ACTIONS
+ SERIAL_ECHOLNPAIR("M86 Handle Reason: ", host_prompt_reason);
+ SERIAL_ECHOLNPAIR("M86 Handle Response: ", response);
+ #endif
+ const char *msg = PSTR("UNKNOWN STATE");
+ const PromptReason hpr = host_prompt_reason;
+ host_prompt_reason = PROMPT_NOT_DEFINED;
+ switch (hpr) {
+ case PROMPT_FILAMENT_RUNOUT:
+ msg = PSTR("FILAMENT_RUNOUT");
+ if (response == 0) {
+ advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE;
+ host_action_prompt_end(); // Close current prompt
+ host_action_prompt_begin(PSTR("Paused"));
+ host_action_prompt_button(PSTR("Purge More"));
+ if (false
+ #if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ || runout.filament_ran_out
+ #endif
+ )
+ host_action_prompt_button(PSTR("DisableRunout"));
+ else {
+ host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
+ host_action_prompt_button(PSTR("Continue"));
+ }
+ host_action_prompt_show();
+ }
+ else if (response == 1) {
+ #if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ if (runout.filament_ran_out) {
+ runout.enabled = false;
+ runout.reset();
+ }
+ #endif
+ advanced_pause_menu_response = ADVANCED_PAUSE_RESPONSE_RESUME_PRINT;
+ }
+ break;
+ case PROMPT_USER_CONTINUE:
+ msg = PSTR("FILAMENT_RUNOUT_CONTINUE");
+ wait_for_user = false;
+ break;
+ case PROMPT_PAUSE_RESUME:
+ msg = PSTR("LCD_PAUSE_RESUME");
+ enqueue_and_echo_commands_P(PSTR("M24"));
+ break;
+ case PROMPT_INFO:
+ msg = PSTR("GCODE_INFO");
+ break;
+ default: break;
+ }
+ say_m876_response(msg);
+ }
+
+#endif // HOST_PROMPT_SUPPORT
+
+#endif // HOST_ACTION_COMMANDS
diff --git a/Marlin/src/feature/host_actions.h b/Marlin/src/feature/host_actions.h
new file mode 100644
index 0000000000..4aee3ef1f5
--- /dev/null
+++ b/Marlin/src/feature/host_actions.h
@@ -0,0 +1,70 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+#include "../inc/MarlinConfig.h"
+
+void host_action(const char * const pstr, const bool eol=true);
+
+#ifdef ACTION_ON_KILL
+ void host_action_kill();
+#endif
+#ifdef ACTION_ON_PAUSE
+ void host_action_pause(const bool eol=true);
+#endif
+#ifdef ACTION_ON_PAUSED
+ void host_action_paused(const bool eol=true);
+#endif
+#ifdef ACTION_ON_RESUME
+ void host_action_resume();
+#endif
+#ifdef ACTION_ON_RESUMED
+ void host_action_resumed();
+#endif
+#ifdef ACTION_ON_CANCEL
+ void host_action_cancel();
+#endif
+
+#if ENABLED(HOST_PROMPT_SUPPORT)
+
+ enum PromptReason : uint8_t {
+ PROMPT_NOT_DEFINED,
+ PROMPT_FILAMENT_RUNOUT,
+ PROMPT_USER_CONTINUE,
+ PROMPT_FILAMENT_RUNOUT_REHEAT,
+ PROMPT_PAUSE_RESUME,
+ PROMPT_INFO
+ };
+
+ extern PromptReason host_prompt_reason;
+
+ void host_response_handler(const uint8_t response);
+ void host_action_prompt_begin(const char * const pstr, const bool eol=true);
+ void host_action_prompt_button(const char * const pstr);
+ void host_action_prompt_end();
+ void host_action_prompt_show();
+ void host_prompt_do(const PromptReason type, const char * const pstr, const char * const pbtn=NULL);
+ inline void host_prompt_open(const PromptReason reason, const char * const pstr, const char * const pbtn=NULL) {
+ if (host_prompt_reason == PROMPT_NOT_DEFINED) host_prompt_do(reason, pstr, pbtn);
+ }
+
+#endif
diff --git a/Marlin/src/feature/leds/blinkm.cpp b/Marlin/src/feature/leds/blinkm.cpp
index ff5bb71a95..44390cc1e6 100644
--- a/Marlin/src/feature/leds/blinkm.cpp
+++ b/Marlin/src/feature/leds/blinkm.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/blinkm.h b/Marlin/src/feature/leds/blinkm.h
index 8709ebda34..6b641d5bc7 100644
--- a/Marlin/src/feature/leds/blinkm.h
+++ b/Marlin/src/feature/leds/blinkm.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/leds.cpp b/Marlin/src/feature/leds/leds.cpp
index ae377ecbef..f2b1a965ab 100644
--- a/Marlin/src/feature/leds/leds.cpp
+++ b/Marlin/src/feature/leds/leds.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -60,6 +60,14 @@
LEDLights leds;
void LEDLights::setup() {
+ #if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
+ SET_OUTPUT(RGB_LED_R_PIN);
+ SET_OUTPUT(RGB_LED_G_PIN);
+ SET_OUTPUT(RGB_LED_B_PIN);
+ #if ENABLED(RGBW_LED)
+ SET_OUTPUT(RGB_LED_W_PIN);
+ #endif
+ #endif
#if ENABLED(NEOPIXEL_LED)
setup_neopixel();
#endif
diff --git a/Marlin/src/feature/leds/leds.h b/Marlin/src/feature/leds/leds.h
index dc58078bfd..5a136cdd2b 100644
--- a/Marlin/src/feature/leds/leds.h
+++ b/Marlin/src/feature/leds/leds.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/neopixel.cpp b/Marlin/src/feature/leds/neopixel.cpp
index 729b4b190a..816398c6fb 100644
--- a/Marlin/src/feature/leds/neopixel.cpp
+++ b/Marlin/src/feature/leds/neopixel.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/neopixel.h b/Marlin/src/feature/leds/neopixel.h
index f761877c9a..d1dbedf8ce 100644
--- a/Marlin/src/feature/leds/neopixel.h
+++ b/Marlin/src/feature/leds/neopixel.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/pca9632.cpp b/Marlin/src/feature/leds/pca9632.cpp
index 11298f4efe..8073ae136f 100644
--- a/Marlin/src/feature/leds/pca9632.cpp
+++ b/Marlin/src/feature/leds/pca9632.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/pca9632.h b/Marlin/src/feature/leds/pca9632.h
index f2d6687780..0e9a66b1fa 100644
--- a/Marlin/src/feature/leds/pca9632.h
+++ b/Marlin/src/feature/leds/pca9632.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/printer_event_leds.cpp b/Marlin/src/feature/leds/printer_event_leds.cpp
index 3d974e7b3e..2e54310030 100644
--- a/Marlin/src/feature/leds/printer_event_leds.cpp
+++ b/Marlin/src/feature/leds/printer_event_leds.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/printer_event_leds.h b/Marlin/src/feature/leds/printer_event_leds.h
index bae891dd70..1e1410bf6c 100644
--- a/Marlin/src/feature/leds/printer_event_leds.h
+++ b/Marlin/src/feature/leds/printer_event_leds.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/leds/tempstat.cpp b/Marlin/src/feature/leds/tempstat.cpp
index 8a5a4a0b70..30ec67542e 100644
--- a/Marlin/src/feature/leds/tempstat.cpp
+++ b/Marlin/src/feature/leds/tempstat.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -32,26 +32,24 @@
#include "../../module/temperature.h"
void handle_status_leds(void) {
- static uint8_t red_led = LOW;
+ static int8_t old_red = -1; // Invalid value to force LED initialization
static millis_t next_status_led_update_ms = 0;
if (ELAPSED(millis(), next_status_led_update_ms)) {
next_status_led_update_ms += 500; // Update every 0.5s
float max_temp = 0.0;
#if HAS_HEATED_BED
- max_temp = MAX(max_temp, thermalManager.degTargetBed(), thermalManager.degBed());
+ max_temp = MAX(thermalManager.degTargetBed(), thermalManager.degBed());
#endif
HOTEND_LOOP()
max_temp = MAX(max_temp, thermalManager.degHotend(e), thermalManager.degTargetHotend(e));
- const uint8_t new_led = (max_temp > 55.0) ? HIGH : (max_temp < 54.0) ? LOW : red_led;
- if (new_led != red_led) {
- red_led = new_led;
+ const int8_t new_red = (max_temp > 55.0) ? HIGH : (max_temp < 54.0 || old_red < 0) ? LOW : old_red;
+ if (new_red != old_red) {
+ old_red = new_red;
#if PIN_EXISTS(STAT_LED_RED)
- WRITE(STAT_LED_RED_PIN, new_led);
- #if PIN_EXISTS(STAT_LED_BLUE)
- WRITE(STAT_LED_BLUE_PIN, !new_led);
- #endif
- #else
- WRITE(STAT_LED_BLUE_PIN, new_led);
+ WRITE(STAT_LED_RED_PIN, new_red);
+ #endif
+ #if PIN_EXISTS(STAT_LED_BLUE)
+ WRITE(STAT_LED_BLUE_PIN, !new_red);
#endif
}
}
diff --git a/Marlin/src/feature/leds/tempstat.h b/Marlin/src/feature/leds/tempstat.h
index ac50d93f29..391bb48452 100644
--- a/Marlin/src/feature/leds/tempstat.h
+++ b/Marlin/src/feature/leds/tempstat.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp
index 0713dca56f..dd1f886eb8 100644
--- a/Marlin/src/feature/mixing.cpp
+++ b/Marlin/src/feature/mixing.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -25,69 +25,77 @@
#if ENABLED(MIXING_EXTRUDER)
//#define MIXER_NORMALIZER_DEBUG
-#ifdef MIXER_NORMALIZER_DEBUG
- #include "../core/serial.h"
-#endif
#include "mixing.h"
Mixer mixer;
+#ifdef MIXER_NORMALIZER_DEBUG
+ #include "../core/serial.h"
+#endif
+
// Used up to Planner level
-uint_fast8_t Mixer::selected_v_tool = 0;
-float Mixer::M163_collector[MIXING_STEPPERS]; // mix proportion. 0.0 = off, otherwise <= COLOR_A_MASK.
-mixer_color_t Mixer::color[NR_MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS];
+uint_fast8_t Mixer::selected_vtool = 0;
+float Mixer::collector[MIXING_STEPPERS]; // mix proportion. 0.0 = off, otherwise <= COLOR_A_MASK.
+mixer_comp_t Mixer::color[NR_MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS];
// Used in Stepper
int_fast8_t Mixer::runner = 0;
-mixer_color_t Mixer::s_color[MIXING_STEPPERS];
+mixer_comp_t Mixer::s_color[MIXING_STEPPERS];
mixer_accu_t Mixer::accu[MIXING_STEPPERS] = { 0 };
+#if DUAL_MIXING_EXTRUDER || ENABLED(GRADIENT_MIX)
+ mixer_perc_t Mixer::mix[MIXING_STEPPERS];
+#endif
+
void Mixer::normalize(const uint8_t tool_index) {
float cmax = 0;
#ifdef MIXER_NORMALIZER_DEBUG
float csum = 0;
#endif
MIXER_STEPPER_LOOP(i) {
- cmax = max(cmax, M163_collector[i]);
+ const float v = collector[i];
+ NOLESS(cmax, v);
#ifdef MIXER_NORMALIZER_DEBUG
- csum += M163_collector[i];
+ csum += v;
#endif
}
#ifdef MIXER_NORMALIZER_DEBUG
- SERIAL_ECHOPGM("Mixer: Relation before normalizing: [ ");
+ SERIAL_ECHOPGM("Mixer: Old relation : [ ");
MIXER_STEPPER_LOOP(i) {
- SERIAL_ECHO_F(M163_collector[i] / csum, 3);
+ SERIAL_ECHO_F(collector[i] / csum, 3);
SERIAL_CHAR(' ');
}
- SERIAL_ECHOPGM("]\n");
+ SERIAL_ECHOLNPGM("]");
#endif
// Scale all values so their maximum is COLOR_A_MASK
- const float inverse_max = RECIPROCAL(cmax);
- MIXER_STEPPER_LOOP(i)
- color[tool_index][i] = M163_collector[i] * COLOR_A_MASK * inverse_max;
+ const float scale = float(COLOR_A_MASK) / cmax;
+ MIXER_STEPPER_LOOP(i) color[tool_index][i] = collector[i] * scale;
#ifdef MIXER_NORMALIZER_DEBUG
csum = 0;
- SERIAL_ECHOPGM("Mixer: Normalizing to : [ ");
+ SERIAL_ECHOPGM("Mixer: Normalize to : [ ");
MIXER_STEPPER_LOOP(i) {
SERIAL_ECHO(uint16_t(color[tool_index][i]));
SERIAL_CHAR(' ');
csum += color[tool_index][i];
}
SERIAL_ECHOLNPGM("]");
- SERIAL_ECHOPGM("Mixer: Relation after normalizing: [ ");
+ SERIAL_ECHOPGM("Mixer: New relation : [ ");
MIXER_STEPPER_LOOP(i) {
SERIAL_ECHO_F(uint16_t(color[tool_index][i]) / csum, 3);
SERIAL_CHAR(' ');
}
SERIAL_ECHOLNPGM("]");
#endif
+
+ #if ENABLED(GRADIENT_MIX)
+ refresh_gradient();
+ #endif
}
-// called at boot
-void Mixer::init( void ) {
+void Mixer::reset_vtools() {
// Virtual Tools 0, 1, 2, 3 = Filament 1, 2, 3, 4, etc.
// Every virtual tool gets a pure filament
for (uint8_t t = 0; t < MIXING_VIRTUAL_TOOLS && t < MIXING_STEPPERS; t++)
@@ -95,11 +103,17 @@ void Mixer::init( void ) {
color[t][i] = (t == i) ? COLOR_A_MASK : 0;
// Remaining virtual tools are 100% filament 1
- #if MIXING_STEPPERS < MIXING_VIRTUAL_TOOLS
+ #if MIXING_VIRTUAL_TOOLS > MIXING_STEPPERS
for (uint8_t t = MIXING_STEPPERS; t < MIXING_VIRTUAL_TOOLS; t++)
MIXER_STEPPER_LOOP(i)
color[t][i] = (i == 0) ? COLOR_A_MASK : 0;
#endif
+}
+
+// called at boot
+void Mixer::init() {
+
+ reset_vtools();
#if ENABLED(RETRACT_SYNC_MIXING)
// AUTORETRACT_TOOL gets the same amount of all filaments
@@ -107,7 +121,80 @@ void Mixer::init( void ) {
color[MIXER_AUTORETRACT_TOOL][i] = COLOR_A_MASK;
#endif
- ZERO(M163_collector);
+ ZERO(collector);
+
+ #if DUAL_MIXING_EXTRUDER || ENABLED(GRADIENT_MIX)
+ update_mix_from_vtool();
+ #endif
+
+ #if ENABLED(GRADIENT_MIX)
+ update_gradient_for_planner_z();
+ #endif
}
+void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=selected_vtool*/) {
+ float csum = 0, cmax = 0;
+ MIXER_STEPPER_LOOP(i) {
+ const float v = color[t][i];
+ cmax = MAX(cmax, v);
+ csum += v;
+ }
+ //SERIAL_ECHOPAIR("Mixer::refresh_collector(", proportion);
+ //SERIAL_ECHOPAIR(", ", int(t));
+ //SERIAL_ECHOPAIR(") cmax=", cmax);
+ //SERIAL_ECHOPAIR(" csum=", csum);
+ //SERIAL_ECHOPGM(" color");
+ const float inv_prop = proportion / csum;
+ MIXER_STEPPER_LOOP(i) {
+ collector[i] = color[t][i] * inv_prop;
+ //SERIAL_ECHOPAIR(" [", int(t));
+ //SERIAL_ECHOPAIR("][", int(i));
+ //SERIAL_ECHOPAIR("] = ", int(color[t][i]));
+ //SERIAL_ECHOPAIR(" (", collector[i]);
+ //SERIAL_ECHOPGM(") ");
+ }
+ //SERIAL_EOL();
+}
+
+#if ENABLED(GRADIENT_MIX)
+
+ #include "../module/motion.h"
+ #include "../module/planner.h"
+
+ gradient_t Mixer::gradient = {
+ false, // enabled
+ {0}, // color (array)
+ 0, 0, // start_z, end_z
+ 0, 1, // start_vtool, end_vtool
+ {0}, {0} // start_mix[], end_mix[]
+ #if ENABLED(GRADIENT_VTOOL)
+ , -1 // vtool_index
+ #endif
+ };
+
+ float Mixer::prev_z; // = 0
+
+ void Mixer::update_gradient_for_z(const float z) {
+ if (z == prev_z) return;
+ prev_z = z;
+
+ const float slice = gradient.end_z - gradient.start_z;
+
+ float pct = (z - gradient.start_z) / slice;
+ NOLESS(pct, 0.0f); NOMORE(pct, 1.0f);
+
+ MIXER_STEPPER_LOOP(i) {
+ const mixer_perc_t sm = gradient.start_mix[i];
+ mix[i] = sm + (gradient.end_mix[i] - sm) * pct;
+ }
+
+ copy_mix_to_color(gradient.color);
+ }
+
+ void Mixer::update_gradient_for_planner_z() {
+ update_gradient_for_z(planner.get_axis_position_mm(Z_AXIS));
+ }
+
+#endif // GRADIENT_MIX
+
#endif // MIXING_EXTRUDER
diff --git a/Marlin/src/feature/mixing.h b/Marlin/src/feature/mixing.h
index 0c282377f4..718b40d021 100644
--- a/Marlin/src/feature/mixing.h
+++ b/Marlin/src/feature/mixing.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -23,65 +23,229 @@
#include "../inc/MarlinConfig.h"
-#ifdef __AVR__
- #define MIXER_ACCU_SIGNED
- typedef uint8_t mixer_color_t;
- typedef int8_t mixer_accu_t;
- #define COLOR_A_MASK 0x80
- #define COLOR_MASK 0x7F
-#else
- typedef uint_fast16_t mixer_color_t;
+//#define MIXER_NORMALIZER_DEBUG
+
+#if !defined(__AVR__) // || DUAL_MIXING_EXTRUDER
+ // Use 16-bit (or fastest) data for the integer mix factors
+ typedef uint_fast16_t mixer_comp_t;
typedef uint_fast16_t mixer_accu_t;
#define COLOR_A_MASK 0x8000
#define COLOR_MASK 0x7FFF
+#else
+ // Use 8-bit data for the integer mix factors
+ // Exactness is sacrificed for speed
+ #define MIXER_ACCU_SIGNED
+ typedef uint8_t mixer_comp_t;
+ typedef int8_t mixer_accu_t;
+ #define COLOR_A_MASK 0x80
+ #define COLOR_MASK 0x7F
#endif
+typedef int8_t mixer_perc_t;
+
#ifndef MIXING_VIRTUAL_TOOLS
#define MIXING_VIRTUAL_TOOLS 1
#endif
+enum MixTool {
+ FIRST_USER_VIRTUAL_TOOL = 0,
+ LAST_USER_VIRTUAL_TOOL = MIXING_VIRTUAL_TOOLS - 1,
+ NR_USER_VIRTUAL_TOOLS,
+ #ifdef RETRACT_SYNC_MIXING
+ MIXER_AUTORETRACT_TOOL = NR_USER_VIRTUAL_TOOLS,
+ NR_MIXING_VIRTUAL_TOOLS
+ #else
+ NR_MIXING_VIRTUAL_TOOLS = NR_USER_VIRTUAL_TOOLS
+ #endif
+};
+
#ifdef RETRACT_SYNC_MIXING
- #define NR_MIXING_VIRTUAL_TOOLS (MIXING_VIRTUAL_TOOLS + 1)
- #define MIXER_AUTORETRACT_TOOL MIXING_VIRTUAL_TOOLS
- #if NR_MIXING_VIRTUAL_TOOLS > 254
- #error "MIXING_VIRTUAL_TOOLS must be <= 254!"
- #endif
+ static_assert(NR_MIXING_VIRTUAL_TOOLS <= 254, "MIXING_VIRTUAL_TOOLS must be <= 254!");
#else
- #define NR_MIXING_VIRTUAL_TOOLS (MIXING_VIRTUAL_TOOLS)
- #if NR_MIXING_VIRTUAL_TOOLS > 255
- #error "MIXING_VIRTUAL_TOOLS must be <= 255!"
- #endif
+ static_assert(NR_MIXING_VIRTUAL_TOOLS <= 255, "MIXING_VIRTUAL_TOOLS must be <= 255!");
#endif
#define MIXER_STEPPER_LOOP(VAR) \
for (uint_fast8_t VAR = 0; VAR < MIXING_STEPPERS; VAR++)
-#define MIXER_BLOCK_DEFINITION mixer_color_t b_color[MIXING_STEPPERS]
-#define MIXER_POPULATE_BLOCK() mixer.populate_block(block->b_color)
-#define MIXER_STEPPER_SETUP() mixer.stepper_setup(current_block->b_color)
+#define MIXER_BLOCK_FIELD mixer_comp_t b_color[MIXING_STEPPERS]
+#define MIXER_POPULATE_BLOCK() mixer.populate_block(block->b_color)
+#define MIXER_STEPPER_SETUP() mixer.stepper_setup(current_block->b_color)
+#if ENABLED(GRADIENT_MIX)
+
+ typedef struct {
+ bool enabled; // This gradient is enabled
+ mixer_comp_t color[MIXING_STEPPERS]; // The current gradient color
+ float start_z, end_z; // Region for gradient
+ int8_t start_vtool, end_vtool; // Start and end virtual tools
+ mixer_perc_t start_mix[MIXING_STEPPERS], // Start and end mixes from those tools
+ end_mix[MIXING_STEPPERS];
+ #if ENABLED(GRADIENT_VTOOL)
+ int8_t vtool_index; // Use this virtual tool number as index
+ #endif
+ } gradient_t;
+
+#endif
+
+/**
+ * @brief Mixer class
+ * @details Contains data and behaviors for a Mixing Extruder
+ */
class Mixer {
public:
- static void init(void); // Populate colors at boot time
+ static float collector[MIXING_STEPPERS]; // M163 components, also editable from LCD
+
+ static void init(); // Populate colors at boot time
+
+ static void reset_vtools();
+ static void refresh_collector(const float proportion=1.0, const uint8_t t=selected_vtool);
// Used up to Planner level
+ FORCE_INLINE static void set_collector(const uint8_t c, const float f) { collector[c] = MAX(f, 0.0f); }
+
static void normalize(const uint8_t tool_index);
- FORCE_INLINE static uint8_t get_current_v_tool(void) { return selected_v_tool; }
- FORCE_INLINE static void T(const uint_fast8_t c) { selected_v_tool = c; }
- FORCE_INLINE static void set_M163_collector(const uint8_t c, const float f) { M163_collector[c] = f; }
+ FORCE_INLINE static void normalize() { normalize(selected_vtool); }
+
+ FORCE_INLINE static uint8_t get_current_vtool() { return selected_vtool; }
+
+ FORCE_INLINE static void T(const uint_fast8_t c) {
+ selected_vtool = c;
+ #if ENABLED(GRADIENT_VTOOL)
+ refresh_gradient();
+ #endif
+ #if DUAL_MIXING_EXTRUDER
+ update_mix_from_vtool();
+ #endif
+ }
// Used when dealing with blocks
- FORCE_INLINE static void populate_block(mixer_color_t b_color[]) {
- uint_fast8_t j = get_current_v_tool();
- MIXER_STEPPER_LOOP(i) b_color[i] = color[j][i];
+ FORCE_INLINE static void populate_block(mixer_comp_t b_color[MIXING_STEPPERS]) {
+ #if ENABLED(GRADIENT_MIX)
+ if (gradient.enabled) {
+ MIXER_STEPPER_LOOP(i) b_color[i] = gradient.color[i];
+ return;
+ }
+ #endif
+ MIXER_STEPPER_LOOP(i) b_color[i] = color[selected_vtool][i];
}
- FORCE_INLINE static void stepper_setup(mixer_color_t b_color[]) { MIXER_STEPPER_LOOP(i) s_color[i] = b_color[i]; }
+
+ FORCE_INLINE static void stepper_setup(mixer_comp_t b_color[MIXING_STEPPERS]) {
+ MIXER_STEPPER_LOOP(i) s_color[i] = b_color[i];
+ }
+
+ #if DUAL_MIXING_EXTRUDER || ENABLED(GRADIENT_MIX)
+
+ static mixer_perc_t mix[MIXING_STEPPERS]; // Scratch array for the Mix in proportion to 100
+
+ static inline void copy_mix_to_color(mixer_comp_t (&tcolor)[MIXING_STEPPERS]) {
+ // Scale each component to the largest one in terms of COLOR_A_MASK
+ // So the largest component will be COLOR_A_MASK and the other will be in proportion to it
+ const float scale = (COLOR_A_MASK) * RECIPROCAL(float(MAX(mix[0], mix[1])));
+
+ // Scale all values so their maximum is COLOR_A_MASK
+ MIXER_STEPPER_LOOP(i) tcolor[i] = mix[i] * scale;
+
+ #ifdef MIXER_NORMALIZER_DEBUG
+ SERIAL_ECHOPAIR("Mix [", int(mix[0]));
+ SERIAL_ECHOPAIR(", ", int(mix[1]));
+ SERIAL_ECHOPAIR("] to Color [", int(tcolor[0]));
+ SERIAL_ECHOPAIR(", ", int(tcolor[1]));
+ SERIAL_ECHOLNPGM("]");
+ #endif
+ }
+
+ static inline void update_mix_from_vtool(const uint8_t j=selected_vtool) {
+ float ctot = 0;
+ MIXER_STEPPER_LOOP(i) ctot += color[j][i];
+ //MIXER_STEPPER_LOOP(i) mix[i] = 100.0f * color[j][i] / ctot;
+ mix[0] = mixer_perc_t(100.0f * color[j][0] / ctot);
+ mix[1] = 100 - mix[0];
+ #ifdef MIXER_NORMALIZER_DEBUG
+ SERIAL_ECHOPAIR("V-tool ", int(j));
+ SERIAL_ECHOPAIR(" [", int(color[j][0]));
+ SERIAL_ECHOPAIR(", ", int(color[j][1]));
+ SERIAL_ECHOPAIR("] to Mix [", int(mix[0]));
+ SERIAL_ECHOPAIR(", ", int(mix[1]));
+ SERIAL_ECHOLNPGM("]");
+ #endif
+ }
+
+ #endif // DUAL_MIXING_EXTRUDER || GRADIENT_MIX
+
+ #if DUAL_MIXING_EXTRUDER
+
+ // Update the virtual tool from an edited mix
+ static inline void update_vtool_from_mix() {
+ copy_mix_to_color(color[selected_vtool]);
+ #if ENABLED(GRADIENT_MIX)
+ refresh_gradient();
+ #endif
+ // MIXER_STEPPER_LOOP(i) collector[i] = mix[i];
+ // normalize();
+ }
+
+ #endif // DUAL_MIXING_EXTRUDER
+
+ #if ENABLED(GRADIENT_MIX)
+
+ static gradient_t gradient;
+ static float prev_z;
+
+ // Update the current mix from the gradient for a given Z
+ static void update_gradient_for_z(const float z);
+ static void update_gradient_for_planner_z();
+ static inline void gradient_control(const float z) {
+ if (gradient.enabled) {
+ if (z >= gradient.end_z)
+ T(gradient.end_vtool);
+ else
+ update_gradient_for_z(z);
+ }
+ }
+
+ static inline void update_mix_from_gradient() {
+ float ctot = 0;
+ MIXER_STEPPER_LOOP(i) ctot += gradient.color[i];
+ mix[0] = (mixer_perc_t)CEIL(100.0f * gradient.color[0] / ctot);
+ mix[1] = 100 - mix[0];
+ #ifdef MIXER_NORMALIZER_DEBUG
+ SERIAL_ECHOPAIR("Gradient [", int(gradient.color[0]));
+ SERIAL_ECHOPAIR(", ", int(gradient.color[1]));
+ SERIAL_ECHOPAIR("] to Mix [", int(mix[0]));
+ SERIAL_ECHOPAIR(", ", int(mix[1]));
+ SERIAL_ECHOLNPGM("]");
+ #endif
+ }
+
+ // Refresh the gradient after a change
+ static void refresh_gradient() {
+ #if ENABLED(GRADIENT_VTOOL)
+ const bool is_grd = (selected_vtool == gradient.vtool_index || gradient.vtool_index == -1);
+ #else
+ constexpr bool is_grd = true;
+ #endif
+ gradient.enabled = is_grd && gradient.start_vtool != gradient.end_vtool && gradient.start_z < gradient.end_z;
+ if (gradient.enabled) {
+ mixer_perc_t mix_bak[MIXING_STEPPERS];
+ COPY(mix_bak, mix);
+ update_mix_from_vtool(gradient.start_vtool);
+ COPY(gradient.start_mix, mix);
+ update_mix_from_vtool(gradient.end_vtool);
+ COPY(gradient.end_mix, mix);
+ update_gradient_for_planner_z();
+ COPY(mix, mix_bak);
+ prev_z = -1;
+ }
+ }
+
+ #endif // GRADIENT_MIX
// Used in Stepper
- FORCE_INLINE static uint8_t get_stepper(void) { return runner; }
- FORCE_INLINE static uint8_t get_next_stepper(void) {
- do {
+ FORCE_INLINE static uint8_t get_stepper() { return runner; }
+ FORCE_INLINE static uint8_t get_next_stepper() {
+ for (;;) {
if (--runner < 0) runner = MIXING_STEPPERS - 1;
accu[runner] += s_color[runner];
if (
@@ -94,20 +258,19 @@ class Mixer {
accu[runner] &= COLOR_MASK;
return runner;
}
- } while( true );
+ }
}
private:
// Used up to Planner level
- static uint_fast8_t selected_v_tool;
- static float M163_collector[MIXING_STEPPERS];
- static mixer_color_t color[NR_MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS];
+ static uint_fast8_t selected_vtool;
+ static mixer_comp_t color[NR_MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS];
// Used in Stepper
- static int_fast8_t runner;
- static mixer_color_t s_color[MIXING_STEPPERS];
- static mixer_accu_t accu[MIXING_STEPPERS];
+ static int_fast8_t runner;
+ static mixer_comp_t s_color[MIXING_STEPPERS];
+ static mixer_accu_t accu[MIXING_STEPPERS];
};
extern Mixer mixer;
diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp
index f1fdde6cc5..f0e5c74f86 100644
--- a/Marlin/src/feature/pause.cpp
+++ b/Marlin/src/feature/pause.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -38,11 +38,15 @@
#include "../module/temperature.h"
#if ENABLED(FWRETRACT)
- #include "../feature/fwretract.h"
+ #include "fwretract.h"
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
- #include "../feature/runout.h"
+ #include "runout.h"
+#endif
+
+#if ENABLED(HOST_ACTION_COMMANDS)
+ #include "host_actions.h"
#endif
#include "../lcd/ultralcd.h"
@@ -93,7 +97,7 @@ static bool ensure_safe_temperature(const AdvancedPauseMode mode=ADVANCED_PAUSE_
#if ENABLED(PREVENT_COLD_EXTRUSION)
if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder)) {
- SERIAL_ERROR_MSG(MSG_ERR_HOTEND_TOO_COLD);
+ SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
return false;
}
#endif
@@ -108,6 +112,9 @@ static bool ensure_safe_temperature(const AdvancedPauseMode mode=ADVANCED_PAUSE_
}
void do_pause_e_move(const float &length, const float &fr) {
+ #if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ runout.reset();
+ #endif
current_position[E_AXIS] += length / planner.e_factor[active_extruder];
planner.buffer_line(current_position, fr, active_extruder);
planner.synchronize();
@@ -151,6 +158,20 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true; // LCD click or M108 will clear this
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ const char tool = '0'
+ #if NUM_RUNOUT_SENSORS > 1
+ + active_extruder
+ #endif
+ ;
+ host_prompt_reason = PROMPT_USER_CONTINUE;
+ host_action_prompt_end();
+ host_action_prompt_begin(PSTR("Load Filament T"), false);
+ SERIAL_CHAR(tool);
+ SERIAL_EOL();
+ host_action_prompt_button(PSTR("Continue"));
+ host_action_prompt_show();
+ #endif
while (wait_for_user) {
#if HAS_BUZZER
filament_change_beep(max_beep_count);
@@ -203,6 +224,9 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#endif
wait_for_user = true;
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Continuous Purge Running..."), PSTR("Continue"));
+ #endif
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
wait_for_user = false;
@@ -221,6 +245,24 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
}
// Show "Purge More" / "Resume" menu and wait for reply
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
+ host_action_prompt_end(); // Close current prompt
+ host_action_prompt_begin(PSTR("Paused"));
+ host_action_prompt_button(PSTR("PurgeMore"));
+ if (false
+ #if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ || runout.filament_ran_out
+ #endif
+ )
+ host_action_prompt_button(PSTR("DisableRunout"));
+ else {
+ host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
+ host_action_prompt_button(PSTR("Continue"));
+ }
+ host_action_prompt_show();
+ #endif
+
#if HAS_LCD_MENU
if (show_lcd) {
KEEPALIVE_STATE(PAUSED_FOR_USER);
@@ -232,11 +274,9 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#endif
// Keep looping if "Purge More" was selected
- } while (
+ } while (false
#if HAS_LCD_MENU
- show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE
- #else
- 0
+ && show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE
#endif
);
@@ -294,7 +334,7 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
#endif
// Disable extruders steppers for manual filament changing (only on boards that have separate ENABLE_PINS)
- #if (E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN) || AXIS_DRIVER_TYPE(E0, TMC2660) || AXIS_DRIVER_TYPE(E1, TMC2660) || AXIS_DRIVER_TYPE(E2, TMC2660) || AXIS_DRIVER_TYPE(E3, TMC2660) || AXIS_DRIVER_TYPE(E4, TMC2660) || AXIS_DRIVER_TYPE(E5, TMC2660)
+ #if (E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN) || AXIS_DRIVER_TYPE_E0(TMC2660) || AXIS_DRIVER_TYPE_E1(TMC2660) || AXIS_DRIVER_TYPE_E2(TMC2660) || AXIS_DRIVER_TYPE_E3(TMC2660) || AXIS_DRIVER_TYPE_E4(TMC2660) || AXIS_DRIVER_TYPE_E5(TMC2660)
disable_e_stepper(active_extruder);
safe_delay(100);
#endif
@@ -323,24 +363,27 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
if (did_pause_print) return false; // already paused
- #ifdef ACTION_ON_PAUSE
- SERIAL_ECHOLNPGM("//action:" ACTION_ON_PAUSE);
- #endif
-
- #if HAS_LCD_MENU
- if (show_lcd) lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT, ADVANCED_PAUSE_MODE_PAUSE_PRINT);
- #else
- UNUSED(show_lcd);
+ #if ENABLED(HOST_ACTION_COMMANDS)
+ #ifdef ACTION_ON_PAUSED
+ host_action_paused();
+ #elif defined(ACTION_ON_PAUSE)
+ host_action_pause();
+ #endif
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_open(PROMPT_INFO, PSTR("Pause"));
+ #endif
#endif
if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
- SERIAL_ERROR_MSG(MSG_ERR_HOTEND_TOO_COLD);
+ SERIAL_ECHO_MSG(MSG_ERR_HOTEND_TOO_COLD);
#if HAS_LCD_MENU
if (show_lcd) { // Show status screen
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
LCD_MESSAGEPGM(MSG_M600_TOO_COLD);
}
+ #else
+ UNUSED(show_lcd);
#endif
return false; // unable to reach safe temperature
@@ -446,6 +489,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
// Wait for filament insert by user and press button
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true; // LCD click or M108 will clear this
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), PSTR("Continue"));
+ #endif
while (wait_for_user) {
#if HAS_BUZZER
filament_change_beep(max_beep_count);
@@ -463,9 +509,17 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
#endif
SERIAL_ECHO_MSG(_PMSG(MSG_FILAMENT_CHANGE_HEAT));
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_do(PROMPT_USER_CONTINUE, PSTR("HeaterTimeout"), PSTR("Reheat"));
+ #endif
+
// Wait for LCD click or M108
while (wait_for_user) idle(true);
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheating"));
+ #endif
+
// Re-enable the heaters if they timed out
HOTEND_LOOP() thermalManager.reset_heater_idle_timer(e);
@@ -480,7 +534,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
HOTEND_LOOP()
thermalManager.start_heater_idle_timer(e, nozzle_timeout);
-
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), PSTR("Continue"));
+ #endif
wait_for_user = true;
nozzle_timed_out = false;
@@ -519,11 +575,11 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
*/
void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) {
/*
- SERIAL_ECHOPGM("start of resume_print()\n");
+ SERIAL_ECHOLNPGM("start of resume_print()");
SERIAL_ECHOPAIR("\ndual_x_carriage_mode:", dual_x_carriage_mode);
SERIAL_ECHOPAIR("\nextruder_duplication_enabled:", extruder_duplication_enabled);
SERIAL_ECHOPAIR("\nactive_extruder:", active_extruder);
- SERIAL_ECHOPGM("\n\n");
+ SERIAL_ECHOLNPGM("\n");
//*/
if (!did_pause_print) return;
@@ -558,24 +614,30 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
// Move Z_AXIS to saved position
do_blocking_move_to_z(resume_position[Z_AXIS], NOZZLE_PARK_Z_FEEDRATE);
+ #if ADVANCED_PAUSE_RESUME_PRIME != 0
+ do_pause_e_move(ADVANCED_PAUSE_RESUME_PRIME, ADVANCED_PAUSE_PURGE_FEEDRATE);
+ #endif
+
// Now all extrusion positions are resumed and ready to be confirmed
// Set extruder to saved position
planner.set_e_position_mm((destination[E_AXIS] = current_position[E_AXIS] = resume_position[E_AXIS]));
- #if ENABLED(FILAMENT_RUNOUT_SENSOR)
- runout.reset();
- #endif
-
#if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
#endif
- #ifdef ACTION_ON_RESUME
- SERIAL_ECHOLNPGM("//action:" ACTION_ON_RESUME);
+ #ifdef ACTION_ON_RESUMED
+ host_action_resumed();
+ #elif defined(ACTION_ON_RESUME)
+ host_action_resume();
#endif
--did_pause_print;
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_open(PROMPT_INFO, PSTR("Resume"));
+ #endif
+
#if ENABLED(SDSUPPORT)
if (did_pause_print) {
card.startFileprint();
diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h
index 6cc901c1d9..621a70934c 100644
--- a/Marlin/src/feature/pause.h
+++ b/Marlin/src/feature/pause.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp
index 5374135816..fa98948161 100644
--- a/Marlin/src/feature/power.cpp
+++ b/Marlin/src/feature/power.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/power.h b/Marlin/src/feature/power.h
index 101ccb4a52..5f61bb3b7b 100644
--- a/Marlin/src/feature/power.h
+++ b/Marlin/src/feature/power.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/power_loss_recovery.cpp b/Marlin/src/feature/power_loss_recovery.cpp
index a53829ef06..7b8f15b65d 100644
--- a/Marlin/src/feature/power_loss_recovery.cpp
+++ b/Marlin/src/feature/power_loss_recovery.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -176,6 +176,10 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*=
);
#endif
+ #if ENABLED(GRADIENT_MIX)
+ memcpy(&info.gradient, &mixer.gradient, sizeof(info.gradient));
+ #endif
+
#if ENABLED(FWRETRACT)
COPY(info.retract, fwretract.current_retract);
info.retract_hop = fwretract.current_hop;
@@ -235,7 +239,7 @@ void PrintJobRecovery::resume() {
// Set Z to 0, raise Z by 2mm, and Home (XY only for Cartesian) with no raise
// (Only do simulated homing in Marlin Dev Mode.)
- gcode.process_subcommands_now_P(PSTR("G92.0 Z0|G1 Z" STRINGIFY(RECOVERY_ZRAISE) "|G28 R0"
+ gcode.process_subcommands_now_P(PSTR("G92.0 Z0\nG1 Z" STRINGIFY(RECOVERY_ZRAISE) "\nG28 R0"
#if ENABLED(MARLIN_DEV_MODE)
" S"
#elif !IS_KINEMATIC
@@ -305,6 +309,10 @@ void PrintJobRecovery::resume() {
}
#endif
+ #if ENABLED(GRADIENT_MIX)
+ memcpy(&mixer.gradient, &info.gradient, sizeof(info.gradient));
+ #endif
+
// Restore Z (plus raise) and E positions with G92.0
dtostrf(info.current_position[Z_AXIS] + RECOVERY_ZRAISE, 1, 3, str_1);
dtostrf(info.current_position[E_AXIS]
diff --git a/Marlin/src/feature/power_loss_recovery.h b/Marlin/src/feature/power_loss_recovery.h
index d2222c779c..dd330652ea 100644
--- a/Marlin/src/feature/power_loss_recovery.h
+++ b/Marlin/src/feature/power_loss_recovery.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -28,6 +28,10 @@
#include "../sd/cardreader.h"
#include "../inc/MarlinConfigPre.h"
+#if ENABLED(MIXING_EXTRUDER)
+ #include "../feature/mixing.h"
+#endif
+
#define SAVE_INFO_INTERVAL_MS 0
//#define SAVE_EACH_CMD_MODE
//#define DEBUG_POWER_LOSS_RECOVERY
@@ -63,6 +67,15 @@ typedef struct {
float retract[EXTRUDERS], retract_hop;
#endif
+ // Mixing extruder and gradient
+ #if ENABLED(MIXING_EXTRUDER)
+ //uint_fast8_t selected_vtool;
+ //mixer_comp_t color[NR_MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS];
+ #if ENABLED(GRADIENT_MIX)
+ gradient_t gradient;
+ #endif
+ #endif
+
// Command queue
uint8_t commands_in_queue, cmd_queue_index_r;
char command_queue[BUFSIZE][MAX_CMD_SIZE];
diff --git a/Marlin/src/feature/prusa_MMU2/mmu2.cpp b/Marlin/src/feature/prusa_MMU2/mmu2.cpp
new file mode 100644
index 0000000000..d6c4c23384
--- /dev/null
+++ b/Marlin/src/feature/prusa_MMU2/mmu2.cpp
@@ -0,0 +1,904 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#include "../../inc/MarlinConfig.h"
+
+#if ENABLED(PRUSA_MMU2)
+
+#include "mmu2.h"
+#include "../../lcd/menu/menu_mmu2.h"
+
+MMU2 mmu2;
+
+#include "../../gcode/gcode.h"
+#include "../../lcd/ultralcd.h"
+#include "../../libs/buzzer.h"
+#include "../../libs/nozzle.h"
+#include "../../module/temperature.h"
+#include "../../module/planner.h"
+#include "../../module/stepper_indirection.h"
+#include "../../Marlin.h"
+
+#if ENABLED(HOST_PROMPT_SUPPORT)
+ #include "../../feature/host_actions.h"
+#endif
+
+#define MMU_TODELAY 100
+#define MMU_TIMEOUT 10
+#define MMU_CMD_TIMEOUT 60000ul //5min timeout for mmu commands (except P0)
+#define MMU_P0_TIMEOUT 3000ul //timeout for P0 command: 3seconds
+
+#define MMU_CMD_NONE 0
+#define MMU_CMD_T0 0x10
+#define MMU_CMD_T1 0x11
+#define MMU_CMD_T2 0x12
+#define MMU_CMD_T3 0x13
+#define MMU_CMD_T4 0x14
+#define MMU_CMD_L0 0x20
+#define MMU_CMD_L1 0x21
+#define MMU_CMD_L2 0x22
+#define MMU_CMD_L3 0x23
+#define MMU_CMD_L4 0x24
+#define MMU_CMD_C0 0x30
+#define MMU_CMD_U0 0x40
+#define MMU_CMD_E0 0x50
+#define MMU_CMD_E1 0x51
+#define MMU_CMD_E2 0x52
+#define MMU_CMD_E3 0x53
+#define MMU_CMD_E4 0x54
+#define MMU_CMD_R0 0x60
+#define MMU_CMD_F0 0x70
+#define MMU_CMD_F1 0x71
+#define MMU_CMD_F2 0x72
+#define MMU_CMD_F3 0x73
+#define MMU_CMD_F4 0x74
+
+#if ENABLED(MMU2_MODE_12V)
+ #define MMU_REQUIRED_FW_BUILDNR 132
+#else
+ #define MMU_REQUIRED_FW_BUILDNR 126
+#endif
+
+#define MMU2_NO_TOOL 99
+#define MMU_BAUD 115200
+
+#define mmuSerial MMU2_SERIAL
+
+bool MMU2::enabled, MMU2::ready, MMU2::mmu_print_saved;
+uint8_t MMU2::cmd, MMU2::cmd_arg, MMU2::last_cmd, MMU2::extruder;
+int8_t MMU2::state = 0;
+volatile int8_t MMU2::finda = 1;
+volatile bool MMU2::findaRunoutValid;
+int16_t MMU2::version = -1, MMU2::buildnr = -1;
+millis_t MMU2::last_request, MMU2::next_P0_request;
+char MMU2::rx_buffer[16], MMU2::tx_buffer[16];
+
+#if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
+
+ struct E_Step {
+ float extrude; //!< extrude distance in mm
+ float feedRate; //!< feed rate in mm/s
+ };
+
+ static constexpr E_Step ramming_sequence[] PROGMEM = { MMU2_RAMMING_SEQUENCE };
+ static constexpr E_Step loadToNozzle_sequence[] PROGMEM = { MMU2_LOAD_TO_NOZZLE_SEQUENCE };
+
+#endif // MMU2_MENUS
+
+MMU2::MMU2() {
+ rx_buffer[0] = '\0';
+}
+
+void MMU2::init() {
+
+ set_runout_valid(false);
+
+ #if PIN_EXISTS(MMU2_RST)
+ // TODO use macros for this
+ WRITE(MMU2_RST_PIN, HIGH);
+ SET_OUTPUT(MMU2_RST_PIN);
+ #endif
+
+ mmuSerial.begin(MMU_BAUD);
+ extruder = MMU2_NO_TOOL;
+
+ safe_delay(10);
+ reset();
+ rx_buffer[0] = '\0';
+ state = -1;
+}
+
+void MMU2::reset() {
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU <= reset");
+ #endif
+
+ #if PIN_EXISTS(MMU2_RST)
+ WRITE(MMU2_RST_PIN, LOW);
+ safe_delay(20);
+ WRITE(MMU2_RST_PIN, HIGH);
+ #else
+ tx_str_P(PSTR("X0\n")); // Send soft reset
+ #endif
+}
+
+uint8_t MMU2::getCurrentTool() {
+ return extruder == MMU2_NO_TOOL ? -1 : extruder;
+}
+
+void MMU2::mmuLoop() {
+
+ switch (state) {
+
+ case 0: break;
+
+ case -1:
+ if (rx_start()) {
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU => 'start'");
+ SERIAL_ECHOLNPGM("MMU <= 'S1'");
+ #endif
+
+ // send "read version" request
+ tx_str_P(PSTR("S1\n"));
+
+ state = -2;
+ }
+ else if (millis() > 3000000) {
+ SERIAL_ECHOLNPGM("MMU not responding - DISABLED");
+ state = 0;
+ }
+ break;
+
+ case -2:
+ if (rx_ok()) {
+ sscanf(rx_buffer, "%uok\n", &version);
+
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPAIR("MMU => ", version);
+ SERIAL_ECHOLNPGM("MMU <= 'S2'");
+ #endif
+
+ tx_str_P(PSTR("S2\n")); // read build number
+ state = -3;
+ }
+ break;
+
+ case -3:
+ if (rx_ok()) {
+ sscanf(rx_buffer, "%uok\n", &buildnr);
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPAIR("MMU => ", buildnr);
+ #endif
+
+ checkVersion();
+
+ #if ENABLED(MMU2_MODE_12V)
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU <= 'M1'");
+ #endif
+
+ tx_str_P(PSTR("M1\n")); // switch to stealth mode
+ state = -5;
+
+ #else
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU <= 'P0'");
+ #endif
+
+ tx_str_P(PSTR("P0\n")); // read finda
+ state = -4;
+ #endif
+ }
+ break;
+
+ case -5:
+ // response to M1
+ if (rx_ok()) {
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU => ok");
+ #endif
+
+ checkVersion();
+
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU <= 'P0'");
+ #endif
+
+ tx_str_P(PSTR("P0\n")); // read finda
+ state = -4;
+ }
+ break;
+
+ case -4:
+ if (rx_ok()) {
+ sscanf(rx_buffer, "%hhuok\n", &finda);
+
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPAIR("MMU => ", finda);
+ SERIAL_ECHOLNPGM("MMU - ENABLED");
+ #endif
+
+ enabled = true;
+ state = 1;
+ }
+ break;
+
+ case 1:
+ if (cmd) {
+ if (WITHIN(cmd, MMU_CMD_T0, MMU_CMD_T4)) {
+ // tool change
+ int filament = cmd - MMU_CMD_T0;
+
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPAIR("MMU <= T", filament);
+ #endif
+
+ tx_printf_P(PSTR("T%d\n"), filament);
+ state = 3; // wait for response
+ }
+ else if (WITHIN(cmd, MMU_CMD_L0, MMU_CMD_L4)) {
+ // load
+ int filament = cmd - MMU_CMD_L0;
+
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPAIR("MMU <= L", filament);
+ #endif
+
+ tx_printf_P(PSTR("L%d\n"), filament);
+ state = 3; // wait for response
+ }
+ else if (cmd == MMU_CMD_C0) {
+ // continue loading
+
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU <= 'C0'");
+ #endif
+
+ tx_str_P(PSTR("C0\n"));
+ state = 3; // wait for response
+ }
+ else if (cmd == MMU_CMD_U0) {
+ // unload current
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU <= 'U0'");
+ #endif
+
+ tx_str_P(PSTR("U0\n"));
+ state = 3; // wait for response
+ }
+ else if (WITHIN(cmd, MMU_CMD_E0, MMU_CMD_E4)) {
+ // eject filament
+ int filament = cmd - MMU_CMD_E0;
+
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPAIR("MMU <= E", filament);
+ #endif
+ tx_printf_P(PSTR("E%d\n"), filament);
+ state = 3; // wait for response
+ }
+ else if (cmd == MMU_CMD_R0) {
+ // recover after eject
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU <= 'R0'");
+ #endif
+
+ tx_str_P(PSTR("R0\n"));
+ state = 3; // wait for response
+ }
+ else if (WITHIN(cmd, MMU_CMD_F0, MMU_CMD_F4)) {
+ // filament type
+ int filament = cmd - MMU_CMD_F0;
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOPAIR("MMU <= F", filament);
+ SERIAL_ECHOPGM(" ");
+ SERIAL_ECHO_F(cmd_arg, DEC);
+ SERIAL_ECHOPGM("\n");
+ #endif
+
+ tx_printf_P(PSTR("F%d %d\n"), filament, cmd_arg);
+ state = 3; // wait for response
+ }
+
+ last_cmd = cmd;
+ cmd = MMU_CMD_NONE;
+ }
+ else if (ELAPSED(millis(), next_P0_request)) {
+ // read FINDA
+ tx_str_P(PSTR("P0\n"));
+ state = 2; // wait for response
+ }
+ break;
+
+ case 2: // response to command P0
+ if (rx_ok()) {
+ sscanf(rx_buffer, "%hhuok\n", &finda);
+
+ #if ENABLED(MMU2_DEBUG)
+ // This is super annoying. Only activate if necessary
+ /*
+ if (findaRunoutValid) {
+ SERIAL_ECHOLNPGM("MMU <= 'P0'");
+ SERIAL_ECHOPGM("MMU => ");
+ SERIAL_ECHO_F(finda, DEC);
+ SERIAL_ECHOPGM("\n");
+ }
+ */
+ #endif
+
+ state = 1;
+
+ if (cmd == 0) ready = true;
+
+ if (!finda && findaRunoutValid) filamentRunout();
+ }
+ else if (ELAPSED(millis(), last_request + MMU_P0_TIMEOUT)) // Resend request after timeout (30s)
+ state = 1;
+
+ break;
+
+ case 3: // response to mmu commands
+ if (rx_ok()) {
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU => 'ok'");
+ #endif
+
+ ready = true;
+ state = 1;
+ last_cmd = MMU_CMD_NONE;
+ }
+ else if (ELAPSED(millis(), last_request + MMU_CMD_TIMEOUT)) {
+ // resend request after timeout
+ if (last_cmd) {
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("MMU retry");
+ #endif
+
+ cmd = last_cmd;
+ last_cmd = MMU_CMD_NONE;
+ }
+ state = 1;
+ }
+ break;
+ }
+}
+
+
+/**
+ * Check if MMU was started
+ */
+bool MMU2::rx_start() {
+ // check for start message
+ if (rx_str_P(PSTR("start\n"))) {
+ next_P0_request = millis() + 300;
+ return true;
+ }
+ return false;
+}
+
+
+/**
+ * Check if the data received ends with the given string.
+ */
+bool MMU2::rx_str_P(const char* str) {
+ uint8_t i = strlen(rx_buffer);
+
+ while (mmuSerial.available()) {
+ rx_buffer[i++] = mmuSerial.read();
+ rx_buffer[i] = '\0';
+
+ if (i == sizeof(rx_buffer) - 1) {
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHOLNPGM("rx buffer overrun");
+ #endif
+
+ break;
+ }
+ }
+
+ uint8_t len = strlen_P(str);
+
+ if (i < len) return false;
+
+ str += len;
+
+ while (len--) {
+ char c0 = pgm_read_byte(str--), c1 = rx_buffer[i--];
+ if (c0 == c1) continue;
+ if (c0 == '\r' && c1 == '\n') continue; // match cr as lf
+ if (c0 == '\n' && c1 == '\r') continue; // match lf as cr
+ return false;
+ }
+ return true;
+}
+
+
+/**
+ * Transfer data to MMU, no argument
+ */
+void MMU2::tx_str_P(const char* str) {
+ clear_rx_buffer();
+ uint8_t len = strlen_P(str);
+ for (uint8_t i = 0; i < len; i++) mmuSerial.write(pgm_read_byte(str++));
+ rx_buffer[0] = '\0';
+ last_request = millis();
+}
+
+
+/**
+ * Transfer data to MMU, single argument
+ */
+void MMU2::tx_printf_P(const char* format, int argument = -1) {
+ clear_rx_buffer();
+ uint8_t len = sprintf_P(tx_buffer, format, argument);
+ for (uint8_t i = 0; i < len; i++) mmuSerial.write(tx_buffer[i]);
+ rx_buffer[0] = '\0';
+ last_request = millis();
+}
+
+
+/**
+ * Transfer data to MMU, two arguments
+ */
+void MMU2::tx_printf_P(const char* format, int argument1, int argument2) {
+ clear_rx_buffer();
+ uint8_t len = sprintf_P(tx_buffer, format, argument1, argument2);
+ for (uint8_t i = 0; i < len; i++) mmuSerial.write(tx_buffer[i]);
+ rx_buffer[0] = '\0';
+ last_request = millis();
+}
+
+
+/**
+ * Empty the rx buffer
+ */
+void MMU2::clear_rx_buffer() {
+ while (mmuSerial.available()) mmuSerial.read();
+ rx_buffer[0] = '\0';
+}
+
+
+/**
+ * Check if we received 'ok' from MMU
+ */
+bool MMU2::rx_ok() {
+ if (rx_str_P(PSTR("ok\n"))) {
+ next_P0_request = millis() + 300;
+ return true;
+ }
+ return false;
+}
+
+
+/**
+ * Check if MMU has compatible firmware
+ */
+void MMU2::checkVersion() {
+ if (buildnr < MMU_REQUIRED_FW_BUILDNR) {
+ SERIAL_ERROR_START();
+ SERIAL_ECHOPGM("MMU2 firmware version invalid. Required version >= ");
+ SERIAL_ECHOLN(MMU_REQUIRED_FW_BUILDNR);
+ kill(MSG_MMU2_WRONG_FIRMWARE);
+ }
+}
+
+
+/**
+ * Handle tool change
+ */
+void MMU2::toolChange(uint8_t index) {
+
+ if (!enabled) return;
+
+ set_runout_valid(false);
+
+ if (index != extruder) {
+
+ KEEPALIVE_STATE(IN_HANDLER);
+ disable_E0();
+ ui.status_printf_P(0, PSTR(MSG_MMU2_LOADING_FILAMENT), int(index + 1));
+
+ command(MMU_CMD_T0 + index);
+
+ manageResponse(true, true);
+ KEEPALIVE_STATE(IN_HANDLER);
+
+ command(MMU_CMD_C0);
+ extruder = index; //filament change is finished
+ active_extruder = 0;
+
+ enable_E0();
+
+ SERIAL_ECHO_START();
+ SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, int(extruder));
+
+ ui.reset_status();
+ KEEPALIVE_STATE(NOT_BUSY);
+ }
+
+ set_runout_valid(true);
+}
+
+
+/**
+ *
+ * Handle special T?/Tx/Tc commands
+ *
+ * T? Gcode to extrude shouldn't have to follow, load to extruder wheels is done automatically
+ * Tx Same as T?, except nozzle doesn't have to be preheated. Tc must be placed after extruder nozzle is preheated to finish filament load.
+ * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated.
+ *
+ */
+void MMU2::toolChange(const char* special) {
+
+ if (!enabled) return;
+
+ #if ENABLED(MMU2_MENUS)
+
+ set_runout_valid(false);
+ KEEPALIVE_STATE(IN_HANDLER);
+
+ switch(*special) {
+ case '?': {
+ uint8_t index = mmu2_chooseFilament();
+ while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
+ loadFilamentToNozzle(index);
+ } break;
+
+ case 'x': {
+ planner.synchronize();
+ uint8_t index = mmu2_chooseFilament();
+ disable_E0();
+ command(MMU_CMD_T0 + index);
+ manageResponse(true, true);
+ command(MMU_CMD_C0);
+ mmuLoop();
+
+ enable_E0();
+ extruder = index;
+ active_extruder = 0;
+ } break;
+
+ case 'c': {
+ while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(100);
+ executeExtruderSequence((const E_Step *)loadToNozzle_sequence, COUNT(loadToNozzle_sequence));
+ } break;
+ }
+
+ KEEPALIVE_STATE(NOT_BUSY);
+
+ set_runout_valid(true);
+
+ #endif
+}
+
+
+/**
+ * Set next command
+ */
+void MMU2::command(const uint8_t mmu_cmd) {
+ if (!enabled) return;
+ cmd = mmu_cmd;
+ ready = false;
+}
+
+
+/**
+ * Wait for response from MMU
+ */
+bool MMU2::getResponse(void) {
+ while (cmd != MMU_CMD_NONE) idle();
+
+ while (!ready) {
+ idle();
+ if (state != 3) break;
+ }
+
+ const bool ret = ready;
+ ready = false;
+
+ return ret;
+}
+
+
+/**
+ * Wait for response and deal with timeout if nexcessary
+ */
+void MMU2::manageResponse(bool move_axes, bool turn_off_nozzle) {
+
+ bool response = false;
+ mmu_print_saved = false;
+ point_t park_point = NOZZLE_PARK_POINT;
+ float resume_position[XYZE];
+ int16_t resume_hotend_temp;
+
+ while (!response) {
+
+ response = getResponse(); //wait for "ok" from mmu
+
+ if (!response) { //no "ok" was received in reserved time frame, user will fix the issue on mmu unit
+ if (!mmu_print_saved) { //first occurence, we are saving current position, park print head in certain position and disable nozzle heater
+
+ planner.synchronize();
+
+ mmu_print_saved = true;
+
+ SERIAL_ECHOLNPGM("MMU not responding");
+
+ resume_hotend_temp = thermalManager.degTargetHotend(active_extruder);
+ COPY(resume_position, current_position);
+
+ if (move_axes && all_axes_homed())
+ Nozzle::park(2, park_point /*= NOZZLE_PARK_POINT*/);
+
+ if (turn_off_nozzle) thermalManager.setTargetHotend(0, active_extruder);
+
+ LCD_MESSAGEPGM(MSG_MMU2_NOT_RESPONDING);
+ BUZZ(100, 659);
+ BUZZ(200, 698);
+ BUZZ(100, 659);
+ BUZZ(300, 440);
+ BUZZ(100, 659);
+
+ KEEPALIVE_STATE(PAUSED_FOR_USER);
+ }
+ }
+ else if (mmu_print_saved) {
+ SERIAL_ECHOLNPGM("MMU starts responding\n");
+ KEEPALIVE_STATE(IN_HANDLER);
+
+ if (turn_off_nozzle && resume_hotend_temp) {
+ thermalManager.setTargetHotend(resume_hotend_temp, active_extruder);
+ LCD_MESSAGEPGM(MSG_HEATING);
+ BUZZ(200, 40);
+
+ while (!thermalManager.wait_for_hotend(active_extruder, false)) safe_delay(1000);
+ }
+
+ if (move_axes && all_axes_homed()) {
+ LCD_MESSAGEPGM(MSG_MMU2_RESUMING);
+ BUZZ(200, 404);
+ BUZZ(200, 404);
+
+ // Move XY to starting position, then Z
+ do_blocking_move_to_xy(resume_position[X_AXIS], resume_position[Y_AXIS], NOZZLE_PARK_XY_FEEDRATE);
+
+ // Move Z_AXIS to saved position
+ do_blocking_move_to_z(resume_position[Z_AXIS], NOZZLE_PARK_Z_FEEDRATE);
+ }
+ else {
+ BUZZ(200, 404);
+ BUZZ(200, 404);
+ LCD_MESSAGEPGM(MSG_MMU2_RESUMING);
+ }
+ }
+ }
+}
+
+void MMU2::setFilamentType(uint8_t index, uint8_t filamentType) {
+ if (!enabled) return;
+
+ KEEPALIVE_STATE(IN_HANDLER);
+
+ cmd_arg = filamentType;
+ command(MMU_CMD_F0 + index);
+
+ manageResponse(true, true);
+
+ KEEPALIVE_STATE(NOT_BUSY);
+}
+
+void MMU2::filamentRunout() {
+ enqueue_and_echo_commands_P(PSTR(MMU2_FILAMENT_RUNOUT_SCRIPT));
+ planner.synchronize();
+}
+
+#if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
+
+ // Load filament into MMU2
+ void MMU2::loadFilament(uint8_t index) {
+ if (!enabled) return;
+ command(MMU_CMD_L0 + index);
+ manageResponse(false, false);
+ BUZZ(200, 404);
+ }
+
+ /**
+ *
+ * Switch material and load to nozzle
+ *
+ */
+ bool MMU2::loadFilamentToNozzle(uint8_t index) {
+
+ if (!enabled) return false;
+
+ if (thermalManager.tooColdToExtrude(active_extruder)) {
+ BUZZ(200, 404);
+ LCD_ALERTMESSAGEPGM(MSG_HOTEND_TOO_COLD);
+ return false;
+ }
+ else {
+ KEEPALIVE_STATE(IN_HANDLER);
+
+ command(MMU_CMD_T0 + index);
+ manageResponse(true, true);
+ command(MMU_CMD_C0);
+ mmuLoop();
+
+ extruder = index;
+ active_extruder = 0;
+
+ loadToNozzle();
+
+ BUZZ(200, 404);
+
+ KEEPALIVE_STATE(NOT_BUSY);
+ return true;
+ }
+ }
+
+ /**
+ *
+ * Load filament to nozzle of multimaterial printer
+ *
+ * This function is used only only after T? (user select filament) and M600 (change filament).
+ * It is not used after T0 .. T4 command (select filament), in such case, gcode is responsible for loading
+ * filament to nozzle.
+ */
+ void MMU2::loadToNozzle() {
+ if (!enabled) return;
+ executeExtruderSequence((const E_Step *)loadToNozzle_sequence, COUNT(loadToNozzle_sequence));
+ }
+
+ bool MMU2::ejectFilament(uint8_t index, bool recover) {
+
+ if (!enabled) return false;
+
+ if (thermalManager.tooColdToExtrude(active_extruder)) {
+ BUZZ(200, 404);
+ LCD_ALERTMESSAGEPGM(MSG_HOTEND_TOO_COLD);
+ return false;
+ }
+
+ KEEPALIVE_STATE(IN_HANDLER);
+ LCD_MESSAGEPGM(MSG_MMU2_EJECTING_FILAMENT);
+ const bool saved_e_relative_mode = gcode.axis_relative_modes[E_AXIS];
+ gcode.axis_relative_modes[E_AXIS] = true;
+
+ enable_E0();
+ current_position[E_AXIS] -= MMU2_FILAMENTCHANGE_EJECT_FEED;
+ planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2500 / 60, active_extruder);
+ planner.synchronize();
+ command(MMU_CMD_E0 + index);
+ manageResponse(false, false);
+
+ if (recover) {
+ LCD_MESSAGEPGM(MSG_MMU2_EJECT_RECOVER);
+ BUZZ(200, 404);
+ wait_for_user = true;
+ #if ENABLED(HOST_PROMPT_SUPPORT)
+ host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), PSTR("Continue"));
+ #endif
+ while (wait_for_user) idle();
+ BUZZ(200, 404);
+ BUZZ(200, 404);
+
+ command(MMU_CMD_R0);
+ manageResponse(false, false);
+ }
+
+ ui.reset_status();
+
+ // no active tool
+ extruder = MMU2_NO_TOOL;
+
+ set_runout_valid(false);
+
+ BUZZ(200, 404);
+
+ KEEPALIVE_STATE(NOT_BUSY);
+
+ gcode.axis_relative_modes[E_AXIS] = saved_e_relative_mode;
+
+ disable_E0();
+
+ return true;
+ }
+
+ /**
+ *
+ * unload from hotend and retract to MMU
+ *
+ */
+ bool MMU2::unload() {
+
+ if (!enabled) return false;
+
+ if (thermalManager.tooColdToExtrude(active_extruder)) {
+ BUZZ(200, 404);
+ LCD_ALERTMESSAGEPGM(MSG_HOTEND_TOO_COLD);
+ return false;
+ }
+
+ KEEPALIVE_STATE(IN_HANDLER);
+
+ filamentRamming();
+
+ command(MMU_CMD_U0);
+ manageResponse(false, true);
+
+ BUZZ(200, 404);
+
+ // no active tool
+ extruder = MMU2_NO_TOOL;
+
+ set_runout_valid(false);
+
+ KEEPALIVE_STATE(NOT_BUSY);
+
+ return true;
+ }
+
+ /**
+ * Unload sequence to optimize shape of the tip of the unloaded filament
+ */
+ void MMU2::filamentRamming() {
+ executeExtruderSequence((const E_Step *)ramming_sequence, sizeof(ramming_sequence) / sizeof(E_Step));
+ }
+
+ void MMU2::executeExtruderSequence(const E_Step * sequence, int steps) {
+
+ planner.synchronize();
+ enable_E0();
+
+ const bool saved_e_relative_mode = gcode.axis_relative_modes[E_AXIS];
+ gcode.axis_relative_modes[E_AXIS] = true;
+
+ const E_Step* step = sequence;
+
+ for (uint8_t i = 0; i < steps; i++) {
+ const float es = pgm_read_float(&(step->extrude)),
+ fr = pgm_read_float(&(step->feedRate));
+
+ #if ENABLED(MMU2_DEBUG)
+ SERIAL_ECHO_START();
+ SERIAL_ECHOPAIR("E step ", es);
+ SERIAL_CHAR('/');
+ SERIAL_ECHOLN(fr);
+ #endif
+
+ current_position[E_AXIS] += es;
+ planner.buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
+ current_position[E_AXIS], MMM_TO_MMS(fr), active_extruder);
+ planner.synchronize();
+
+ step++;
+ }
+
+ gcode.axis_relative_modes[E_AXIS] = saved_e_relative_mode;
+
+ disable_E0();
+ }
+
+#endif // HAS_LCD_MENU && MMU2_MENUS
+
+#endif // PRUSA_MMU2
diff --git a/Marlin/src/feature/prusa_MMU2/mmu2.h b/Marlin/src/feature/prusa_MMU2/mmu2.h
new file mode 100644
index 0000000000..d486cb38aa
--- /dev/null
+++ b/Marlin/src/feature/prusa_MMU2/mmu2.h
@@ -0,0 +1,94 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+#pragma once
+
+#include "../../inc/MarlinConfig.h"
+
+#if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ #include "../runout.h"
+#endif
+
+struct E_Step;
+
+class MMU2 {
+public:
+ MMU2();
+
+ static void init();
+ static void reset();
+ static void mmuLoop();
+ static void toolChange(uint8_t index);
+ static void toolChange(const char* special);
+ static uint8_t getCurrentTool();
+ static void setFilamentType(uint8_t index, uint8_t type);
+
+ #if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
+ static bool unload();
+ static void loadFilament(uint8_t);
+ static void loadAll();
+ static bool loadFilamentToNozzle(uint8_t index);
+ static bool ejectFilament(uint8_t index, bool recover);
+ #endif
+
+private:
+ static bool rx_str_P(const char* str);
+ static void tx_str_P(const char* str);
+ static void tx_printf_P(const char* format, int argument);
+ static void tx_printf_P(const char* format, int argument1, int argument2);
+ static void clear_rx_buffer();
+
+ static bool rx_ok();
+ static bool rx_start();
+ static void checkVersion();
+
+ static void command(const uint8_t cmd);
+ static bool getResponse(void);
+ static void manageResponse(bool move_axes, bool turn_off_nozzle);
+
+ #if HAS_LCD_MENU && ENABLED(MMU2_MENUS)
+ static void loadToNozzle();
+ static void filamentRamming();
+ static void executeExtruderSequence(const E_Step * sequence, int steps);
+ #endif
+
+ static void filamentRunout();
+
+ static bool enabled, ready, mmu_print_saved;
+ static uint8_t cmd, cmd_arg, last_cmd, extruder;
+ static int8_t state;
+ static volatile int8_t finda;
+ static volatile bool findaRunoutValid;
+ static int16_t version, buildnr;
+ static millis_t last_request, next_P0_request;
+ static char rx_buffer[16], tx_buffer[16];
+
+ static inline void set_runout_valid(const bool valid) {
+ findaRunoutValid = valid;
+ #if ENABLED(FILAMENT_RUNOUT_SENSOR)
+ if (valid) runout.reset();
+ #endif
+ }
+
+};
+
+extern MMU2 mmu2;
diff --git a/Marlin/src/feature/prusa_MMU2/serial-protocol.md b/Marlin/src/feature/prusa_MMU2/serial-protocol.md
new file mode 100644
index 0000000000..936830e1dc
--- /dev/null
+++ b/Marlin/src/feature/prusa_MMU2/serial-protocol.md
@@ -0,0 +1,94 @@
+Startup sequence
+================
+
+When initialized, MMU sends
+
+- MMU => 'start\n'
+
+We follow with
+
+- MMU <= 'S1\n'
+- MMU => 'ok*Firmware version*\n'
+- MMU <= 'S2\n'
+- MMU => 'ok*Build number*\n'
+
+#if (12V_mode)
+
+- MMU <= 'M1\n'
+- MMU => 'ok\n'
+
+#endif
+
+- MMU <= 'P0\n'
+- MMU => '*FINDA status*\n'
+
+Now we are sure MMU is available and ready. If there was a timeout or other communication problem somewhere, printer will be killed.
+
+- *Firmware version* is an integer value, but we don't care about it
+- *Build number* is an integer value and has to be >=126, or =>132 if 12V mode is enabled
+- *FINDA status* is 1 if the is filament loaded to the extruder, 0 otherwise
+
+
+*Build number* is checked against the required value, if it does not match, printer is halted.
+
+
+
+Toolchange
+==========
+
+- MMU <= 'T*Filament index*\n'
+
+MMU sends
+
+- MMU => 'ok\n'
+
+as soon as the filament is fed down to the extruder. We follow with
+
+- MMU <= 'C0\n'
+
+MMU will feed a few more millimeters of filament for the extruder gears to grab.
+When done, the MMU sends
+
+- MMU => 'ok\n'
+
+We don't wait for a response here but immediately continue with the next gcode which should
+be one or more extruder moves to feed the filament into the hotend.
+
+
+FINDA status
+============
+
+- MMU <= 'P0\n'
+- MMU => '*FINDA status*\n'
+
+*FINDA status* is 1 if the is filament loaded to the extruder, 0 otherwise. This could be used as filament runout sensor if probed regularly.
+
+
+
+Load filament
+=============
+
+- MMU <= 'L*Filament index*\n'
+
+MMU will feed filament down to the extruder, when done
+
+- MMU => 'ok\n'
+
+
+Unload filament
+=============
+
+- MMU <= 'U0\n'
+
+MMU will retract current filament from the extruder, when done
+
+- MMU => 'ok\n'
+
+
+
+Eject filament
+==============
+
+- MMU <= 'E*Filament index*\n'
+- MMU => 'ok\n'
+
diff --git a/Marlin/src/feature/runout.cpp b/Marlin/src/feature/runout.cpp
index 3dcb82673c..8587a4c925 100644
--- a/Marlin/src/feature/runout.cpp
+++ b/Marlin/src/feature/runout.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -33,7 +33,11 @@
FilamentMonitor runout;
bool FilamentMonitorBase::enabled = true,
- FilamentMonitorBase::filament_ran_out; // = false
+ FilamentMonitorBase::filament_ran_out; // = false
+
+#if ENABLED(HOST_ACTION_COMMANDS)
+ bool FilamentMonitorBase::host_handling; // = false
+#endif
/**
* Called by FilamentSensorSwitch::run when filament is detected.
diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h
index 463f99d40b..ce9188e03a 100644
--- a/Marlin/src/feature/runout.h
+++ b/Marlin/src/feature/runout.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -36,14 +36,21 @@
#include "../lcd/extensible_ui/ui_api.h"
#endif
+#if ENABLED(ADVANCED_PAUSE_FEATURE)
+ #include "pause.h"
+#endif
+
//#define FILAMENT_RUNOUT_SENSOR_DEBUG
class FilamentMonitorBase {
public:
- static bool enabled;
+ static bool enabled, filament_ran_out;
- protected:
- static bool filament_ran_out;
+ #if ENABLED(HOST_ACTION_COMMANDS)
+ static bool host_handling;
+ #else
+ constexpr static bool host_handling = false;
+ #endif
};
template
@@ -82,7 +89,7 @@ class TFilamentMonitor : public FilamentMonitorBase {
// Give the response a chance to update its counter.
static inline void run() {
- if (enabled && !filament_ran_out && (IS_SD_PRINTING() || print_job_timer.isRunning())) {
+ if (enabled && !filament_ran_out && (IS_SD_PRINTING() || print_job_timer.isRunning() || did_pause_print)) {
#if FILAMENT_RUNOUT_DISTANCE_MM > 0
cli(); // Prevent RunoutResponseDelayed::block_completed from accumulating here
#endif
@@ -94,10 +101,7 @@ class TFilamentMonitor : public FilamentMonitorBase {
#endif
if (ran_out) {
filament_ran_out = true;
- #if ENABLED(EXTENSIBLE_UI)
- ExtUI::onFilamentRunout();
- #endif
- enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
+ event_filament_runout();
planner.synchronize();
}
}
@@ -231,7 +235,7 @@ class FilamentSensorBase {
return runout_states; // A single sensor applying to all extruders
#else
#if ENABLED(DUAL_X_CARRIAGE)
- if (dual_x_carriage_mode == DXC_DUPLICATION_MODE || dual_x_carriage_mode == DXC_SCALED_DUPLICATION_MODE)
+ if (dual_x_carriage_mode == DXC_DUPLICATION_MODE || dual_x_carriage_mode == DXC_MIRRORED_MODE)
return runout_states; // Any extruder
else
#elif ENABLED(DUAL_NOZZLE_DUPLICATION_MODE)
@@ -305,7 +309,11 @@ class FilamentSensorBase {
}
static inline void block_completed(const block_t* const b) {
- if (b->steps[X_AXIS] || b->steps[Y_AXIS] || b->steps[Z_AXIS]) {
+ if (b->steps[X_AXIS] || b->steps[Y_AXIS] || b->steps[Z_AXIS]
+ #if ENABLED(ADVANCED_PAUSE_FEATURE)
+ || did_pause_print // Allow pause purge move to re-trigger runout state
+ #endif
+ ) {
// Only trigger on extrusion with XYZ movement to allow filament change and retract/recover.
const uint8_t e = b->extruder;
const int32_t steps = b->steps[E_AXIS];
diff --git a/Marlin/src/feature/snmm.cpp b/Marlin/src/feature/snmm.cpp
index e8c04f2197..88fb2efa30 100644
--- a/Marlin/src/feature/snmm.cpp
+++ b/Marlin/src/feature/snmm.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/snmm.h b/Marlin/src/feature/snmm.h
index ad8782d16a..c1972723e9 100644
--- a/Marlin/src/feature/snmm.h
+++ b/Marlin/src/feature/snmm.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
diff --git a/Marlin/src/feature/solenoid.cpp b/Marlin/src/feature/solenoid.cpp
index 4b9b5d48ca..547a3b0df5 100644
--- a/Marlin/src/feature/solenoid.cpp
+++ b/Marlin/src/feature/solenoid.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -28,60 +28,70 @@
#include "../module/motion.h" // for active_extruder
-void enable_solenoid(const uint8_t num) {
+#if ENABLED(MANUAL_SOLENOID_CONTROL)
+ #define HAS_SOLENOID(N) HAS_SOLENOID_##N
+#else
+ #define HAS_SOLENOID(N) (HAS_SOLENOID_##N && EXTRUDERS > N)
+#endif
+
+// Used primarily with MANUAL_SOLENOID_CONTROL
+static void set_solenoid(const uint8_t num, const bool active) {
+ const uint8_t value = active ? HIGH : LOW;
switch (num) {
case 0:
- OUT_WRITE(SOL0_PIN, HIGH);
+ OUT_WRITE(SOL0_PIN, value);
break;
- #if HAS_SOLENOID_1 && EXTRUDERS > 1
- case 1:
- OUT_WRITE(SOL1_PIN, HIGH);
- break;
- #endif
- #if HAS_SOLENOID_2 && EXTRUDERS > 2
- case 2:
- OUT_WRITE(SOL2_PIN, HIGH);
- break;
- #endif
- #if HAS_SOLENOID_3 && EXTRUDERS > 3
- case 3:
- OUT_WRITE(SOL3_PIN, HIGH);
- break;
- #endif
- #if HAS_SOLENOID_4 && EXTRUDERS > 4
- case 4:
- OUT_WRITE(SOL4_PIN, HIGH);
- break;
- #endif
- #if HAS_SOLENOID_5 && EXTRUDERS > 5
- case 5:
- OUT_WRITE(SOL5_PIN, HIGH);
- break;
- #endif
+ #if HAS_SOLENOID(1)
+ case 1:
+ OUT_WRITE(SOL1_PIN, value);
+ break;
+ #endif
+ #if HAS_SOLENOID(2)
+ case 2:
+ OUT_WRITE(SOL2_PIN, value);
+ break;
+ #endif
+ #if HAS_SOLENOID(3)
+ case 3:
+ OUT_WRITE(SOL3_PIN, value);
+ break;
+ #endif
+ #if HAS_SOLENOID(4)
+ case 4:
+ OUT_WRITE(SOL4_PIN, value);
+ break;
+ #endif
+ #if HAS_SOLENOID(5)
+ case 5:
+ OUT_WRITE(SOL5_PIN, value);
+ break;
+ #endif
default:
SERIAL_ECHO_MSG(MSG_INVALID_SOLENOID);
break;
}
}
+void enable_solenoid(const uint8_t num) { set_solenoid(num, true); }
+void disable_solenoid(const uint8_t num) { set_solenoid(num, false); }
void enable_solenoid_on_active_extruder() { enable_solenoid(active_extruder); }
void disable_all_solenoids() {
- OUT_WRITE(SOL0_PIN, LOW);
- #if HAS_SOLENOID_1 && EXTRUDERS > 1
- OUT_WRITE(SOL1_PIN, LOW);
+ disable_solenoid(0);
+ #if HAS_SOLENOID(1)
+ disable_solenoid(1);
#endif
- #if HAS_SOLENOID_2 && EXTRUDERS > 2
- OUT_WRITE(SOL2_PIN, LOW);
+ #if HAS_SOLENOID(2)
+ disable_solenoid(2);
#endif
- #if HAS_SOLENOID_3 && EXTRUDERS > 3
- OUT_WRITE(SOL3_PIN, LOW);
+ #if HAS_SOLENOID(3)
+ disable_solenoid(3);
#endif
- #if HAS_SOLENOID_4 && EXTRUDERS > 4
- OUT_WRITE(SOL4_PIN, LOW);
+ #if HAS_SOLENOID(4)
+ disable_solenoid(4);
#endif
- #if HAS_SOLENOID_5 && EXTRUDERS > 5
- OUT_WRITE(SOL5_PIN, LOW);
+ #if HAS_SOLENOID(5)
+ disable_solenoid(5);
#endif
}
diff --git a/Marlin/src/feature/solenoid.h b/Marlin/src/feature/solenoid.h
index 6652b19daa..4f867db300 100644
--- a/Marlin/src/feature/solenoid.h
+++ b/Marlin/src/feature/solenoid.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -24,3 +24,4 @@
void enable_solenoid_on_active_extruder();
void disable_all_solenoids();
void enable_solenoid(const uint8_t num);
+void disable_solenoid(const uint8_t num);
diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp
index 681b93b6af..f344e95cfe 100644
--- a/Marlin/src/feature/tmc_util.cpp
+++ b/Marlin/src/feature/tmc_util.cpp
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -40,6 +40,10 @@
#endif
#endif
+#if HAS_LCD_MENU
+ #include "../module/stepper.h"
+#endif
+
/**
* Check for over temperature or short to ground error flags.
* Report and log warning of overtemperature condition.
@@ -57,7 +61,7 @@
is_s2gb,
is_error;
};
- #if HAS_DRIVER(TMC2130)
+ #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2160) || HAS_DRIVER(TMC5130) || HAS_DRIVER(TMC5160)
#if ENABLED(TMC_DEBUG)
static uint32_t get_pwm_scale(TMC2130Stepper &st) { return st.PWM_SCALE(); }
static uint8_t get_status_response(TMC2130Stepper &st, uint32_t) { return st.status_response & 0xF; }
@@ -216,7 +220,7 @@
#endif
}
- #define HAS_HW_COMMS(ST) AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2660) || (AXIS_DRIVER_TYPE(ST, TMC2208) && defined(ST##_HARDWARE_SERIAL))
+ #define HAS_HW_COMMS(ST) AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2160) || AXIS_DRIVER_TYPE(ST, TMC2660) || AXIS_DRIVER_TYPE(ST, TMC5130) || AXIS_DRIVER_TYPE(ST, TMC5160) || (AXIS_DRIVER_TYPE(ST, TMC2208) && defined(ST##_HARDWARE_SERIAL))
void monitor_tmc_driver() {
static millis_t next_poll = 0;
@@ -291,6 +295,7 @@
TMC_MAX_CURRENT,
TMC_IRUN,
TMC_IHOLD,
+ TMC_GLOBAL_SCALER,
TMC_CS_ACTUAL,
TMC_PWM_SCALE,
TMC_VSENSE,
@@ -355,7 +360,7 @@
template
static void print_vsense(TMC &st) { serialprintPGM(st.vsense() ? PSTR("1=.18") : PSTR("0=.325")); }
- #if HAS_DRIVER(TMC2130)
+ #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2160) || HAS_DRIVER(TMC5130) || HAS_DRIVER(TMC5160)
static void tmc_status(TMC2130Stepper &st, const TMC_debug_enum i) {
switch (i) {
case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break;
@@ -375,6 +380,27 @@
}
#endif
+ #if HAS_DRIVER(TMC2160) || HAS_DRIVER(TMC5160)
+ template void print_vsense(TMCMarlin &st) { UNUSED(st); }
+ template void print_vsense(TMCMarlin &st) { UNUSED(st); }
+
+ static void tmc_status(TMC2160Stepper &st, const TMC_debug_enum i) {
+ switch (i) {
+ case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break;
+ case TMC_SGT: SERIAL_PRINT(st.sgt(), DEC); break;
+ case TMC_STEALTHCHOP: serialprintPGM(st.en_pwm_mode() ? PSTR("true") : PSTR("false")); break;
+ case TMC_GLOBAL_SCALER:
+ {
+ uint16_t value = st.GLOBAL_SCALER();
+ SERIAL_PRINT(value ? value : 256, DEC);
+ SERIAL_ECHOPGM("/256");
+ }
+ break;
+ default: break;
+ }
+ }
+ #endif
+
#if HAS_DRIVER(TMC2208)
static void tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) {
switch (i) {
@@ -653,6 +679,9 @@
TMC_REPORT("MAX current", TMC_MAX_CURRENT);
TMC_REPORT("Run current", TMC_IRUN);
TMC_REPORT("Hold current", TMC_IHOLD);
+ #if HAS_DRIVER(TMC2160) || HAS_DRIVER(TMC5160)
+ TMC_REPORT("Global scaler", TMC_GLOBAL_SCALER);
+ #endif
TMC_REPORT("CS actual\t", TMC_CS_ACTUAL);
TMC_REPORT("PWM scale", TMC_PWM_SCALE);
TMC_REPORT("vsense\t", TMC_VSENSE);
@@ -673,7 +702,7 @@
TMC_REPORT("Stallguard thrs", TMC_SGT);
DRV_REPORT("DRVSTATUS", TMC_DRV_CODES);
- #if HAS_DRIVER(TMC2130)
+ #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2160) || HAS_DRIVER(TMC5130) || HAS_DRIVER(TMC5160)
DRV_REPORT("stallguard\t", TMC_STALLGUARD);
DRV_REPORT("sg_result\t", TMC_SG_RESULT);
DRV_REPORT("fsactive\t", TMC_FSACTIVE);
@@ -699,7 +728,7 @@
#define PRINT_TMC_REGISTER(REG_CASE) case TMC_GET_##REG_CASE: print_hex_long(st.REG_CASE(), ':'); break
- #if HAS_DRIVER(TMC2130)
+ #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2160) || HAS_DRIVER(TMC5130) || HAS_DRIVER(TMC5160)
static void tmc_get_ic_registers(TMC2130Stepper &st, const TMC_get_registers_enum i) {
switch (i) {
PRINT_TMC_REGISTER(TCOOLTHRS);
@@ -834,18 +863,14 @@
bool stealthchop_was_enabled = st.en_pwm_mode();
st.TCOOLTHRS(0xFFFFF);
- #if STEALTHCHOP_ENABLED
- st.en_pwm_mode(false);
- #endif
+ st.en_pwm_mode(false);
st.diag1_stall(true);
return stealthchop_was_enabled;
}
void tmc_disable_stallguard(TMC2130Stepper &st, const bool restore_stealth) {
st.TCOOLTHRS(0);
- #if STEALTHCHOP_ENABLED
- st.en_pwm_mode(restore_stealth);
- #endif
+ st.en_pwm_mode(restore_stealth);
st.diag1_stall(false);
}
bool tmc_enable_stallguard(TMC2660Stepper) {
@@ -980,4 +1005,49 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
if (axis_connection) ui.set_status_P(PSTR("TMC CONNECTION ERROR"));
}
+#if HAS_LCD_MENU
+
+ void init_tmc_section() {
+ #if AXIS_IS_TMC(X)
+ stepperX.init_lcd_variables(X_AXIS);
+ #endif
+ #if AXIS_IS_TMC(Y)
+ stepperY.init_lcd_variables(Y_AXIS);
+ #endif
+ #if AXIS_IS_TMC(Z)
+ stepperZ.init_lcd_variables(Z_AXIS);
+ #endif
+ #if AXIS_IS_TMC(X2)
+ stepperX2.init_lcd_variables(X_AXIS);
+ #endif
+ #if AXIS_IS_TMC(Y2)
+ stepperY2.init_lcd_variables(Y_AXIS);
+ #endif
+ #if AXIS_IS_TMC(Z2)
+ stepperZ2.init_lcd_variables(Z_AXIS);
+ #endif
+ #if AXIS_IS_TMC(Z3)
+ stepperZ3.init_lcd_variables(Z_AXIS);
+ #endif
+ #if AXIS_IS_TMC(E0)
+ stepperE0.init_lcd_variables(E_AXIS);
+ #endif
+ #if AXIS_IS_TMC(E1)
+ stepperE1.init_lcd_variables(E_AXIS_N(1));
+ #endif
+ #if AXIS_IS_TMC(E2)
+ stepperE2.init_lcd_variables(E_AXIS_N(2));
+ #endif
+ #if AXIS_IS_TMC(E3)
+ stepperE3.init_lcd_variables(E_AXIS_N(3));
+ #endif
+ #if AXIS_IS_TMC(E4)
+ stepperE4.init_lcd_variables(E_AXIS_N(4));
+ #endif
+ #if AXIS_IS_TMC(E5)
+ stepperE5.init_lcd_variables(E_AXIS_N(5));
+ #endif
+ }
+#endif
+
#endif // HAS_TRINAMIC
diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h
index 3acfdc9cbc..44ed033e72 100644
--- a/Marlin/src/feature/tmc_util.h
+++ b/Marlin/src/feature/tmc_util.h
@@ -1,6 +1,6 @@
/**
* Marlin 3D Printer Firmware
- * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
@@ -26,6 +26,9 @@
#if HAS_TRINAMIC
#include
#endif
+#if HAS_LCD_MENU
+ #include "../module/planner.h"
+#endif
#define TMC_X_LABEL 'X', '0'
#define TMC_Y_LABEL 'Y', '0'
@@ -50,29 +53,45 @@
#define CHOPPER_PRUSAMK3_24V { 4, 1, 4 }
#define CHOPPER_MARLIN_119 { 5, 2, 3 }
+constexpr uint16_t _tmc_thrs(const uint16_t msteps, const int32_t thrs, const uint32_t spmm) {
+ return 12650000UL * msteps / (256 * thrs * spmm);
+}
+
template
class TMCStorage {
protected:
// Only a child class has access to constructor => Don't create on its own! "Poor man's abstract class"
TMCStorage() {}
+ public:
uint16_t val_mA = 0;
- public:
#if ENABLED(MONITOR_DRIVER_STATUS)
uint8_t otpw_count = 0,
error_count = 0;
bool flag_otpw = false;
- bool getOTPW() { return flag_otpw; }
- void clear_otpw() { flag_otpw = 0; }
+ inline bool getOTPW() { return flag_otpw; }
+ inline void clear_otpw() { flag_otpw = 0; }
#endif
- uint16_t getMilliamps() { return val_mA; }
+ inline uint16_t getMilliamps() { return val_mA; }
- void printLabel() {
+ inline void printLabel() {
SERIAL_CHAR(AXIS_LETTER);
if (DRIVER_ID > '0') SERIAL_CHAR(DRIVER_ID);
}
+
+ struct {
+ #if HAS_STEALTHCHOP
+ bool stealthChop_enabled = false;
+ #endif
+ #if ENABLED(HYBRID_THRESHOLD)
+ uint8_t hybrid_thrs = 0;
+ #endif
+ #if ENABLED(SENSORLESS_HOMING)
+ int8_t homing_thrs = 0;
+ #endif
+ } stored;
};
template
@@ -84,15 +103,41 @@ class TMCMarlin : public TMC, public TMCStorage {
TMCMarlin(uint16_t CS, float RS, uint16_t pinMOSI, uint16_t pinMISO, uint16_t pinSCK) :
TMC(CS, RS, pinMOSI, pinMISO, pinSCK)
{}
- uint16_t rms_current() { return TMC::rms_current(); }
- void rms_current(uint16_t mA) {
+ inline uint16_t rms_current() { return TMC::rms_current(); }
+ inline void rms_current(uint16_t mA) {
this->val_mA = mA;
TMC::rms_current(mA);
}
- void rms_current(uint16_t mA, float mult) {
+ inline void rms_current(uint16_t mA, float mult) {
this->val_mA = mA;
TMC::rms_current(mA, mult);
}
+
+ #if HAS_STEALTHCHOP
+ inline void refresh_stepping_mode() { this->en_pwm_mode(this->stored.stealthChop_enabled); }
+ inline bool get_stealthChop_status() { return this->en_pwm_mode(); }
+ #endif
+
+ #if HAS_LCD_MENU
+
+ inline void init_lcd_variables(const AxisEnum spmm_id) {
+ #if ENABLED(HYBRID_THRESHOLD)
+ this->stored.hybrid_thrs = _tmc_thrs(this->microsteps(), this->TPWMTHRS(), planner.settings.axis_steps_per_mm[spmm_id]);
+ #endif
+ #if ENABLED(SENSORLESS_HOMING)
+ this->stored.homing_thrs = this->sgt();
+ #endif
+ }
+
+ inline void refresh_stepper_current() { rms_current(this->val_mA); }
+
+ #if ENABLED(HYBRID_THRESHOLD)
+ inline void refresh_hybrid_thrs(float spmm) { this->TPWMTHRS(_tmc_thrs(this->microsteps(), this->stored.hybrid_thrs, spmm)); }
+ #endif
+ #if ENABLED(SENSORLESS_HOMING)
+ inline void refresh_homing_thrs() { this->sgt(this->stored.homing_thrs); }
+ #endif
+ #endif
};
template
class TMCMarlin : public TMC2208Stepper, public TMCStorage {
@@ -104,19 +149,64 @@ class TMCMarlin