最終更新 1 month ago

Ender 3 Pro - SKR v1.4 Pro with BLTouch - Marlin 2.0.0

racerxdl's Avatar Lucas Teske revised this gist 4 years ago. Go to revision

1 file changed, 99 insertions

_Bootscreen.h(file created)

@@ -0,0 +1,99 @@
1 + /**
2 + * Marlin 3D Printer Firmware
3 + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 + *
5 + * Based on Sprinter and grbl.
6 + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 + *
8 + * This program is free software: you can redistribute it and/or modify
9 + * it under the terms of the GNU General Public License as published by
10 + * the Free Software Foundation, either version 3 of the License, or
11 + * (at your option) any later version.
12 + *
13 + * This program is distributed in the hope that it will be useful,
14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 + * GNU General Public License for more details.
17 + *
18 + * You should have received a copy of the GNU General Public License
19 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 + *
21 + */
22 + #pragma once
23 +
24 + #define CONFIG_EXAMPLES_DIR "Creality/Ender-3 Pro"
25 +
26 + /**
27 + * Custom Boot Screen bitmap
28 + *
29 + * Place this file in the root with your configuration files
30 + * and enable SHOW_CUSTOM_BOOTSCREEN in Configuration.h.
31 + *
32 + * Use the Marlin Bitmap Converter to make your own:
33 + * https://marlinfw.org/tools/u8glib/converter.html
34 + */
35 +
36 + #define CUSTOM_BOOTSCREEN_TIMEOUT 1000
37 + #define CUSTOM_BOOTSCREEN_BMPWIDTH 81
38 + #define CUSTOM_BOOTSCREEN_INVERTED
39 +
40 + const unsigned char custom_start_bmp[] PROGMEM = {
41 + B11111111,B11111111,B11111111,B11111111,B11101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
42 + B11111111,B11111111,B11111111,B11111111,B11101111,B11101111,B11111111,B11111111,B11111111,B11111111,B11111111,
43 + B11111111,B11111111,B11111111,B11111111,B11100111,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
44 + B11111111,B11111111,B11111111,B11111111,B11100111,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
45 + B11111111,B11111111,B11111111,B11111111,B11100011,B11011111,B11111111,B11111111,B11111111,B11111111,B11111111,
46 + B11111111,B11111111,B11111111,B11111111,B11110011,B11001111,B11111111,B11111111,B11111111,B11111111,B11111111,
47 + B11111111,B11111111,B11111111,B11100001,B11100001,B11001111,B11111111,B11111111,B11111111,B11111111,B11111111,
48 + B11111111,B11111110,B01111000,B00000000,B00000000,B00000011,B11011101,B11111111,B11111111,B11111111,B11111111,
49 + B11111110,B11111111,B10000000,B01111110,B00000000,B00000001,B11101110,B11111111,B11111111,B11111111,B11111111,
50 + B11111110,B01111101,B11001111,B11111100,B00000000,B00000000,B11110111,B01111111,B11111111,B11111111,B11111111,
51 + B11111111,B10001110,B00000110,B00000000,B00000000,B00000000,B01111011,B10111111,B11111111,B11111111,B11111111,
52 + B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111101,B11011111,B11111111,B11111111,B11111111,
53 + B11111111,B11111100,B00000001,B11111110,B00000000,B00000000,B00111110,B11100111,B11111111,B11111111,B11111111,
54 + B11111111,B11111111,B11111111,B11111100,B00000000,B00000011,B00011111,B01110011,B11111111,B11111111,B11111111,
55 + B11111111,B11111111,B11111111,B11111000,B00000000,B00000001,B10001111,B10000001,B11111111,B11111111,B11111111,
56 + B11111111,B11111111,B11111111,B11100000,B00000000,B00000000,B10000011,B11111001,B11111111,B11111111,B11111111,
57 + B11111111,B11111111,B11111111,B00000000,B11111100,B00000000,B00000000,B11110000,B11111111,B11111111,B11111111,
58 + B11111111,B11111111,B11100000,B00001111,B11111111,B11000000,B00000000,B00000000,B11111111,B11111111,B11111111,
59 + B11111111,B11111110,B00000011,B11111111,B11111111,B11000000,B00000000,B00000000,B11111111,B11111111,B11111111,
60 + B11111111,B11111111,B11111111,B11111111,B11111001,B00000000,B00000000,B00000000,B11111111,B11111111,B11111111,
61 + B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00000111,B11000000,B11111111,B11111111,B11111111,
62 + B11111111,B11111111,B11111111,B11111111,B11111111,B00000000,B00000111,B11100000,B11111111,B11111111,B11111111,
63 + B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,B00000111,B11110001,B11111111,B11111111,B11111111,
64 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000111,B11111001,B11111111,B11111111,B11111111,
65 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B00000011,B11111001,B11111111,B11111111,B11111111,
66 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000011,B11111001,B11111111,B11111111,B11111111,
67 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11000011,B11111111,B11111111,B11111111,B11111111,
68 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11100001,B11111111,B11111111,B11111111,B11111111,
69 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,B10111111,B11111111,B11111111,B11111111,
70 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111011,B11111000,B00111111,B11111111,B11111111,B11111111,
71 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B11111000,B00111111,B11111111,B11111111,B11111111,
72 + B11111111,B11111111,B11111111,B11111111,B11111111,B01111110,B11110000,B11111111,B11111111,B11111111,B11111111,
73 + B11111111,B11111111,B11111111,B11111111,B11111111,B10001110,B00000011,B11111111,B11111111,B11111111,B11111111,
74 + B11111111,B11111111,B11111111,B11111111,B11111111,B11100000,B00011111,B11111111,B11111111,B11111111,B11111111,
75 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
76 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
77 + B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01111111,B11111111,B11111111,B11111111,
78 + B11111111,B00000000,B00000000,B01111111,B11111111,B11111111,B11111000,B01111111,B11111111,B11111111,B11111111,
79 + B11111111,B10000000,B00000000,B01111111,B11111111,B11111111,B11100000,B01111111,B11111111,B11111111,B11111111,
80 + B11111111,B11000011,B11111100,B11111111,B11111111,B11111111,B11111000,B11111111,B11111111,B11111111,B11111111,
81 + B11111111,B11000011,B11111100,B11111111,B11111111,B11111111,B11111000,B11111111,B11111111,B11111111,B11111111,
82 + B11111111,B10000111,B11111101,B11111111,B11111111,B11111111,B11110001,B11111111,B11111111,B11111111,B11111111,
83 + B11111111,B10000111,B11111111,B11111111,B11111111,B11111111,B11110001,B11111111,B11111111,B11111111,B11111111,
84 + B11111111,B00001111,B11100111,B11110011,B00001111,B11111100,B00100011,B11111100,B00111111,B11111111,B11111111,
85 + B11111111,B00001111,B11101111,B10000000,B00000111,B11110000,B00000011,B11110000,B00011110,B00000000,B01111111,
86 + B11111110,B00011111,B11001111,B10000001,B10000111,B11000111,B10000111,B11000111,B00001100,B00000000,B01111111,
87 + B11111110,B00000000,B00011111,B11000111,B11000111,B10001111,B11000111,B10011111,B00001111,B00001100,B11111111,
88 + B11111110,B00000000,B00011111,B10000111,B10001111,B00011111,B10001111,B00011111,B00001111,B00011111,B11111111,
89 + B11111100,B00111111,B10011111,B10001111,B10001111,B00011111,B10001110,B00000000,B00011110,B00111111,B11111111,
90 + B11111100,B01111111,B00111111,B00001111,B00011110,B00111111,B00011110,B00111111,B11111110,B00111111,B11111111,
91 + B11111000,B01111111,B11111111,B00011111,B00011100,B00111111,B00011100,B01111111,B11111100,B01111111,B11111111,
92 + B11111000,B11111111,B11111111,B00011110,B00011100,B01111110,B00011100,B01111111,B11111100,B01111111,B11111111,
93 + B11110000,B11111111,B11001110,B00111110,B00111100,B01111110,B00111100,B01111111,B10111000,B11111111,B11111111,
94 + B11110000,B11111111,B10011110,B00111100,B00111000,B01111100,B00111000,B01111110,B01111000,B11111111,B11111111,
95 + B11100001,B11111111,B00111100,B01111100,B01111000,B01111100,B01111000,B00111100,B11110001,B11111111,B11111111,
96 + B11100001,B11111000,B00111000,B01111000,B01111000,B00010000,B00011000,B00000001,B11110001,B11111111,B11111111,
97 + B00000000,B00000000,B01100000,B00100000,B00111100,B00000000,B01111100,B00000111,B10000000,B01111111,B11111111,
98 + B11111111,B11111111,B11111111,B11111111,B11111110,B00011111,B11111110,B00011111,B11111111,B11111111,B11111111
99 + };

racerxdl's Avatar Lucas Teske revised this gist 5 years ago. Go to revision

2 files changed, 6010 insertions

Configuration.h(file created)

@@ -0,0 +1,2421 @@
1 + /**
2 + * Marlin 3D Printer Firmware
3 + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 + *
5 + * Based on Sprinter and grbl.
6 + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 + *
8 + * This program is free software: you can redistribute it and/or modify
9 + * it under the terms of the GNU General Public License as published by
10 + * the Free Software Foundation, either version 3 of the License, or
11 + * (at your option) any later version.
12 + *
13 + * This program is distributed in the hope that it will be useful,
14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 + * GNU General Public License for more details.
17 + *
18 + * You should have received a copy of the GNU General Public License
19 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 + *
21 + */
22 + #pragma once
23 +
24 + /**
25 + * Configuration.h
26 + *
27 + * Basic settings such as:
28 + *
29 + * - Type of electronics
30 + * - Type of temperature sensor
31 + * - Printer geometry
32 + * - Endstop configuration
33 + * - LCD controller
34 + * - Extra features
35 + *
36 + * Advanced settings can be found in Configuration_adv.h
37 + */
38 + #define CONFIGURATION_H_VERSION 020007
39 +
40 + //===========================================================================
41 + //============================= Getting Started =============================
42 + //===========================================================================
43 +
44 + /**
45 + * Here are some standard links for getting your machine calibrated:
46 + *
47 + * https://reprap.org/wiki/Calibration
48 + * https://youtu.be/wAL9d7FgInk
49 + * http://calculator.josefprusa.cz
50 + * https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
51 + * https://www.thingiverse.com/thing:5573
52 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
53 + * https://www.thingiverse.com/thing:298812
54 + */
55 +
56 + //===========================================================================
57 + //============================= DELTA Printer ===============================
58 + //===========================================================================
59 + // For a Delta printer start with one of the configuration files in the
60 + // config/examples/delta directory and customize for your machine.
61 + //
62 +
63 + //===========================================================================
64 + //============================= SCARA Printer ===============================
65 + //===========================================================================
66 + // For a SCARA printer start with the configuration files in
67 + // config/examples/SCARA and customize for your machine.
68 + //
69 +
70 + // @section info
71 +
72 + // Author info of this build printed to the host during boot and M115
73 + #define STRING_CONFIG_H_AUTHOR "(Teske, Ender-3)" // Who made the changes.
74 + //#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
75 +
76 + /**
77 + * *** VENDORS PLEASE READ ***
78 + *
79 + * Marlin allows you to add a custom boot image for Graphical LCDs.
80 + * With this option Marlin will first show your custom screen followed
81 + * by the standard Marlin logo with version number and web URL.
82 + *
83 + * We encourage you to take advantage of this new feature and we also
84 + * respectfully request that you retain the unmodified Marlin boot screen.
85 + */
86 +
87 + // Show the Marlin bootscreen on startup. ** ENABLE FOR PRODUCTION **
88 + #define SHOW_BOOTSCREEN
89 +
90 + // Show the bitmap in Marlin/_Bootscreen.h on startup.
91 + #define SHOW_CUSTOM_BOOTSCREEN
92 +
93 + // Show the bitmap in Marlin/_Statusscreen.h on the status screen.
94 + #define CUSTOM_STATUS_SCREEN_IMAGE
95 +
96 + // @section machine
97 +
98 + /**
99 + * Select the serial port on the board to use for communication with the host.
100 + * This allows the connection of wireless adapters (for instance) to non-default port pins.
101 + * Serial port -1 is the USB emulated serial port, if available.
102 + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
103 + *
104 + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
105 + */
106 + #define SERIAL_PORT -1
107 +
108 + /**
109 + * Select a secondary serial port on the board to use for communication with the host.
110 + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
111 + */
112 + #define SERIAL_PORT_2 0
113 +
114 + /**
115 + * This setting determines the communication speed of the printer.
116 + *
117 + * 250000 works in most cases, but you might try a lower speed if
118 + * you commonly experience drop-outs during host printing.
119 + * You may try up to 1000000 to speed up SD file transfer.
120 + *
121 + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
122 + */
123 + #define BAUDRATE 250000
124 +
125 + // Enable the Bluetooth serial interface on AT90USB devices
126 + //#define BLUETOOTH
127 +
128 + // Choose the name from boards.h that matches your setup
129 + #ifndef MOTHERBOARD
130 + #define MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO
131 + #endif
132 +
133 + // Name displayed in the LCD "Ready" message and Info menu
134 + #define CUSTOM_MACHINE_NAME "Ender 3 Pro"
135 +
136 + // Printer's unique ID, used by some programs to differentiate between machines.
137 + // Choose your own or use a service like https://www.uuidgenerator.net/version4
138 + #define MACHINE_UUID "bb28d143-55e3-426c-9501-dd3fae46cccc"
139 +
140 + // @section extruder
141 +
142 + // This defines the number of extruders
143 + // :[0, 1, 2, 3, 4, 5, 6, 7, 8]
144 + #define EXTRUDERS 1
145 +
146 + // Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
147 + #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
148 +
149 + // For Cyclops or any "multi-extruder" that shares a single nozzle.
150 + //#define SINGLENOZZLE
151 +
152 + // Save and restore temperature and fan speed on tool-change.
153 + // Set standby for the unselected tool with M104/106/109 T...
154 + #if ENABLED(SINGLENOZZLE)
155 + //#define SINGLENOZZLE_STANDBY_TEMP
156 + //#define SINGLENOZZLE_STANDBY_FAN
157 + #endif
158 +
159 + /**
160 + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.
161 + *
162 + * This device allows one stepper driver on a control board to drive
163 + * two to eight stepper motors, one at a time, in a manner suitable
164 + * for extruders.
165 + *
166 + * This option only allows the multiplexer to switch on tool-change.
167 + * Additional options to configure custom E moves are pending.
168 + */
169 + //#define MK2_MULTIPLEXER
170 + #if ENABLED(MK2_MULTIPLEXER)
171 + // Override the default DIO selector pins here, if needed.
172 + // Some pins files may provide defaults for these pins.
173 + //#define E_MUX0_PIN 40 // Always Required
174 + //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs
175 + //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs
176 + #endif
177 +
178 + /**
179 + * Průša Multi-Material Unit v2
180 + *
181 + * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails.
182 + * Requires EXTRUDERS = 5
183 + *
184 + * For additional configuration see Configuration_adv.h
185 + */
186 + //#define PRUSA_MMU2
187 +
188 + // A dual extruder that uses a single stepper motor
189 + //#define SWITCHING_EXTRUDER
190 + #if ENABLED(SWITCHING_EXTRUDER)
191 + #define SWITCHING_EXTRUDER_SERVO_NR 0
192 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3]
193 + #if EXTRUDERS > 3
194 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1
195 + #endif
196 + #endif
197 +
198 + // A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles
199 + //#define SWITCHING_NOZZLE
200 + #if ENABLED(SWITCHING_NOZZLE)
201 + #define SWITCHING_NOZZLE_SERVO_NR 0
202 + //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second
203 + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo)
204 + #endif
205 +
206 + /**
207 + * Two separate X-carriages with extruders that connect to a moving part
208 + * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN.
209 + */
210 + //#define PARKING_EXTRUDER
211 +
212 + /**
213 + * Two separate X-carriages with extruders that connect to a moving part
214 + * via a magnetic docking mechanism using movements and no solenoid
215 + *
216 + * project : https://www.thingiverse.com/thing:3080893
217 + * movements : https://youtu.be/0xCEiG9VS3k
218 + * https://youtu.be/Bqbcs0CU2FE
219 + */
220 + //#define MAGNETIC_PARKING_EXTRUDER
221 +
222 + #if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER)
223 +
224 + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders
225 + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder
226 + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
227 +
228 + #if ENABLED(PARKING_EXTRUDER)
229 +
230 + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage
231 + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil
232 + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined.
233 + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381
234 +
235 + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER)
236 +
237 + #define MPE_FAST_SPEED 9000 // (mm/min) Speed for travel before last distance point
238 + #define MPE_SLOW_SPEED 4500 // (mm/min) Speed for last distance travel to park and couple
239 + #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point
240 + #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling
241 +
242 + #endif
243 +
244 + #endif
245 +
246 + /**
247 + * Switching Toolhead
248 + *
249 + * Support for swappable and dockable toolheads, such as
250 + * the E3D Tool Changer. Toolheads are locked with a servo.
251 + */
252 + //#define SWITCHING_TOOLHEAD
253 +
254 + /**
255 + * Magnetic Switching Toolhead
256 + *
257 + * Support swappable and dockable toolheads with a magnetic
258 + * docking mechanism using movement and no servo.
259 + */
260 + //#define MAGNETIC_SWITCHING_TOOLHEAD
261 +
262 + /**
263 + * Electromagnetic Switching Toolhead
264 + *
265 + * Parking for CoreXY / HBot kinematics.
266 + * Toolheads are parked at one edge and held with an electromagnet.
267 + * Supports more than 2 Toolheads. See https://youtu.be/JolbsAKTKf4
268 + */
269 + //#define ELECTROMAGNETIC_SWITCHING_TOOLHEAD
270 +
271 + #if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
272 + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock
273 + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis
274 + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis
275 + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders
276 + #if ENABLED(SWITCHING_TOOLHEAD)
277 + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector
278 + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock
279 + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD)
280 + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis
281 + #define SWITCHING_TOOLHEAD_X_SECURITY { 90, 150 } // (mm) Security distance X axis (T0,T1)
282 + //#define PRIME_BEFORE_REMOVE // Prime the nozzle before release from the dock
283 + #if ENABLED(PRIME_BEFORE_REMOVE)
284 + #define SWITCHING_TOOLHEAD_PRIME_MM 20 // (mm) Extruder prime length
285 + #define SWITCHING_TOOLHEAD_RETRACT_MM 10 // (mm) Retract after priming length
286 + #define SWITCHING_TOOLHEAD_PRIME_FEEDRATE 300 // (mm/min) Extruder prime feedrate
287 + #define SWITCHING_TOOLHEAD_RETRACT_FEEDRATE 2400 // (mm/min) Extruder retract feedrate
288 + #endif
289 + #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
290 + #define SWITCHING_TOOLHEAD_Z_HOP 2 // (mm) Z raise for switching
291 + #endif
292 + #endif
293 +
294 + /**
295 + * "Mixing Extruder"
296 + * - Adds G-codes M163 and M164 to set and "commit" the current mix factors.
297 + * - Extends the stepping routines to move multiple steppers in proportion to the mix.
298 + * - Optional support for Repetier Firmware's 'M164 S<index>' supporting virtual tools.
299 + * - This implementation supports up to two mixing extruders.
300 + * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation).
301 + */
302 + //#define MIXING_EXTRUDER
303 + #if ENABLED(MIXING_EXTRUDER)
304 + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder
305 + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164
306 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands
307 + //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD
308 + #if ENABLED(GRADIENT_MIX)
309 + //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias
310 + #endif
311 + #endif
312 +
313 + // Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
314 + // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
315 + // For the other hotends it is their distance from the extruder 0 hotend.
316 + //#define HOTEND_OFFSET_X { 0.0, 20.00 } // (mm) relative X-offset for each nozzle
317 + //#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
318 + //#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
319 +
320 + // @section machine
321 +
322 + /**
323 + * Power Supply Control
324 + *
325 + * Enable and connect the power supply to the PS_ON_PIN.
326 + * Specify whether the power supply is active HIGH or active LOW.
327 + */
328 + //#define PSU_CONTROL
329 + //#define PSU_NAME "Power Supply"
330 +
331 + #if ENABLED(PSU_CONTROL)
332 + #define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box
333 +
334 + //#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
335 + //#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
336 +
337 + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
338 + #if ENABLED(AUTO_POWER_CONTROL)
339 + #define AUTO_POWER_FANS // Turn on PSU if fans need power
340 + #define AUTO_POWER_E_FANS
341 + #define AUTO_POWER_CONTROLLERFAN
342 + #define AUTO_POWER_CHAMBER_FAN
343 + //#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU over this temperature
344 + //#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU over this temperature
345 + #define POWER_TIMEOUT 30
346 + #endif
347 + #endif
348 +
349 + //===========================================================================
350 + //============================= Thermal Settings ============================
351 + //===========================================================================
352 + // @section temperature
353 +
354 + /**
355 + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
356 + *
357 + * Temperature sensors available:
358 + *
359 + * -5 : PT100 / PT1000 with MAX31865 (only for sensors 0-1)
360 + * -3 : thermocouple with MAX31855 (only for sensors 0-1)
361 + * -2 : thermocouple with MAX6675 (only for sensors 0-1)
362 + * -4 : thermocouple with AD8495
363 + * -1 : thermocouple with AD595
364 + * 0 : not used
365 + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
366 + * 331 : (3.3V scaled thermistor 1 table for MEGA)
367 + * 332 : (3.3V scaled thermistor 1 table for DUE)
368 + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
369 + * 202 : 200k thermistor - Copymaster 3D
370 + * 3 : Mendel-parts thermistor (4.7k pullup)
371 + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
372 + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan, J-Head, and E3D) (4.7k pullup)
373 + * 501 : 100K Zonestar (Tronxy X3A) Thermistor
374 + * 502 : 100K Zonestar Thermistor used by hot bed in Zonestar Průša P802M
375 + * 512 : 100k RPW-Ultra hotend thermistor (4.7k pullup)
376 + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
377 + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
378 + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
379 + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
380 + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
381 + * 10 : 100k RS thermistor 198-961 (4.7k pullup)
382 + * 11 : 100k beta 3950 1% thermistor (Used in Keenovo AC silicone mats and most Wanhao i3 machines) (4.7k pullup)
383 + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed)
384 + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE"
385 + * 15 : 100k thermistor calibration for JGAurora A5 hotend
386 + * 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327
387 + * 20 : Pt100 with circuit in the Ultimainboard V2.x with 5v excitation (AVR)
388 + * 21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v excitation (STM32 \ LPC176x....)
389 + * 22 : 100k (hotend) with 4.7k pullup to 3.3V and 220R to analog input (as in GTM32 Pro vB)
390 + * 23 : 100k (bed) with 4.7k pullup to 3.3v and 220R to analog input (as in GTM32 Pro vB)
391 + * 30 : Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K / B3950 (4.7k pullup)
392 + * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x
393 + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950
394 + * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup
395 + * 66 : 4.7M High Temperature thermistor from Dyze Design
396 + * 67 : 450C thermistor from SliceEngineering
397 + * 70 : the 100K thermistor found in the bq Hephestos 2
398 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor
399 + * 99 : 100k thermistor with a 10K pull-up resistor (found on some Wanhao i3 machines)
400 + *
401 + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k.
402 + * (but gives greater accuracy and more stable PID)
403 + * 51 : 100k thermistor - EPCOS (1k pullup)
404 + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
405 + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
406 + *
407 + * 1047 : Pt1000 with 4k7 pullup (E3D)
408 + * 1010 : Pt1000 with 1k pullup (non standard)
409 + * 147 : Pt100 with 4k7 pullup
410 + * 110 : Pt100 with 1k pullup (non standard)
411 + *
412 + * 1000 : Custom - Specify parameters in Configuration_adv.h
413 + *
414 + * Use these for Testing or Development purposes. NEVER for production machine.
415 + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
416 + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
417 + */
418 + #define TEMP_SENSOR_0 1
419 + #define TEMP_SENSOR_1 0
420 + #define TEMP_SENSOR_2 0
421 + #define TEMP_SENSOR_3 0
422 + #define TEMP_SENSOR_4 0
423 + #define TEMP_SENSOR_5 0
424 + #define TEMP_SENSOR_6 0
425 + #define TEMP_SENSOR_7 0
426 + #define TEMP_SENSOR_BED 1
427 + #define TEMP_SENSOR_PROBE 0
428 + #define TEMP_SENSOR_CHAMBER 0
429 +
430 + // Dummy thermistor constant temperature readings, for use with 998 and 999
431 + #define DUMMY_THERMISTOR_998_VALUE 25
432 + #define DUMMY_THERMISTOR_999_VALUE 100
433 +
434 + // Resistor values when using a MAX31865 (sensor -5)
435 + // Sensor value is typically 100 (PT100) or 1000 (PT1000)
436 + // Calibration value is typically 430 ohm for AdaFruit PT100 modules and 4300 ohm for AdaFruit PT1000 modules.
437 + //#define MAX31865_SENSOR_OHMS 100
438 + //#define MAX31865_CALIBRATION_OHMS 430
439 +
440 + // Use temp sensor 1 as a redundant sensor with sensor 0. If the readings
441 + // from the two sensors differ too much the print will be aborted.
442 + //#define TEMP_SENSOR_1_AS_REDUNDANT
443 + #define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
444 +
445 + #define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
446 + #define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
447 + #define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
448 +
449 + #define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
450 + #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
451 + #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
452 +
453 + // Below this temperature the heater will be switched off
454 + // because it probably indicates a broken thermistor wire.
455 + #define HEATER_0_MINTEMP 5
456 + #define HEATER_1_MINTEMP 5
457 + #define HEATER_2_MINTEMP 5
458 + #define HEATER_3_MINTEMP 5
459 + #define HEATER_4_MINTEMP 5
460 + #define HEATER_5_MINTEMP 5
461 + #define HEATER_6_MINTEMP 5
462 + #define HEATER_7_MINTEMP 5
463 + #define BED_MINTEMP 5
464 +
465 + // Above this temperature the heater will be switched off.
466 + // This can protect components from overheating, but NOT from shorts and failures.
467 + // (Use MINTEMP for thermistor short/failure protection.)
468 + #define HEATER_0_MAXTEMP 275
469 + #define HEATER_1_MAXTEMP 275
470 + #define HEATER_2_MAXTEMP 275
471 + #define HEATER_3_MAXTEMP 275
472 + #define HEATER_4_MAXTEMP 275
473 + #define HEATER_5_MAXTEMP 275
474 + #define HEATER_6_MAXTEMP 275
475 + #define HEATER_7_MAXTEMP 275
476 + #define BED_MAXTEMP 125
477 +
478 + //===========================================================================
479 + //============================= PID Settings ================================
480 + //===========================================================================
481 + // PID Tuning Guide here: https://reprap.org/wiki/PID_Tuning
482 +
483 + // Comment the following line to disable PID and enable bang-bang.
484 + #define PIDTEMP
485 + #define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current
486 + #define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
487 + #define PID_K1 0.95 // Smoothing factor within any PID loop
488 +
489 + #if ENABLED(PIDTEMP)
490 + //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
491 + //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
492 + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
493 + // Set/get with gcode: M301 E[extruder number, 0-2]
494 +
495 + #if ENABLED(PID_PARAMS_PER_HOTEND)
496 + // Specify between 1 and HOTENDS values per array.
497 + // If fewer than EXTRUDER values are provided, the last element will be repeated.
498 + #define DEFAULT_Kp_LIST { 22.20, 22.20 }
499 + #define DEFAULT_Ki_LIST { 1.08, 1.08 }
500 + #define DEFAULT_Kd_LIST { 114.00, 114.00 }
501 + #else
502 + // Creality Ender-3
503 + #define DEFAULT_Kp 21.73
504 + #define DEFAULT_Ki 1.54
505 + #define DEFAULT_Kd 76.55
506 + #endif
507 + #endif // PIDTEMP
508 +
509 + //===========================================================================
510 + //====================== PID > Bed Temperature Control ======================
511 + //===========================================================================
512 +
513 + /**
514 + * PID Bed Heating
515 + *
516 + * If this option is enabled set PID constants below.
517 + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.
518 + *
519 + * The PID frequency will be the same as the extruder PWM.
520 + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz,
521 + * which is fine for driving a square wave into a resistive load and does not significantly
522 + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W
523 + * heater. If your configuration is significantly different than this and you don't understand
524 + * the issues involved, don't use bed PID until someone else verifies that your hardware works.
525 + */
526 + //#define PIDTEMPBED
527 +
528 + //#define BED_LIMIT_SWITCHING
529 +
530 + /**
531 + * Max Bed Power
532 + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis).
533 + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider
534 + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)
535 + */
536 + #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
537 +
538 + #if ENABLED(PIDTEMPBED)
539 + //#define MIN_BED_POWER 0
540 + //#define PID_BED_DEBUG // Sends debug data to the serial port.
541 +
542 + // 120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
543 + // from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
544 + #define DEFAULT_bedKp 10.00
545 + #define DEFAULT_bedKi .023
546 + #define DEFAULT_bedKd 305.4
547 +
548 + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
549 + #endif // PIDTEMPBED
550 +
551 + #if EITHER(PIDTEMP, PIDTEMPBED)
552 + //#define PID_DEBUG // Sends debug data to the serial port. Use 'M303 D' to toggle activation.
553 + //#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
554 + //#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
555 + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
556 + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
557 + #endif
558 +
559 + // @section extruder
560 +
561 + /**
562 + * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP.
563 + * Add M302 to set the minimum extrusion temperature and/or turn
564 + * cold extrusion prevention on and off.
565 + *
566 + * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***
567 + */
568 + #define PREVENT_COLD_EXTRUSION
569 + #define EXTRUDE_MINTEMP 170
570 +
571 + /**
572 + * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH.
573 + * Note: For Bowden Extruders make this large enough to allow load/unload.
574 + */
575 + #define PREVENT_LENGTHY_EXTRUDE
576 + #define EXTRUDE_MAXLENGTH 200
577 +
578 + //===========================================================================
579 + //======================== Thermal Runaway Protection =======================
580 + //===========================================================================
581 +
582 + /**
583 + * Thermal Protection provides additional protection to your printer from damage
584 + * and fire. Marlin always includes safe min and max temperature ranges which
585 + * protect against a broken or disconnected thermistor wire.
586 + *
587 + * The issue: If a thermistor falls out, it will report the much lower
588 + * temperature of the air in the room, and the the firmware will keep
589 + * the heater on.
590 + *
591 + * If you get "Thermal Runaway" or "Heating failed" errors the
592 + * details can be tuned in Configuration_adv.h
593 + */
594 +
595 + #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
596 + #define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
597 + #define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
598 +
599 + //===========================================================================
600 + //============================= Mechanical Settings =========================
601 + //===========================================================================
602 +
603 + // @section machine
604 +
605 + // Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
606 + // either in the usual order or reversed
607 + //#define COREXY
608 + //#define COREXZ
609 + //#define COREYZ
610 + //#define COREYX
611 + //#define COREZX
612 + //#define COREZY
613 + //#define MARKFORGED_XY // MarkForged. See https://reprap.org/forum/read.php?152,504042
614 +
615 + //===========================================================================
616 + //============================== Endstop Settings ===========================
617 + //===========================================================================
618 +
619 + // @section homing
620 +
621 + // Specify here all the endstop connectors that are connected to any endstop or probe.
622 + // Almost all printers will be using one per axis. Probes will use one or more of the
623 + // extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
624 + #define USE_XMIN_PLUG
625 + #define USE_YMIN_PLUG
626 + #define USE_ZMIN_PLUG
627 + //#define USE_XMAX_PLUG
628 + //#define USE_YMAX_PLUG
629 + //#define USE_ZMAX_PLUG
630 +
631 + // Enable pullup for all endstops to prevent a floating state
632 + #define ENDSTOPPULLUPS
633 + #if DISABLED(ENDSTOPPULLUPS)
634 + // Disable ENDSTOPPULLUPS to set pullups individually
635 + //#define ENDSTOPPULLUP_XMAX
636 + //#define ENDSTOPPULLUP_YMAX
637 + //#define ENDSTOPPULLUP_ZMAX
638 + //#define ENDSTOPPULLUP_XMIN
639 + //#define ENDSTOPPULLUP_YMIN
640 + //#define ENDSTOPPULLUP_ZMIN
641 + //#define ENDSTOPPULLUP_ZMIN_PROBE
642 + #endif
643 +
644 + // Enable pulldown for all endstops to prevent a floating state
645 + //#define ENDSTOPPULLDOWNS
646 + #if DISABLED(ENDSTOPPULLDOWNS)
647 + // Disable ENDSTOPPULLDOWNS to set pulldowns individually
648 + //#define ENDSTOPPULLDOWN_XMAX
649 + //#define ENDSTOPPULLDOWN_YMAX
650 + //#define ENDSTOPPULLDOWN_ZMAX
651 + //#define ENDSTOPPULLDOWN_XMIN
652 + //#define ENDSTOPPULLDOWN_YMIN
653 + //#define ENDSTOPPULLDOWN_ZMIN
654 + //#define ENDSTOPPULLDOWN_ZMIN_PROBE
655 + #endif
656 +
657 + // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
658 + #define X_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
659 + #define Y_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
660 + #define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
661 + #define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
662 + #define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
663 + #define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
664 + #define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.
665 +
666 + /**
667 + * Stepper Drivers
668 + *
669 + * These settings allow Marlin to tune stepper driver timing and enable advanced options for
670 + * stepper drivers that support them. You may also override timing options in Configuration_adv.h.
671 + *
672 + * A4988 is assumed for unspecified drivers.
673 + *
674 + * Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
675 + * TB6560, TB6600, TMC2100,
676 + * TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
677 + * TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
678 + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE,
679 + * TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
680 + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
681 + */
682 + #define X_DRIVER_TYPE TMC2209
683 + #define Y_DRIVER_TYPE TMC2209
684 + #define Z_DRIVER_TYPE TMC2209
685 + //#define X2_DRIVER_TYPE A4988
686 + //#define Y2_DRIVER_TYPE A4988
687 + //#define Z2_DRIVER_TYPE A4988
688 + //#define Z3_DRIVER_TYPE A4988
689 + //#define Z4_DRIVER_TYPE A4988
690 + #define E0_DRIVER_TYPE TMC2209
691 + //#define E1_DRIVER_TYPE A4988
692 + //#define E2_DRIVER_TYPE A4988
693 + //#define E3_DRIVER_TYPE A4988
694 + //#define E4_DRIVER_TYPE A4988
695 + //#define E5_DRIVER_TYPE A4988
696 + //#define E6_DRIVER_TYPE A4988
697 + //#define E7_DRIVER_TYPE A4988
698 +
699 + // Enable this feature if all enabled endstop pins are interrupt-capable.
700 + // This will remove the need to poll the interrupt pins, saving many CPU cycles.
701 + //#define ENDSTOP_INTERRUPTS_FEATURE
702 +
703 + /**
704 + * Endstop Noise Threshold
705 + *
706 + * Enable if your probe or endstops falsely trigger due to noise.
707 + *
708 + * - Higher values may affect repeatability or accuracy of some bed probes.
709 + * - To fix noise install a 100nF ceramic capacitor in parallel with the switch.
710 + * - This feature is not required for common micro-switches mounted on PCBs
711 + * based on the Makerbot design, which already have the 100nF capacitor.
712 + *
713 + * :[2,3,4,5,6,7]
714 + */
715 + //#define ENDSTOP_NOISE_THRESHOLD 2
716 +
717 + // Check for stuck or disconnected endstops during homing moves.
718 + //#define DETECT_BROKEN_ENDSTOP
719 +
720 + //=============================================================================
721 + //============================== Movement Settings ============================
722 + //=============================================================================
723 + // @section motion
724 +
725 + /**
726 + * Default Settings
727 + *
728 + * These settings can be reset by M502
729 + *
730 + * Note that if EEPROM is enabled, saved values will override these.
731 + */
732 +
733 + /**
734 + * With this option each E stepper can have its own factors for the
735 + * following movement settings. If fewer factors are given than the
736 + * total number of extruders, the last value applies to the rest.
737 + */
738 + //#define DISTINCT_E_FACTORS
739 +
740 + /**
741 + * Default Axis Steps Per Unit (steps/mm)
742 + * Override with M92
743 + * X, Y, Z, E0 [, E1[, E2...]]
744 + */
745 + #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 93 }
746 +
747 + /**
748 + * Default Max Feed Rate (mm/s)
749 + * Override with M203
750 + * X, Y, Z, E0 [, E1[, E2...]]
751 + */
752 + #define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 }
753 +
754 + //#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
755 + #if ENABLED(LIMITED_MAX_FR_EDITING)
756 + #define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits
757 + #endif
758 +
759 + /**
760 + * Default Max Acceleration (change/s) change = mm/s
761 + * (Maximum start speed for accelerated moves)
762 + * Override with M201
763 + * X, Y, Z, E0 [, E1[, E2...]]
764 + */
765 + #define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 5000 }
766 +
767 + //#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
768 + #if ENABLED(LIMITED_MAX_ACCEL_EDITING)
769 + #define MAX_ACCEL_EDIT_VALUES { 6000, 6000, 200, 20000 } // ...or, set your own edit limits
770 + #endif
771 +
772 + /**
773 + * Default Acceleration (change/s) change = mm/s
774 + * Override with M204
775 + *
776 + * M204 P Acceleration
777 + * M204 R Retract Acceleration
778 + * M204 T Travel Acceleration
779 + */
780 + #define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves
781 + #define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts
782 + #define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves
783 +
784 + /**
785 + * Default Jerk limits (mm/s)
786 + * Override with M205 X Y Z E
787 + *
788 + * "Jerk" specifies the minimum speed change that requires acceleration.
789 + * When changing speed and direction, if the difference is less than the
790 + * value set here, it may happen instantaneously.
791 + */
792 + //#define CLASSIC_JERK
793 + #if ENABLED(CLASSIC_JERK)
794 + #define DEFAULT_XJERK 10.0
795 + #define DEFAULT_YJERK 10.0
796 + #define DEFAULT_ZJERK 0.3
797 +
798 + //#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves
799 +
800 + //#define LIMITED_JERK_EDITING // Limit edit via M205 or LCD to DEFAULT_aJERK * 2
801 + #if ENABLED(LIMITED_JERK_EDITING)
802 + #define MAX_JERK_EDIT_VALUES { 20, 20, 0.6, 10 } // ...or, set your own edit limits
803 + #endif
804 + #endif
805 +
806 + #define DEFAULT_EJERK 5.0 // May be used by Linear Advance
807 +
808 + /**
809 + * Junction Deviation Factor
810 + *
811 + * See:
812 + * https://reprap.org/forum/read.php?1,739819
813 + * https://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html
814 + */
815 + #if DISABLED(CLASSIC_JERK)
816 + #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge
817 + #define JD_HANDLE_SMALL_SEGMENTS // Use curvature estimation instead of just the junction angle
818 + // for small segments (< 1mm) with large junction angles (> 135°).
819 + #endif
820 +
821 + /**
822 + * S-Curve Acceleration
823 + *
824 + * This option eliminates vibration during printing by fitting a Bézier
825 + * curve to move acceleration, producing much smoother direction changes.
826 + *
827 + * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained
828 + */
829 + //#define S_CURVE_ACCELERATION
830 +
831 + //===========================================================================
832 + //============================= Z Probe Options =============================
833 + //===========================================================================
834 + // @section probes
835 +
836 + //
837 + // See https://marlinfw.org/docs/configuration/probes.html
838 + //
839 +
840 + /**
841 + * Enable this option for a probe connected to the Z-MIN pin.
842 + * The probe replaces the Z-MIN endstop and is used for Z homing.
843 + * (Automatically enables USE_PROBE_FOR_Z_HOMING.)
844 + */
845 + // #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
846 +
847 + // Force the use of the probe for Z-axis homing
848 + #define USE_PROBE_FOR_Z_HOMING
849 +
850 + /**
851 + * Z_MIN_PROBE_PIN
852 + *
853 + * Define this pin if the probe is not connected to Z_MIN_PIN.
854 + * If not defined the default pin for the selected MOTHERBOARD
855 + * will be used. Most of the time the default is what you want.
856 + *
857 + * - The simplest option is to use a free endstop connector.
858 + * - Use 5V for powered (usually inductive) sensors.
859 + *
860 + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
861 + * - For simple switches connect...
862 + * - normally-closed switches to GND and D32.
863 + * - normally-open switches to 5V and D32.
864 + */
865 + //#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default
866 + #define Z_MIN_PROBE_PIN P0_10
867 + /**
868 + * Probe Type
869 + *
870 + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc.
871 + * Activate one of these to use Auto Bed Leveling below.
872 + */
873 +
874 + /**
875 + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
876 + * Use G29 repeatedly, adjusting the Z height at each point with movement commands
877 + * or (with LCD_BED_LEVELING) the LCD controller.
878 + */
879 + //#define PROBE_MANUALLY
880 + //#define MANUAL_PROBE_START_Z 0.2
881 +
882 + /**
883 + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
884 + * (e.g., an inductive probe or a nozzle-based probe-switch.)
885 + */
886 + //#define FIX_MOUNTED_PROBE
887 +
888 + /**
889 + * Use the nozzle as the probe, as with a conductive
890 + * nozzle system or a piezo-electric smart effector.
891 + */
892 + //#define NOZZLE_AS_PROBE
893 +
894 + /**
895 + * Z Servo Probe, such as an endstop switch on a rotating arm.
896 + */
897 + //#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
898 + //#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles
899 +
900 + /**
901 + * The BLTouch probe uses a Hall effect sensor and emulates a servo.
902 + */
903 + #define BLTOUCH
904 +
905 + /**
906 + * Pressure sensor with a BLTouch-like interface
907 + */
908 + //#define CREALITY_TOUCH
909 +
910 + /**
911 + * Touch-MI Probe by hotends.fr
912 + *
913 + * This probe is deployed and activated by moving the X-axis to a magnet at the edge of the bed.
914 + * By default, the magnet is assumed to be on the left and activated by a home. If the magnet is
915 + * on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position.
916 + *
917 + * Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING,
918 + * and a minimum Z_HOMING_HEIGHT of 10.
919 + */
920 + //#define TOUCH_MI_PROBE
921 + #if ENABLED(TOUCH_MI_PROBE)
922 + #define TOUCH_MI_RETRACT_Z 0.5 // Height at which the probe retracts
923 + //#define TOUCH_MI_DEPLOY_XPOS (X_MAX_BED + 2) // For a magnet on the right side of the bed
924 + //#define TOUCH_MI_MANUAL_DEPLOY // For manual deploy (LCD menu)
925 + #endif
926 +
927 + // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
928 + //#define SOLENOID_PROBE
929 +
930 + // A sled-mounted probe like those designed by Charles Bell.
931 + //#define Z_PROBE_SLED
932 + //#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.
933 +
934 + // A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice.
935 + //#define RACK_AND_PINION_PROBE
936 + #if ENABLED(RACK_AND_PINION_PROBE)
937 + #define Z_PROBE_DEPLOY_X X_MIN_POS
938 + #define Z_PROBE_RETRACT_X X_MAX_POS
939 + #endif
940 +
941 + // Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
942 + // When the pin is defined you can use M672 to set/reset the probe sensivity.
943 + //#define DUET_SMART_EFFECTOR
944 + #if ENABLED(DUET_SMART_EFFECTOR)
945 + #define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
946 + #endif
947 +
948 + /**
949 + * Use StallGuard2 to probe the bed with the nozzle.
950 + * Requires stallGuard-capable Trinamic stepper drivers.
951 + * CAUTION: This can damage machines with Z lead screws.
952 + * Take extreme care when setting up this feature.
953 + */
954 + //#define SENSORLESS_PROBING
955 +
956 + //
957 + // For Z_PROBE_ALLEN_KEY see the Delta example configurations.
958 + //
959 +
960 + /**
961 + * Nozzle-to-Probe offsets { X, Y, Z }
962 + *
963 + * - Use a caliper or ruler to measure the distance from the tip of
964 + * the Nozzle to the center-point of the Probe in the X and Y axes.
965 + * - For the Z offset use your best known value and adjust at runtime.
966 + * - Probe Offsets can be tuned at runtime with 'M851', LCD menus, babystepping, etc.
967 + *
968 + * Assuming the typical work area orientation:
969 + * - Probe to RIGHT of the Nozzle has a Positive X offset
970 + * - Probe to LEFT of the Nozzle has a Negative X offset
971 + * - Probe in BACK of the Nozzle has a Positive Y offset
972 + * - Probe in FRONT of the Nozzle has a Negative Y offset
973 + *
974 + * Some examples:
975 + * #define NOZZLE_TO_PROBE_OFFSET { 10, 10, -1 } // Example "1"
976 + * #define NOZZLE_TO_PROBE_OFFSET {-10, 5, -1 } // Example "2"
977 + * #define NOZZLE_TO_PROBE_OFFSET { 5, -5, -1 } // Example "3"
978 + * #define NOZZLE_TO_PROBE_OFFSET {-15,-10, -1 } // Example "4"
979 + *
980 + * +-- BACK ---+
981 + * | [+] |
982 + * L | 1 | R <-- Example "1" (right+, back+)
983 + * E | 2 | I <-- Example "2" ( left-, back+)
984 + * F |[-] N [+]| G <-- Nozzle
985 + * T | 3 | H <-- Example "3" (right+, front-)
986 + * | 4 | T <-- Example "4" ( left-, front-)
987 + * | [-] |
988 + * O-- FRONT --+
989 + */
990 + #define NOZZLE_TO_PROBE_OFFSET { -42, -5, 0 }
991 +
992 + // Most probes should stay away from the edges of the bed, but
993 + // with NOZZLE_AS_PROBE this can be negative for a wider probing area.
994 + #define PROBING_MARGIN 10
995 +
996 + // X and Y axis travel speed (mm/min) between probes
997 + #define XY_PROBE_SPEED (133*60)
998 +
999 + // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2)
1000 + #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
1001 +
1002 + // Feedrate (mm/min) for the "accurate" probe of each point
1003 + #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
1004 +
1005 + /**
1006 + * Multiple Probing
1007 + *
1008 + * You may get improved results by probing 2 or more times.
1009 + * With EXTRA_PROBING the more atypical reading(s) will be disregarded.
1010 + *
1011 + * A total of 2 does fast/slow probes with a weighted average.
1012 + * A total of 3 or more adds more slow probes, taking the average.
1013 + */
1014 + #define MULTIPLE_PROBING 2
1015 + //#define EXTRA_PROBING 1
1016 +
1017 + /**
1018 + * Z probes require clearance when deploying, stowing, and moving between
1019 + * probe points to avoid hitting the bed and other hardware.
1020 + * Servo-mounted probes require extra space for the arm to rotate.
1021 + * Inductive probes need space to keep from triggering early.
1022 + *
1023 + * Use these settings to specify the distance (mm) to raise the probe (or
1024 + * lower the bed). The values set here apply over and above any (negative)
1025 + * probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD.
1026 + * Only integer values >= 1 are valid here.
1027 + *
1028 + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle.
1029 + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle.
1030 + */
1031 + #define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow
1032 + #define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points
1033 + #define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
1034 + #define Z_AFTER_PROBING 20 // Z position after probing is done
1035 +
1036 + #define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
1037 +
1038 + // For M851 give a range for adjusting the Z probe offset
1039 + #define Z_PROBE_OFFSET_RANGE_MIN -20
1040 + #define Z_PROBE_OFFSET_RANGE_MAX 20
1041 +
1042 + // Enable the M48 repeatability test to test probe accuracy
1043 + //#define Z_MIN_PROBE_REPEATABILITY_TEST
1044 +
1045 + // Before deploy/stow pause for user confirmation
1046 + //#define PAUSE_BEFORE_DEPLOY_STOW
1047 + #if ENABLED(PAUSE_BEFORE_DEPLOY_STOW)
1048 + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe
1049 + #endif
1050 +
1051 + /**
1052 + * Enable one or more of the following if probing seems unreliable.
1053 + * Heaters and/or fans can be disabled during probing to minimize electrical
1054 + * noise. A delay can also be added to allow noise and vibration to settle.
1055 + * These options are most useful for the BLTouch probe, but may also improve
1056 + * readings with inductive probes and piezo sensors.
1057 + */
1058 + //#define PROBING_HEATERS_OFF // Turn heaters off when probing
1059 + #if ENABLED(PROBING_HEATERS_OFF)
1060 + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy)
1061 + #endif
1062 + //#define PROBING_FANS_OFF // Turn fans off when probing
1063 + //#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
1064 + //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors
1065 +
1066 + // For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
1067 + // :{ 0:'Low', 1:'High' }
1068 + #define X_ENABLE_ON 0
1069 + #define Y_ENABLE_ON 0
1070 + #define Z_ENABLE_ON 0
1071 + #define E_ENABLE_ON 0 // For all extruders
1072 +
1073 + // Disable axis steppers immediately when they're not being stepped.
1074 + // WARNING: When motors turn off there is a chance of losing position accuracy!
1075 + #define DISABLE_X false
1076 + #define DISABLE_Y false
1077 + #define DISABLE_Z false
1078 +
1079 + // Turn off the display blinking that warns about possible accuracy reduction
1080 + //#define DISABLE_REDUCED_ACCURACY_WARNING
1081 +
1082 + // @section extruder
1083 +
1084 + #define DISABLE_E false // Disable the extruder when not stepping
1085 + #define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled
1086 +
1087 + // @section machine
1088 +
1089 + // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
1090 + #define INVERT_X_DIR true
1091 + #define INVERT_Y_DIR true
1092 + #define INVERT_Z_DIR false
1093 +
1094 + // @section extruder
1095 +
1096 + // For direct drive extruder v9 set to true, for geared extruder set to false.
1097 + #define INVERT_E0_DIR true
1098 + #define INVERT_E1_DIR false
1099 + #define INVERT_E2_DIR false
1100 + #define INVERT_E3_DIR false
1101 + #define INVERT_E4_DIR false
1102 + #define INVERT_E5_DIR false
1103 + #define INVERT_E6_DIR false
1104 + #define INVERT_E7_DIR false
1105 +
1106 + // @section homing
1107 +
1108 + //#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
1109 +
1110 + //#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.
1111 +
1112 + #define Z_HOMING_HEIGHT 20 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
1113 + // Be sure to have this much clearance over your Z_MAX_POS to prevent grinding.
1114 +
1115 + //#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z
1116 +
1117 + // Direction of endstops when homing; 1=MAX, -1=MIN
1118 + // :[-1,1]
1119 + #define X_HOME_DIR -1
1120 + #define Y_HOME_DIR -1
1121 + #define Z_HOME_DIR -1
1122 +
1123 + // @section machine
1124 +
1125 + // The size of the print bed
1126 + #define X_BED_SIZE 235
1127 + #define Y_BED_SIZE 235
1128 +
1129 + // Travel limits (mm) after homing, corresponding to endstop positions.
1130 + #define X_MIN_POS 0
1131 + #define Y_MIN_POS 0
1132 + #define Z_MIN_POS 0
1133 + #define X_MAX_POS X_BED_SIZE
1134 + #define Y_MAX_POS Y_BED_SIZE
1135 + #define Z_MAX_POS 250
1136 +
1137 + /**
1138 + * Software Endstops
1139 + *
1140 + * - Prevent moves outside the set machine bounds.
1141 + * - Individual axes can be disabled, if desired.
1142 + * - X and Y only apply to Cartesian robots.
1143 + * - Use 'M211' to set software endstops on/off or report current state
1144 + */
1145 +
1146 + // Min software endstops constrain movement within minimum coordinate bounds
1147 + #define MIN_SOFTWARE_ENDSTOPS
1148 + #if ENABLED(MIN_SOFTWARE_ENDSTOPS)
1149 + #define MIN_SOFTWARE_ENDSTOP_X
1150 + #define MIN_SOFTWARE_ENDSTOP_Y
1151 + // #define MIN_SOFTWARE_ENDSTOP_Z
1152 + #endif
1153 +
1154 + // Max software endstops constrain movement within maximum coordinate bounds
1155 + #define MAX_SOFTWARE_ENDSTOPS
1156 + #if ENABLED(MAX_SOFTWARE_ENDSTOPS)
1157 + #define MAX_SOFTWARE_ENDSTOP_X
1158 + #define MAX_SOFTWARE_ENDSTOP_Y
1159 + #define MAX_SOFTWARE_ENDSTOP_Z
1160 + #endif
1161 +
1162 + #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
1163 + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
1164 + #endif
1165 +
1166 + /**
1167 + * Filament Runout Sensors
1168 + * Mechanical or opto endstops are used to check for the presence of filament.
1169 + *
1170 + * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
1171 + * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
1172 + */
1173 + //#define FILAMENT_RUNOUT_SENSOR
1174 + #if ENABLED(FILAMENT_RUNOUT_SENSOR)
1175 + #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
1176 + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
1177 + #define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present.
1178 + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
1179 + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
1180 +
1181 + // Set one or more commands to execute on filament runout.
1182 + // (After 'M412 H' Marlin will ask the host to handle the process.)
1183 + #define FILAMENT_RUNOUT_SCRIPT "M600"
1184 +
1185 + // After a runout is detected, continue printing this length of filament
1186 + // before executing the runout script. Useful for a sensor at the end of
1187 + // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
1188 + //#define FILAMENT_RUNOUT_DISTANCE_MM 25
1189 +
1190 + #ifdef FILAMENT_RUNOUT_DISTANCE_MM
1191 + // Enable this option to use an encoder disc that toggles the runout pin
1192 + // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
1193 + // large enough to avoid false positives.)
1194 + //#define FILAMENT_MOTION_SENSOR
1195 + #endif
1196 + #endif
1197 +
1198 + //===========================================================================
1199 + //=============================== Bed Leveling ==============================
1200 + //===========================================================================
1201 + // @section calibrate
1202 +
1203 + /**
1204 + * Choose one of the options below to enable G29 Bed Leveling. The parameters
1205 + * and behavior of G29 will change depending on your selection.
1206 + *
1207 + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also!
1208 + *
1209 + * - AUTO_BED_LEVELING_3POINT
1210 + * Probe 3 arbitrary points on the bed (that aren't collinear)
1211 + * You specify the XY coordinates of all 3 points.
1212 + * The result is a single tilted plane. Best for a flat bed.
1213 + *
1214 + * - AUTO_BED_LEVELING_LINEAR
1215 + * Probe several points in a grid.
1216 + * You specify the rectangle and the density of sample points.
1217 + * The result is a single tilted plane. Best for a flat bed.
1218 + *
1219 + * - AUTO_BED_LEVELING_BILINEAR
1220 + * Probe several points in a grid.
1221 + * You specify the rectangle and the density of sample points.
1222 + * The result is a mesh, best for large or uneven beds.
1223 + *
1224 + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling)
1225 + * A comprehensive bed leveling system combining the features and benefits
1226 + * of other systems. UBL also includes integrated Mesh Generation, Mesh
1227 + * Validation and Mesh Editing systems.
1228 + *
1229 + * - MESH_BED_LEVELING
1230 + * Probe a grid manually
1231 + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)
1232 + * For machines without a probe, Mesh Bed Leveling provides a method to perform
1233 + * leveling in steps so you can manually adjust the Z height at each grid-point.
1234 + * With an LCD controller the process is guided step-by-step.
1235 + */
1236 + //#define AUTO_BED_LEVELING_3POINT
1237 + //#define AUTO_BED_LEVELING_LINEAR
1238 + #define AUTO_BED_LEVELING_BILINEAR
1239 + //#define AUTO_BED_LEVELING_UBL
1240 + //#define MESH_BED_LEVELING
1241 +
1242 + /**
1243 + * Normally G28 leaves leveling disabled on completion. Enable
1244 + * this option to have G28 restore the prior leveling state.
1245 + */
1246 + #define RESTORE_LEVELING_AFTER_G28
1247 +
1248 + /**
1249 + * Enable detailed logging of G28, G29, M48, etc.
1250 + * Turn on with the command 'M111 S32'.
1251 + * NOTE: Requires a lot of PROGMEM!
1252 + */
1253 + //#define DEBUG_LEVELING_FEATURE
1254 +
1255 + #if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL)
1256 + // Gradually reduce leveling correction until a set height is reached,
1257 + // at which point movement will be level to the machine's XY plane.
1258 + // The height can be set with M420 Z<height>
1259 + #define ENABLE_LEVELING_FADE_HEIGHT
1260 +
1261 + // For Cartesian machines, instead of dividing moves on mesh boundaries,
1262 + // split up moves into short segments like a Delta. This follows the
1263 + // contours of the bed more closely than edge-to-edge straight moves.
1264 + #define SEGMENT_LEVELED_MOVES
1265 + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)
1266 +
1267 + /**
1268 + * Enable the G26 Mesh Validation Pattern tool.
1269 + */
1270 + //#define G26_MESH_VALIDATION
1271 + #if ENABLED(G26_MESH_VALIDATION)
1272 + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
1273 + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
1274 + #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
1275 + #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
1276 + #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool.
1277 + #define G26_RETRACT_MULTIPLIER 1.0 // G26 Q (retraction) used by default between mesh test elements.
1278 + #endif
1279 +
1280 + #endif
1281 +
1282 + #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
1283 +
1284 + // Set the number of grid points per dimension.
1285 + #define GRID_MAX_POINTS_X 5
1286 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1287 +
1288 + // Probe along the Y axis, advancing X after each column
1289 + //#define PROBE_Y_FIRST
1290 +
1291 + #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
1292 +
1293 + // Beyond the probed grid, continue the implied tilt?
1294 + // Default is to maintain the height of the nearest edge.
1295 + //#define EXTRAPOLATE_BEYOND_GRID
1296 +
1297 + //
1298 + // Experimental Subdivision of the grid by Catmull-Rom method.
1299 + // Synthesizes intermediate points to produce a more detailed mesh.
1300 + //
1301 + //#define ABL_BILINEAR_SUBDIVISION
1302 + #if ENABLED(ABL_BILINEAR_SUBDIVISION)
1303 + // Number of subdivisions between probe points
1304 + #define BILINEAR_SUBDIVISIONS 3
1305 + #endif
1306 +
1307 + #endif
1308 +
1309 + #elif ENABLED(AUTO_BED_LEVELING_UBL)
1310 +
1311 + //===========================================================================
1312 + //========================= Unified Bed Leveling ============================
1313 + //===========================================================================
1314 +
1315 + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
1316 +
1317 + #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed
1318 + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited.
1319 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1320 +
1321 + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle
1322 + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500
1323 +
1324 + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used
1325 + // as the Z-Height correction value.
1326 +
1327 + #elif ENABLED(MESH_BED_LEVELING)
1328 +
1329 + //===========================================================================
1330 + //=================================== Mesh ==================================
1331 + //===========================================================================
1332 +
1333 + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed
1334 + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited.
1335 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
1336 +
1337 + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS
1338 +
1339 + #endif // BED_LEVELING
1340 +
1341 + /**
1342 + * Add a bed leveling sub-menu for ABL or MBL.
1343 + * Include a guided procedure if manual probing is enabled.
1344 + */
1345 + #define LCD_BED_LEVELING
1346 +
1347 + #if ENABLED(LCD_BED_LEVELING)
1348 + #define MESH_EDIT_Z_STEP 0.02 // (mm) Step size while manually probing Z axis.
1349 + #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment
1350 + //#define MESH_EDIT_MENU // Add a menu to edit mesh points
1351 + #endif
1352 +
1353 + // Add a menu item to move between bed corners for manual bed adjustment
1354 + //#define LEVEL_BED_CORNERS
1355 +
1356 + #if ENABLED(LEVEL_BED_CORNERS)
1357 + #define LEVEL_CORNERS_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
1358 + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
1359 + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
1360 + //#define LEVEL_CENTER_TOO // Move to the center after the last corner
1361 + #endif
1362 +
1363 + /**
1364 + * Commands to execute at the end of G29 probing.
1365 + * Useful to retract or move the Z probe out of the way.
1366 + */
1367 + //#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10"
1368 +
1369 + // @section homing
1370 +
1371 + // The center of the bed is at (X=0, Y=0)
1372 + //#define BED_CENTER_AT_0_0
1373 +
1374 + // Manually set the home position. Leave these undefined for automatic settings.
1375 + // For DELTA this is the top-center of the Cartesian print volume.
1376 + //#define MANUAL_X_HOME_POS 0
1377 + //#define MANUAL_Y_HOME_POS 0
1378 + //#define MANUAL_Z_HOME_POS 0
1379 +
1380 + // Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
1381 + //
1382 + // With this feature enabled:
1383 + //
1384 + // - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
1385 + // - If stepper drivers time out, it will need X and Y homing again before Z homing.
1386 + // - Move the Z probe (or nozzle) to a defined XY point before Z Homing.
1387 + // - Prevent Z homing when the Z probe is outside bed area.
1388 + //
1389 + #define Z_SAFE_HOMING
1390 +
1391 + #if ENABLED(Z_SAFE_HOMING)
1392 + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing
1393 + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing
1394 + #endif
1395 +
1396 + // Homing speeds (mm/min)
1397 + #define HOMING_FEEDRATE_XY (40*60)
1398 + #define HOMING_FEEDRATE_Z (8*60)
1399 +
1400 + // Validate that endstops are triggered on homing moves
1401 + #define VALIDATE_HOMING_ENDSTOPS
1402 +
1403 + // @section calibrate
1404 +
1405 + /**
1406 + * Bed Skew Compensation
1407 + *
1408 + * This feature corrects for misalignment in the XYZ axes.
1409 + *
1410 + * Take the following steps to get the bed skew in the XY plane:
1411 + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
1412 + * 2. For XY_DIAG_AC measure the diagonal A to C
1413 + * 3. For XY_DIAG_BD measure the diagonal B to D
1414 + * 4. For XY_SIDE_AD measure the edge A to D
1415 + *
1416 + * Marlin automatically computes skew factors from these measurements.
1417 + * Skew factors may also be computed and set manually:
1418 + *
1419 + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
1420 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))
1421 + *
1422 + * If desired, follow the same procedure for XZ and YZ.
1423 + * Use these diagrams for reference:
1424 + *
1425 + * Y Z Z
1426 + * ^ B-------C ^ B-------C ^ B-------C
1427 + * | / / | / / | / /
1428 + * | / / | / / | / /
1429 + * | A-------D | A-------D | A-------D
1430 + * +-------------->X +-------------->X +-------------->Y
1431 + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR
1432 + */
1433 + //#define SKEW_CORRECTION
1434 +
1435 + #if ENABLED(SKEW_CORRECTION)
1436 + // Input all length measurements here:
1437 + #define XY_DIAG_AC 282.8427124746
1438 + #define XY_DIAG_BD 282.8427124746
1439 + #define XY_SIDE_AD 200
1440 +
1441 + // Or, set the default skew factors directly here
1442 + // to override the above measurements:
1443 + #define XY_SKEW_FACTOR 0.0
1444 +
1445 + //#define SKEW_CORRECTION_FOR_Z
1446 + #if ENABLED(SKEW_CORRECTION_FOR_Z)
1447 + #define XZ_DIAG_AC 282.8427124746
1448 + #define XZ_DIAG_BD 282.8427124746
1449 + #define YZ_DIAG_AC 282.8427124746
1450 + #define YZ_DIAG_BD 282.8427124746
1451 + #define YZ_SIDE_AD 200
1452 + #define XZ_SKEW_FACTOR 0.0
1453 + #define YZ_SKEW_FACTOR 0.0
1454 + #endif
1455 +
1456 + // Enable this option for M852 to set skew at runtime
1457 + //#define SKEW_CORRECTION_GCODE
1458 + #endif
1459 +
1460 + //=============================================================================
1461 + //============================= Additional Features ===========================
1462 + //=============================================================================
1463 +
1464 + // @section extras
1465 +
1466 + /**
1467 + * EEPROM
1468 + *
1469 + * Persistent storage to preserve configurable settings across reboots.
1470 + *
1471 + * M500 - Store settings to EEPROM.
1472 + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes)
1473 + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)
1474 + */
1475 + #define EEPROM_SETTINGS // Persistent storage with M500 and M501
1476 + //#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
1477 + #define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
1478 + #define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
1479 + #if ENABLED(EEPROM_SETTINGS)
1480 + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
1481 + #endif
1482 +
1483 + //
1484 + // Host Keepalive
1485 + //
1486 + // When enabled Marlin will send a busy status message to the host
1487 + // every couple of seconds when it can't accept commands.
1488 + //
1489 + #define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages
1490 + #define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113.
1491 + #define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating
1492 +
1493 + //
1494 + // G20/G21 Inch mode support
1495 + //
1496 + //#define INCH_MODE_SUPPORT
1497 +
1498 + //
1499 + // M149 Set temperature units support
1500 + //
1501 + //#define TEMPERATURE_UNITS_SUPPORT
1502 +
1503 + // @section temperature
1504 +
1505 + // Preheat Constants
1506 + #define PREHEAT_1_LABEL "PLA"
1507 + #define PREHEAT_1_TEMP_HOTEND 200
1508 + #define PREHEAT_1_TEMP_BED 70
1509 + #define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
1510 +
1511 + #define PREHEAT_2_LABEL "ABS"
1512 + #define PREHEAT_2_TEMP_HOTEND 240
1513 + #define PREHEAT_2_TEMP_BED 110
1514 + #define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
1515 +
1516 + /**
1517 + * Nozzle Park
1518 + *
1519 + * Park the nozzle at the given XYZ position on idle or G27.
1520 + *
1521 + * The "P" parameter controls the action applied to the Z axis:
1522 + *
1523 + * P0 (Default) If Z is below park Z raise the nozzle.
1524 + * P1 Raise the nozzle always to Z-park height.
1525 + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
1526 + */
1527 + //#define NOZZLE_PARK_FEATURE
1528 +
1529 + #if ENABLED(NOZZLE_PARK_FEATURE)
1530 + // Specify a park position as { X, Y, Z_raise }
1531 + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
1532 + //#define NOZZLE_PARK_X_ONLY // X move only is required to park
1533 + //#define NOZZLE_PARK_Y_ONLY // Y move only is required to park
1534 + #define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance
1535 + #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
1536 + #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers)
1537 + #endif
1538 +
1539 + /**
1540 + * Clean Nozzle Feature -- EXPERIMENTAL
1541 + *
1542 + * Adds the G12 command to perform a nozzle cleaning process.
1543 + *
1544 + * Parameters:
1545 + * P Pattern
1546 + * S Strokes / Repetitions
1547 + * T Triangles (P1 only)
1548 + *
1549 + * Patterns:
1550 + * P0 Straight line (default). This process requires a sponge type material
1551 + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
1552 + * between the start / end points.
1553 + *
1554 + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
1555 + * number of zig-zag triangles to do. "S" defines the number of strokes.
1556 + * Zig-zags are done in whichever is the narrower dimension.
1557 + * For example, "G12 P1 S1 T3" will execute:
1558 + *
1559 + * --
1560 + * | (X0, Y1) | /\ /\ /\ | (X1, Y1)
1561 + * | | / \ / \ / \ |
1562 + * A | | / \ / \ / \ |
1563 + * | | / \ / \ / \ |
1564 + * | (X0, Y0) | / \/ \/ \ | (X1, Y0)
1565 + * -- +--------------------------------+
1566 + * |________|_________|_________|
1567 + * T1 T2 T3
1568 + *
1569 + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
1570 + * "R" specifies the radius. "S" specifies the stroke count.
1571 + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
1572 + *
1573 + * Caveats: The ending Z should be the same as starting Z.
1574 + * Attention: EXPERIMENTAL. G-code arguments may change.
1575 + */
1576 + //#define NOZZLE_CLEAN_FEATURE
1577 +
1578 + #if ENABLED(NOZZLE_CLEAN_FEATURE)
1579 + // Default number of pattern repetitions
1580 + #define NOZZLE_CLEAN_STROKES 12
1581 +
1582 + // Default number of triangles
1583 + #define NOZZLE_CLEAN_TRIANGLES 3
1584 +
1585 + // Specify positions for each tool as { { X, Y, Z }, { X, Y, Z } }
1586 + // Dual hotend system may use { { -20, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { 420, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
1587 + #define NOZZLE_CLEAN_START_POINT { { 30, 30, (Z_MIN_POS + 1) } }
1588 + #define NOZZLE_CLEAN_END_POINT { { 100, 60, (Z_MIN_POS + 1) } }
1589 +
1590 + // Circular pattern radius
1591 + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
1592 + // Circular pattern circle fragments number
1593 + #define NOZZLE_CLEAN_CIRCLE_FN 10
1594 + // Middle point of circle
1595 + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
1596 +
1597 + // Move the nozzle to the initial position after cleaning
1598 + #define NOZZLE_CLEAN_GOBACK
1599 +
1600 + // For a purge/clean station that's always at the gantry height (thus no Z move)
1601 + //#define NOZZLE_CLEAN_NO_Z
1602 +
1603 + // For a purge/clean station mounted on the X axis
1604 + //#define NOZZLE_CLEAN_NO_Y
1605 +
1606 + // Explicit wipe G-code script applies to a G12 with no arguments.
1607 + //#define WIPE_SEQUENCE_COMMANDS "G1 X-17 Y25 Z10 F4000\nG1 Z1\nM114\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 X-17 Y25\nG1 X-17 Y95\nG1 Z15\nM400\nG0 X-10.0 Y-9.0"
1608 +
1609 + #endif
1610 +
1611 + /**
1612 + * Print Job Timer
1613 + *
1614 + * Automatically start and stop the print job timer on M104/M109/M190.
1615 + *
1616 + * M104 (hotend, no wait) - high temp = none, low temp = stop timer
1617 + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer
1618 + * M190 (bed, wait) - high temp = start timer, low temp = none
1619 + *
1620 + * The timer can also be controlled with the following commands:
1621 + *
1622 + * M75 - Start the print job timer
1623 + * M76 - Pause the print job timer
1624 + * M77 - Stop the print job timer
1625 + */
1626 + #define PRINTJOB_TIMER_AUTOSTART
1627 +
1628 + /**
1629 + * Print Counter
1630 + *
1631 + * Track statistical data such as:
1632 + *
1633 + * - Total print jobs
1634 + * - Total successful print jobs
1635 + * - Total failed print jobs
1636 + * - Total time printing
1637 + *
1638 + * View the current statistics with M78.
1639 + */
1640 + //#define PRINTCOUNTER
1641 +
1642 + /**
1643 + * Password
1644 + *
1645 + * Set a numerical password for the printer which can be requested:
1646 + *
1647 + * - When the printer boots up
1648 + * - Upon opening the 'Print from Media' Menu
1649 + * - When SD printing is completed or aborted
1650 + *
1651 + * The following G-codes can be used:
1652 + *
1653 + * M510 - Lock Printer. Blocks all commands except M511.
1654 + * M511 - Unlock Printer.
1655 + * M512 - Set, Change and Remove Password.
1656 + *
1657 + * If you forget the password and get locked out you'll need to re-flash
1658 + * the firmware with the feature disabled, reset EEPROM, and (optionally)
1659 + * re-flash the firmware again with this feature enabled.
1660 + */
1661 + //#define PASSWORD_FEATURE
1662 + #if ENABLED(PASSWORD_FEATURE)
1663 + #define PASSWORD_LENGTH 4 // (#) Number of digits (1-9). 3 or 4 is recommended
1664 + #define PASSWORD_ON_STARTUP
1665 + #define PASSWORD_UNLOCK_GCODE // Unlock with the M511 P<password> command. Disable to prevent brute-force attack.
1666 + #define PASSWORD_CHANGE_GCODE // Change the password with M512 P<old> S<new>.
1667 + //#define PASSWORD_ON_SD_PRINT_MENU // This does not prevent gcodes from running
1668 + //#define PASSWORD_AFTER_SD_PRINT_END
1669 + //#define PASSWORD_AFTER_SD_PRINT_ABORT
1670 + //#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE
1671 + #endif
1672 +
1673 + //=============================================================================
1674 + //============================= LCD and SD support ============================
1675 + //=============================================================================
1676 +
1677 + // @section lcd
1678 +
1679 + /**
1680 + * LCD LANGUAGE
1681 + *
1682 + * Select the language to display on the LCD. These languages are available:
1683 + *
1684 + * en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, hu, it,
1685 + * jp_kana, ko_KR, nl, pl, pt, pt_br, ro, ru, sk, tr, uk, vi, zh_CN, zh_TW, test
1686 + *
1687 + * :{ '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', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }
1688 + */
1689 + #define LCD_LANGUAGE en
1690 +
1691 + /**
1692 + * LCD Character Set
1693 + *
1694 + * Note: This option is NOT applicable to Graphical Displays.
1695 + *
1696 + * All character-based LCDs provide ASCII plus one of these
1697 + * language extensions:
1698 + *
1699 + * - JAPANESE ... the most common
1700 + * - WESTERN ... with more accented characters
1701 + * - CYRILLIC ... for the Russian language
1702 + *
1703 + * To determine the language extension installed on your controller:
1704 + *
1705 + * - Compile and upload with LCD_LANGUAGE set to 'test'
1706 + * - Click the controller to view the LCD menu
1707 + * - The LCD will display Japanese, Western, or Cyrillic text
1708 + *
1709 + * See https://marlinfw.org/docs/development/lcd_language.html
1710 + *
1711 + * :['JAPANESE', 'WESTERN', 'CYRILLIC']
1712 + */
1713 + #define DISPLAY_CHARSET_HD44780 WESTERN
1714 +
1715 + /**
1716 + * Info Screen Style (0:Classic, 1:Průša)
1717 + *
1718 + * :[0:'Classic', 1:'Průša']
1719 + */
1720 + #define LCD_INFO_SCREEN_STYLE 0
1721 +
1722 + /**
1723 + * SD CARD
1724 + *
1725 + * SD Card support is disabled by default. If your controller has an SD slot,
1726 + * you must uncomment the following option or it won't work.
1727 + */
1728 + #define SDSUPPORT
1729 +
1730 + /**
1731 + * SD CARD: SPI SPEED
1732 + *
1733 + * Enable one of the following items for a slower SPI transfer speed.
1734 + * This may be required to resolve "volume init" errors.
1735 + */
1736 + //#define SPI_SPEED SPI_HALF_SPEED
1737 + //#define SPI_SPEED SPI_QUARTER_SPEED
1738 + //#define SPI_SPEED SPI_EIGHTH_SPEED
1739 +
1740 + /**
1741 + * SD CARD: ENABLE CRC
1742 + *
1743 + * Use CRC checks and retries on the SD communication.
1744 + */
1745 + //#define SD_CHECK_AND_RETRY
1746 +
1747 + /**
1748 + * LCD Menu Items
1749 + *
1750 + * Disable all menus and only display the Status Screen, or
1751 + * just remove some extraneous menu items to recover space.
1752 + */
1753 + //#define NO_LCD_MENUS
1754 + //#define SLIM_LCD_MENUS
1755 +
1756 + //
1757 + // ENCODER SETTINGS
1758 + //
1759 + // This option overrides the default number of encoder pulses needed to
1760 + // produce one step. Should be increased for high-resolution encoders.
1761 + //
1762 + //#define ENCODER_PULSES_PER_STEP 4
1763 +
1764 + //
1765 + // Use this option to override the number of step signals required to
1766 + // move between next/prev menu items.
1767 + //
1768 + //#define ENCODER_STEPS_PER_MENU_ITEM 1
1769 +
1770 + /**
1771 + * Encoder Direction Options
1772 + *
1773 + * Test your encoder's behavior first with both options disabled.
1774 + *
1775 + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
1776 + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION.
1777 + * Reversed Value Editing only? Enable BOTH options.
1778 + */
1779 +
1780 + //
1781 + // This option reverses the encoder direction everywhere.
1782 + //
1783 + // Set this option if CLOCKWISE causes values to DECREASE
1784 + //
1785 + //#define REVERSE_ENCODER_DIRECTION
1786 +
1787 + //
1788 + // This option reverses the encoder direction for navigating LCD menus.
1789 + //
1790 + // If CLOCKWISE normally moves DOWN this makes it go UP.
1791 + // If CLOCKWISE normally moves UP this makes it go DOWN.
1792 + //
1793 + //#define REVERSE_MENU_DIRECTION
1794 +
1795 + //
1796 + // This option reverses the encoder direction for Select Screen.
1797 + //
1798 + // If CLOCKWISE normally moves LEFT this makes it go RIGHT.
1799 + // If CLOCKWISE normally moves RIGHT this makes it go LEFT.
1800 + //
1801 + //#define REVERSE_SELECT_DIRECTION
1802 +
1803 + //
1804 + // Individual Axis Homing
1805 + //
1806 + // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
1807 + //
1808 + //#define INDIVIDUAL_AXIS_HOMING_MENU
1809 +
1810 + //
1811 + // SPEAKER/BUZZER
1812 + //
1813 + // If you have a speaker that can produce tones, enable it here.
1814 + // By default Marlin assumes you have a buzzer with a fixed frequency.
1815 + //
1816 + #define SPEAKER
1817 +
1818 + //
1819 + // The duration and frequency for the UI feedback sound.
1820 + // Set these to 0 to disable audio feedback in the LCD menus.
1821 + //
1822 + // Note: Test audio output with the G-Code:
1823 + // M300 S<frequency Hz> P<duration ms>
1824 + //
1825 + //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
1826 + //#define LCD_FEEDBACK_FREQUENCY_HZ 5000
1827 +
1828 + //=============================================================================
1829 + //======================== LCD / Controller Selection =========================
1830 + //======================== (Character-based LCDs) =========================
1831 + //=============================================================================
1832 +
1833 + //
1834 + // RepRapDiscount Smart Controller.
1835 + // https://reprap.org/wiki/RepRapDiscount_Smart_Controller
1836 + //
1837 + // Note: Usually sold with a white PCB.
1838 + //
1839 + //#define REPRAP_DISCOUNT_SMART_CONTROLLER
1840 +
1841 + //
1842 + // Original RADDS LCD Display+Encoder+SDCardReader
1843 + // http://doku.radds.org/dokumentation/lcd-display/
1844 + //
1845 + //#define RADDS_DISPLAY
1846 +
1847 + //
1848 + // ULTIMAKER Controller.
1849 + //
1850 + //#define ULTIMAKERCONTROLLER
1851 +
1852 + //
1853 + // ULTIPANEL as seen on Thingiverse.
1854 + //
1855 + //#define ULTIPANEL
1856 +
1857 + //
1858 + // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
1859 + // https://reprap.org/wiki/PanelOne
1860 + //
1861 + //#define PANEL_ONE
1862 +
1863 + //
1864 + // GADGETS3D G3D LCD/SD Controller
1865 + // https://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
1866 + //
1867 + // Note: Usually sold with a blue PCB.
1868 + //
1869 + //#define G3D_PANEL
1870 +
1871 + //
1872 + // RigidBot Panel V1.0
1873 + // http://www.inventapart.com/
1874 + //
1875 + //#define RIGIDBOT_PANEL
1876 +
1877 + //
1878 + // Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
1879 + // https://www.aliexpress.com/item/32765887917.html
1880 + //
1881 + //#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
1882 +
1883 + //
1884 + // ANET and Tronxy 20x4 Controller
1885 + //
1886 + //#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
1887 + // This LCD is known to be susceptible to electrical interference
1888 + // which scrambles the display. Pressing any button clears it up.
1889 + // This is a LCD2004 display with 5 analog buttons.
1890 +
1891 + //
1892 + // Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD.
1893 + //
1894 + //#define ULTRA_LCD
1895 +
1896 + //=============================================================================
1897 + //======================== LCD / Controller Selection =========================
1898 + //===================== (I2C and Shift-Register LCDs) =====================
1899 + //=============================================================================
1900 +
1901 + //
1902 + // CONTROLLER TYPE: I2C
1903 + //
1904 + // Note: These controllers require the installation of Arduino's LiquidCrystal_I2C
1905 + // library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C
1906 + //
1907 +
1908 + //
1909 + // Elefu RA Board Control Panel
1910 + // http://www.elefu.com/index.php?route=product/product&product_id=53
1911 + //
1912 + //#define RA_CONTROL_PANEL
1913 +
1914 + //
1915 + // Sainsmart (YwRobot) LCD Displays
1916 + //
1917 + // These require F.Malpartida's LiquidCrystal_I2C library
1918 + // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
1919 + //
1920 + //#define LCD_SAINSMART_I2C_1602
1921 + //#define LCD_SAINSMART_I2C_2004
1922 +
1923 + //
1924 + // Generic LCM1602 LCD adapter
1925 + //
1926 + //#define LCM1602
1927 +
1928 + //
1929 + // PANELOLU2 LCD with status LEDs,
1930 + // separate encoder and click inputs.
1931 + //
1932 + // Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later.
1933 + // For more info: https://github.com/lincomatic/LiquidTWI2
1934 + //
1935 + // Note: The PANELOLU2 encoder click input can either be directly connected to
1936 + // a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
1937 + //
1938 + //#define LCD_I2C_PANELOLU2
1939 +
1940 + //
1941 + // Panucatt VIKI LCD with status LEDs,
1942 + // integrated click & L/R/U/D buttons, separate encoder inputs.
1943 + //
1944 + //#define LCD_I2C_VIKI
1945 +
1946 + //
1947 + // CONTROLLER TYPE: Shift register panels
1948 + //
1949 +
1950 + //
1951 + // 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH
1952 + // LCD configuration: https://reprap.org/wiki/SAV_3D_LCD
1953 + //
1954 + //#define SAV_3DLCD
1955 +
1956 + //
1957 + // 3-wire SR LCD with strobe using 74HC4094
1958 + // https://github.com/mikeshub/SailfishLCD
1959 + // Uses the code directly from Sailfish
1960 + //
1961 + //#define FF_INTERFACEBOARD
1962 +
1963 + //
1964 + // TFT GLCD Panel with Marlin UI
1965 + // Panel connected to main board by SPI or I2C interface.
1966 + // See https://github.com/Serhiy-K/TFTGLCDAdapter
1967 + //
1968 + //#define TFTGLCD_PANEL_SPI
1969 + //#define TFTGLCD_PANEL_I2C
1970 +
1971 + //=============================================================================
1972 + //======================= LCD / Controller Selection =======================
1973 + //========================= (Graphical LCDs) ========================
1974 + //=============================================================================
1975 +
1976 + //
1977 + // CONTROLLER TYPE: Graphical 128x64 (DOGM)
1978 + //
1979 + // IMPORTANT: The U8glib library is required for Graphical Display!
1980 + // https://github.com/olikraus/U8glib_Arduino
1981 + //
1982 + // NOTE: If the LCD is unresponsive you may need to reverse the plugs.
1983 + //
1984 +
1985 + //
1986 + // RepRapDiscount FULL GRAPHIC Smart Controller
1987 + // https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
1988 + //
1989 + //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
1990 +
1991 + //
1992 + // ReprapWorld Graphical LCD
1993 + // https://reprapworld.com/?products_details&products_id/1218
1994 + //
1995 + //#define REPRAPWORLD_GRAPHICAL_LCD
1996 +
1997 + //
1998 + // Activate one of these if you have a Panucatt Devices
1999 + // Viki 2.0 or mini Viki with Graphic LCD
2000 + // https://www.panucatt.com
2001 + //
2002 + //#define VIKI2
2003 + //#define miniVIKI
2004 +
2005 + //
2006 + // MakerLab Mini Panel with graphic
2007 + // controller and SD support - https://reprap.org/wiki/Mini_panel
2008 + //
2009 + //#define MINIPANEL
2010 +
2011 + //
2012 + // MaKr3d Makr-Panel with graphic controller and SD support.
2013 + // https://reprap.org/wiki/MaKr3d_MaKrPanel
2014 + //
2015 + //#define MAKRPANEL
2016 +
2017 + //
2018 + // Adafruit ST7565 Full Graphic Controller.
2019 + // https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
2020 + //
2021 + //#define ELB_FULL_GRAPHIC_CONTROLLER
2022 +
2023 + //
2024 + // BQ LCD Smart Controller shipped by
2025 + // default with the BQ Hephestos 2 and Witbox 2.
2026 + //
2027 + //#define BQ_LCD_SMART_CONTROLLER
2028 +
2029 + //
2030 + // Cartesio UI
2031 + // http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
2032 + //
2033 + //#define CARTESIO_UI
2034 +
2035 + //
2036 + // LCD for Melzi Card with Graphical LCD
2037 + //
2038 + //#define LCD_FOR_MELZI
2039 +
2040 + //
2041 + // Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder
2042 + // https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1)
2043 + //
2044 + //#define ULTI_CONTROLLER
2045 +
2046 + //
2047 + // MKS MINI12864 with graphic controller and SD support
2048 + // https://reprap.org/wiki/MKS_MINI_12864
2049 + //
2050 + //#define MKS_MINI_12864
2051 +
2052 + //
2053 + // MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout.
2054 + // https://www.aliexpress.com/item/33018110072.html
2055 + //
2056 + //#define MKS_LCD12864
2057 +
2058 + //
2059 + // FYSETC variant of the MINI12864 graphic controller with SD support
2060 + // https://wiki.fysetc.com/Mini12864_Panel/
2061 + //
2062 + //#define FYSETC_MINI_12864_X_X // Type C/D/E/F. No tunable RGB Backlight by default
2063 + //#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on)
2064 + //#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight
2065 + //#define FYSETC_MINI_12864_2_1 // Type A/B. NeoPixel RGB Backlight
2066 + //#define FYSETC_GENERIC_12864_1_1 // Larger display with basic ON/OFF backlight.
2067 +
2068 + //
2069 + // Factory display for Creality CR-10
2070 + // https://www.aliexpress.com/item/32833148327.html
2071 + //
2072 + // This is RAMPS-compatible using a single 10-pin connector.
2073 + // (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
2074 + //
2075 + #define CR10_STOCKDISPLAY
2076 +
2077 + //
2078 + // Ender-2 OEM display, a variant of the MKS_MINI_12864
2079 + //
2080 + //#define ENDER2_STOCKDISPLAY
2081 +
2082 + //
2083 + // ANET and Tronxy Graphical Controller
2084 + //
2085 + // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
2086 + // A clone of the RepRapDiscount full graphics display but with
2087 + // different pins/wiring (see pins_ANET_10.h).
2088 + //
2089 + //#define ANET_FULL_GRAPHICS_LCD
2090 +
2091 + //
2092 + // AZSMZ 12864 LCD with SD
2093 + // https://www.aliexpress.com/item/32837222770.html
2094 + //
2095 + //#define AZSMZ_12864
2096 +
2097 + //
2098 + // Silvergate GLCD controller
2099 + // https://github.com/android444/Silvergate
2100 + //
2101 + //#define SILVER_GATE_GLCD_CONTROLLER
2102 +
2103 + //=============================================================================
2104 + //============================== OLED Displays ==============================
2105 + //=============================================================================
2106 +
2107 + //
2108 + // SSD1306 OLED full graphics generic display
2109 + //
2110 + //#define U8GLIB_SSD1306
2111 +
2112 + //
2113 + // SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
2114 + //
2115 + //#define SAV_3DGLCD
2116 + #if ENABLED(SAV_3DGLCD)
2117 + #define U8GLIB_SSD1306
2118 + //#define U8GLIB_SH1106
2119 + #endif
2120 +
2121 + //
2122 + // TinyBoy2 128x64 OLED / Encoder Panel
2123 + //
2124 + //#define OLED_PANEL_TINYBOY2
2125 +
2126 + //
2127 + // MKS OLED 1.3" 128×64 FULL GRAPHICS CONTROLLER
2128 + // https://reprap.org/wiki/MKS_12864OLED
2129 + //
2130 + // Tiny, but very sharp OLED display
2131 + //
2132 + //#define MKS_12864OLED // Uses the SH1106 controller (default)
2133 + //#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
2134 +
2135 + //
2136 + // Zonestar OLED 128×64 FULL GRAPHICS CONTROLLER
2137 + //
2138 + //#define ZONESTAR_12864LCD // Graphical (DOGM) with ST7920 controller
2139 + //#define ZONESTAR_12864OLED // 1.3" OLED with SH1106 controller (default)
2140 + //#define ZONESTAR_12864OLED_SSD1306 // 0.96" OLED with SSD1306 controller
2141 +
2142 + //
2143 + // Einstart S OLED SSD1306
2144 + //
2145 + //#define U8GLIB_SH1106_EINSTART
2146 +
2147 + //
2148 + // Overlord OLED display/controller with i2c buzzer and LEDs
2149 + //
2150 + //#define OVERLORD_OLED
2151 +
2152 + //
2153 + // FYSETC OLED 2.42" 128×64 FULL GRAPHICS CONTROLLER with WS2812 RGB
2154 + // Where to find : https://www.aliexpress.com/item/4000345255731.html
2155 + //#define FYSETC_242_OLED_12864 // Uses the SSD1309 controller
2156 +
2157 + //=============================================================================
2158 + //========================== Extensible UI Displays ===========================
2159 + //=============================================================================
2160 +
2161 + //
2162 + // DGUS Touch Display with DWIN OS. (Choose one.)
2163 + // ORIGIN : https://www.aliexpress.com/item/32993409517.html
2164 + // FYSETC : https://www.aliexpress.com/item/32961471929.html
2165 + //
2166 + //#define DGUS_LCD_UI_ORIGIN
2167 + //#define DGUS_LCD_UI_FYSETC
2168 + //#define DGUS_LCD_UI_HIPRECY
2169 +
2170 + //
2171 + // Touch-screen LCD for Malyan M200/M300 printers
2172 + //
2173 + //#define MALYAN_LCD
2174 + #if ENABLED(MALYAN_LCD)
2175 + #define LCD_SERIAL_PORT 1 // Default is 1 for Malyan M200
2176 + #endif
2177 +
2178 + //
2179 + // Touch UI for FTDI EVE (FT800/FT810) displays
2180 + // See Configuration_adv.h for all configuration options.
2181 + //
2182 + //#define TOUCH_UI_FTDI_EVE
2183 +
2184 + //
2185 + // Touch-screen LCD for Anycubic printers
2186 + //
2187 + //#define ANYCUBIC_LCD_I3MEGA
2188 + //#define ANYCUBIC_LCD_CHIRON
2189 + #if EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON)
2190 + #define LCD_SERIAL_PORT 3 // Default is 3 for Anycubic
2191 + //#define ANYCUBIC_LCD_DEBUG
2192 + #endif
2193 +
2194 + //
2195 + // Third-party or vendor-customized controller interfaces.
2196 + // Sources should be installed in 'src/lcd/extensible_ui'.
2197 + //
2198 + //#define EXTENSIBLE_UI
2199 +
2200 + #if ENABLED(EXTENSIBLE_UI)
2201 + //#define EXTUI_LOCAL_BEEPER // Enables use of local Beeper pin with external display
2202 + #endif
2203 +
2204 + //=============================================================================
2205 + //=============================== Graphical TFTs ==============================
2206 + //=============================================================================
2207 +
2208 + /**
2209 + * TFT Type - Select your Display type
2210 + *
2211 + * Available options are:
2212 + * MKS_TS35_V2_0,
2213 + * MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35,
2214 + * MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R
2215 + * TFT_TRONXY_X5SA, ANYCUBIC_TFT35, LONGER_LK_TFT28
2216 + * TFT_GENERIC
2217 + *
2218 + * For TFT_GENERIC, you need to configure these 3 options:
2219 + * Driver: TFT_DRIVER
2220 + * Current Drivers are: AUTO, ST7735, ST7789, ST7796, R61505, ILI9328, ILI9341, ILI9488
2221 + * Resolution: TFT_WIDTH and TFT_HEIGHT
2222 + * Interface: TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI
2223 + */
2224 + //#define TFT_GENERIC
2225 +
2226 + /**
2227 + * TFT UI - User Interface Selection. Enable one of the following options:
2228 + *
2229 + * TFT_CLASSIC_UI - Emulated DOGM - 128x64 Upscaled
2230 + * TFT_COLOR_UI - Marlin Default Menus, Touch Friendly, using full TFT capabilities
2231 + * TFT_LVGL_UI - A Modern UI using LVGL
2232 + *
2233 + * For LVGL_UI also copy the 'assets' folder from the build directory to the
2234 + * root of your SD card, together with the compiled firmware.
2235 + */
2236 + //#define TFT_CLASSIC_UI
2237 + //#define TFT_COLOR_UI
2238 + //#define TFT_LVGL_UI
2239 +
2240 + /**
2241 + * TFT Rotation. Set to one of the following values:
2242 + *
2243 + * TFT_ROTATE_90, TFT_ROTATE_90_MIRROR_X, TFT_ROTATE_90_MIRROR_Y,
2244 + * TFT_ROTATE_180, TFT_ROTATE_180_MIRROR_X, TFT_ROTATE_180_MIRROR_Y,
2245 + * TFT_ROTATE_270, TFT_ROTATE_270_MIRROR_X, TFT_ROTATE_270_MIRROR_Y,
2246 + * TFT_MIRROR_X, TFT_MIRROR_Y, TFT_NO_ROTATION
2247 + */
2248 + //#define TFT_ROTATION TFT_NO_ROTATION
2249 +
2250 + //=============================================================================
2251 + //============================ Other Controllers ============================
2252 + //=============================================================================
2253 +
2254 + //
2255 + // Ender-3 v2 OEM display. A DWIN display with Rotary Encoder.
2256 + //
2257 + //#define DWIN_CREALITY_LCD
2258 +
2259 + //
2260 + // ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8
2261 + //
2262 + //#define TOUCH_SCREEN
2263 + #if ENABLED(TOUCH_SCREEN)
2264 + #define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
2265 + #define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus
2266 +
2267 + #define TOUCH_SCREEN_CALIBRATION
2268 +
2269 + //#define XPT2046_X_CALIBRATION 12316
2270 + //#define XPT2046_Y_CALIBRATION -8981
2271 + //#define XPT2046_X_OFFSET -43
2272 + //#define XPT2046_Y_OFFSET 257
2273 + #endif
2274 +
2275 + //
2276 + // RepRapWorld REPRAPWORLD_KEYPAD v1.1
2277 + // https://reprapworld.com/products/electronics/ramps/keypad_v1_0_fully_assembled/
2278 + //
2279 + //#define REPRAPWORLD_KEYPAD
2280 + //#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 // (mm) Distance to move per key-press
2281 +
2282 + //=============================================================================
2283 + //=============================== Extra Features ==============================
2284 + //=============================================================================
2285 +
2286 + // @section extras
2287 +
2288 + // Set number of user-controlled fans. Disable to use all board-defined fans.
2289 + // :[1,2,3,4,5,6,7,8]
2290 + //#define NUM_M106_FANS 1
2291 +
2292 + // Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
2293 + //#define FAST_PWM_FAN
2294 +
2295 + // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
2296 + // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
2297 + // is too low, you should also increment SOFT_PWM_SCALE.
2298 + //#define FAN_SOFT_PWM
2299 +
2300 + // Incrementing this by 1 will double the software PWM frequency,
2301 + // affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
2302 + // However, control resolution will be halved for each increment;
2303 + // at zero value, there are 128 effective control positions.
2304 + // :[0,1,2,3,4,5,6,7]
2305 + #define SOFT_PWM_SCALE 0
2306 +
2307 + // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
2308 + // be used to mitigate the associated resolution loss. If enabled,
2309 + // some of the PWM cycles are stretched so on average the desired
2310 + // duty cycle is attained.
2311 + //#define SOFT_PWM_DITHER
2312 +
2313 + // Temperature status LEDs that display the hotend and bed temperature.
2314 + // If all hotends, bed temperature, and target temperature are under 54C
2315 + // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2316 + //#define TEMP_STAT_LEDS
2317 +
2318 + // Support for the BariCUDA Paste Extruder
2319 + //#define BARICUDA
2320 +
2321 + // Support for BlinkM/CyzRgb
2322 + //#define BLINKM
2323 +
2324 + // Support for PCA9632 PWM LED driver
2325 + //#define PCA9632
2326 +
2327 + // Support for PCA9533 PWM LED driver
2328 + //#define PCA9533
2329 +
2330 + /**
2331 + * RGB LED / LED Strip Control
2332 + *
2333 + * Enable support for an RGB LED connected to 5V digital pins, or
2334 + * an RGB Strip connected to MOSFETs controlled by digital pins.
2335 + *
2336 + * Adds the M150 command to set the LED (or LED strip) color.
2337 + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
2338 + * luminance values can be set from 0 to 255.
2339 + * For NeoPixel LED an overall brightness parameter is also available.
2340 + *
2341 + * *** CAUTION ***
2342 + * LED Strips require a MOSFET Chip between PWM lines and LEDs,
2343 + * as the Arduino cannot handle the current the LEDs will require.
2344 + * Failure to follow this precaution can destroy your Arduino!
2345 + * NOTE: A separate 5V power supply is required! The NeoPixel LED needs
2346 + * more current than the Arduino 5V linear regulator can produce.
2347 + * *** CAUTION ***
2348 + *
2349 + * LED Type. Enable only one of the following two options.
2350 + */
2351 + //#define RGB_LED
2352 + //#define RGBW_LED
2353 +
2354 + #if EITHER(RGB_LED, RGBW_LED)
2355 + //#define RGB_LED_R_PIN 34
2356 + //#define RGB_LED_G_PIN 43
2357 + //#define RGB_LED_B_PIN 35
2358 + //#define RGB_LED_W_PIN -1
2359 + #endif
2360 +
2361 + // Support for Adafruit NeoPixel LED driver
2362 + //#define NEOPIXEL_LED
2363 + #if ENABLED(NEOPIXEL_LED)
2364 + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
2365 + #define NEOPIXEL_PIN 4 // LED driving pin
2366 + //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
2367 + //#define NEOPIXEL2_PIN 5
2368 + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.)
2369 + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
2370 + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
2371 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup
2372 +
2373 + // Support for second Adafruit NeoPixel LED driver controlled with M150 S1 ...
2374 + //#define NEOPIXEL2_SEPARATE
2375 + #if ENABLED(NEOPIXEL2_SEPARATE)
2376 + #define NEOPIXEL2_PIXELS 15 // Number of LEDs in the second strip
2377 + #define NEOPIXEL2_BRIGHTNESS 127 // Initial brightness (0-255)
2378 + #define NEOPIXEL2_STARTUP_TEST // Cycle through colors at startup
2379 + #else
2380 + //#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel
2381 + #endif
2382 +
2383 + // Use a single NeoPixel LED for static (background) lighting
2384 + //#define NEOPIXEL_BKGD_LED_INDEX 0 // Index of the LED to use
2385 + //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W
2386 + #endif
2387 +
2388 + /**
2389 + * Printer Event LEDs
2390 + *
2391 + * During printing, the LEDs will reflect the printer status:
2392 + *
2393 + * - Gradually change from blue to violet as the heated bed gets to target temp
2394 + * - Gradually change from violet to red as the hotend gets to temperature
2395 + * - Change to white to illuminate work surface
2396 + * - Change to green once print has finished
2397 + * - Turn off after the print has finished and the user has pushed a button
2398 + */
2399 + #if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
2400 + #define PRINTER_EVENT_LEDS
2401 + #endif
2402 +
2403 + /**
2404 + * Number of servos
2405 + *
2406 + * For some servo-related options NUM_SERVOS will be set automatically.
2407 + * Set this manually if there are extra servos needing manual control.
2408 + * Set to 0 to turn off servo support.
2409 + */
2410 + //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
2411 +
2412 + // (ms) Delay before the next move will start, to give the servo time to reach its target angle.
2413 + // 300ms is a good value but you can try less delay.
2414 + // If the servo can't reach the requested position, increase it.
2415 + #define SERVO_DELAY { 300 }
2416 +
2417 + // Only power servos during movement, otherwise leave off to prevent jitter
2418 + //#define DEACTIVATE_SERVOS_AFTER_MOVE
2419 +
2420 + // Edit servo angles with M281 and save to EEPROM with M500
2421 + //#define EDITABLE_SERVO_ANGLES

Configuration_adv.h(file created)

@@ -0,0 +1,3589 @@
1 + /**
2 + * Marlin 3D Printer Firmware
3 + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4 + *
5 + * Based on Sprinter and grbl.
6 + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7 + *
8 + * This program is free software: you can redistribute it and/or modify
9 + * it under the terms of the GNU General Public License as published by
10 + * the Free Software Foundation, either version 3 of the License, or
11 + * (at your option) any later version.
12 + *
13 + * This program is distributed in the hope that it will be useful,
14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 + * GNU General Public License for more details.
17 + *
18 + * You should have received a copy of the GNU General Public License
19 + * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 + *
21 + */
22 + #pragma once
23 +
24 + /**
25 + * Configuration_adv.h
26 + *
27 + * Advanced settings.
28 + * Only change these if you know exactly what you're doing.
29 + * Some of these settings can damage your printer if improperly set!
30 + *
31 + * Basic settings can be found in Configuration.h
32 + */
33 + #define CONFIGURATION_ADV_H_VERSION 020007
34 +
35 + //===========================================================================
36 + //============================= Thermal Settings ============================
37 + //===========================================================================
38 + // @section temperature
39 +
40 + /**
41 + * Thermocouple sensors are quite sensitive to noise. Any noise induced in
42 + * the sensor wires, such as by stepper motor wires run in parallel to them,
43 + * may result in the thermocouple sensor reporting spurious errors. This
44 + * value is the number of errors which can occur in a row before the error
45 + * is reported. This allows us to ignore intermittent error conditions while
46 + * still detecting an actual failure, which should result in a continuous
47 + * stream of errors from the sensor.
48 + *
49 + * Set this value to 0 to fail on the first error to occur.
50 + */
51 + #define THERMOCOUPLE_MAX_ERRORS 15
52 +
53 + //
54 + // Custom Thermistor 1000 parameters
55 + //
56 + #if TEMP_SENSOR_0 == 1000
57 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
58 + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
59 + #define HOTEND0_BETA 3950 // Beta value
60 + #endif
61 +
62 + #if TEMP_SENSOR_1 == 1000
63 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
64 + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
65 + #define HOTEND1_BETA 3950 // Beta value
66 + #endif
67 +
68 + #if TEMP_SENSOR_2 == 1000
69 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
70 + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
71 + #define HOTEND2_BETA 3950 // Beta value
72 + #endif
73 +
74 + #if TEMP_SENSOR_3 == 1000
75 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
76 + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
77 + #define HOTEND3_BETA 3950 // Beta value
78 + #endif
79 +
80 + #if TEMP_SENSOR_4 == 1000
81 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
82 + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
83 + #define HOTEND4_BETA 3950 // Beta value
84 + #endif
85 +
86 + #if TEMP_SENSOR_5 == 1000
87 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
88 + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
89 + #define HOTEND5_BETA 3950 // Beta value
90 + #endif
91 +
92 + #if TEMP_SENSOR_6 == 1000
93 + #define HOTEND6_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
94 + #define HOTEND6_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
95 + #define HOTEND6_BETA 3950 // Beta value
96 + #endif
97 +
98 + #if TEMP_SENSOR_7 == 1000
99 + #define HOTEND7_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
100 + #define HOTEND7_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
101 + #define HOTEND7_BETA 3950 // Beta value
102 + #endif
103 +
104 + #if TEMP_SENSOR_BED == 1000
105 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
106 + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
107 + #define BED_BETA 3950 // Beta value
108 + #endif
109 +
110 + #if TEMP_SENSOR_CHAMBER == 1000
111 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor
112 + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C
113 + #define CHAMBER_BETA 3950 // Beta value
114 + #endif
115 +
116 + //
117 + // Hephestos 2 24V heated bed upgrade kit.
118 + // https://store.bq.com/en/heated-bed-kit-hephestos2
119 + //
120 + //#define HEPHESTOS2_HEATED_BED_KIT
121 + #if ENABLED(HEPHESTOS2_HEATED_BED_KIT)
122 + #undef TEMP_SENSOR_BED
123 + #define TEMP_SENSOR_BED 70
124 + #define HEATER_BED_INVERTING true
125 + #endif
126 +
127 + //
128 + // Heated Bed Bang-Bang options
129 + //
130 + #if DISABLED(PIDTEMPBED)
131 + #define BED_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control
132 + #if ENABLED(BED_LIMIT_SWITCHING)
133 + #define BED_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > BED_HYSTERESIS
134 + #endif
135 + #endif
136 +
137 + //
138 + // Heated Chamber options
139 + //
140 + #if TEMP_SENSOR_CHAMBER
141 + #define CHAMBER_MINTEMP 5
142 + #define CHAMBER_MAXTEMP 60
143 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target
144 + //#define CHAMBER_LIMIT_SWITCHING
145 + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin
146 + //#define HEATER_CHAMBER_INVERTING false
147 +
148 + //#define CHAMBER_FAN // Enable a fan on the chamber
149 + #if ENABLED(CHAMBER_FAN)
150 + #define CHAMBER_FAN_MODE 2 // Fan control mode: 0=Static; 1=Linear increase when temp is higher than target; 2=V-shaped curve.
151 + #if CHAMBER_FAN_MODE == 0
152 + #define CHAMBER_FAN_BASE 255 // Chamber fan PWM (0-255)
153 + #elif CHAMBER_FAN_MODE == 1
154 + #define CHAMBER_FAN_BASE 128 // Base chamber fan PWM (0-255); turns on when chamber temperature is above the target
155 + #define CHAMBER_FAN_FACTOR 25 // PWM increase per °C above target
156 + #elif CHAMBER_FAN_MODE == 2
157 + #define CHAMBER_FAN_BASE 128 // Minimum chamber fan PWM (0-255)
158 + #define CHAMBER_FAN_FACTOR 25 // PWM increase per °C difference from target
159 + #endif
160 + #endif
161 +
162 + //#define CHAMBER_VENT // Enable a servo-controlled vent on the chamber
163 + #if ENABLED(CHAMBER_VENT)
164 + #define CHAMBER_VENT_SERVO_NR 1 // Index of the vent servo
165 + #define HIGH_EXCESS_HEAT_LIMIT 5 // How much above target temp to consider there is excess heat in the chamber
166 + #define LOW_EXCESS_HEAT_LIMIT 3
167 + #define MIN_COOLING_SLOPE_TIME_CHAMBER_VENT 20
168 + #define MIN_COOLING_SLOPE_DEG_CHAMBER_VENT 1.5
169 + #endif
170 + #endif
171 +
172 + /**
173 + * Thermal Protection provides additional protection to your printer from damage
174 + * and fire. Marlin always includes safe min and max temperature ranges which
175 + * protect against a broken or disconnected thermistor wire.
176 + *
177 + * The issue: If a thermistor falls out, it will report the much lower
178 + * temperature of the air in the room, and the the firmware will keep
179 + * the heater on.
180 + *
181 + * The solution: Once the temperature reaches the target, start observing.
182 + * If the temperature stays too far below the target (hysteresis) for too
183 + * long (period), the firmware will halt the machine as a safety precaution.
184 + *
185 + * If you get false positives for "Thermal Runaway", increase
186 + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD
187 + */
188 + #if ENABLED(THERMAL_PROTECTION_HOTENDS)
189 + #define THERMAL_PROTECTION_PERIOD 40 // Seconds
190 + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius
191 +
192 + //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops
193 + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP)
194 + //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303
195 + #endif
196 +
197 + /**
198 + * Whenever an M104, M109, or M303 increases the target temperature, the
199 + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature
200 + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and
201 + * requires a hard reset. This test restarts with any M104/M109/M303, but only
202 + * if the current temperature is far enough below the target for a reliable
203 + * test.
204 + *
205 + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD
206 + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
207 + * below 2.
208 + */
209 + #define WATCH_TEMP_PERIOD 20 // Seconds
210 + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius
211 + #endif
212 +
213 + /**
214 + * Thermal Protection parameters for the bed are just as above for hotends.
215 + */
216 + #if ENABLED(THERMAL_PROTECTION_BED)
217 + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds
218 + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
219 +
220 + /**
221 + * As described above, except for the bed (M140/M190/M303).
222 + */
223 + #define WATCH_BED_TEMP_PERIOD 60 // Seconds
224 + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
225 + #endif
226 +
227 + /**
228 + * Thermal Protection parameters for the heated chamber.
229 + */
230 + #if ENABLED(THERMAL_PROTECTION_CHAMBER)
231 + #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds
232 + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius
233 +
234 + /**
235 + * Heated chamber watch settings (M141/M191).
236 + */
237 + #define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds
238 + #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius
239 + #endif
240 +
241 + #if ENABLED(PIDTEMP)
242 + // Add an experimental additional term to the heater power, proportional to the extrusion speed.
243 + // A well-chosen Kc value should add just enough power to melt the increased material volume.
244 + //#define PID_EXTRUSION_SCALING
245 + #if ENABLED(PID_EXTRUSION_SCALING)
246 + #define DEFAULT_Kc (100) // heating power = Kc * e_speed
247 + #define LPQ_MAX_LEN 50
248 + #endif
249 +
250 + /**
251 + * Add an experimental additional term to the heater power, proportional to the fan speed.
252 + * A well-chosen Kf value should add just enough power to compensate for power-loss from the cooling fan.
253 + * You can either just add a constant compensation with the DEFAULT_Kf value
254 + * or follow the instruction below to get speed-dependent compensation.
255 + *
256 + * Constant compensation (use only with fanspeeds of 0% and 100%)
257 + * ---------------------------------------------------------------------
258 + * A good starting point for the Kf-value comes from the calculation:
259 + * kf = (power_fan * eff_fan) / power_heater * 255
260 + * where eff_fan is between 0.0 and 1.0, based on fan-efficiency and airflow to the nozzle / heater.
261 + *
262 + * Example:
263 + * Heater: 40W, Fan: 0.1A * 24V = 2.4W, eff_fan = 0.8
264 + * Kf = (2.4W * 0.8) / 40W * 255 = 12.24
265 + *
266 + * Fan-speed dependent compensation
267 + * --------------------------------
268 + * 1. To find a good Kf value, set the hotend temperature, wait for it to settle, and enable the fan (100%).
269 + * Make sure PID_FAN_SCALING_LIN_FACTOR is 0 and PID_FAN_SCALING_ALTERNATIVE_DEFINITION is not enabled.
270 + * If you see the temperature drop repeat the test, increasing the Kf value slowly, until the temperature
271 + * drop goes away. If the temperature overshoots after enabling the fan, the Kf value is too big.
272 + * 2. Note the Kf-value for fan-speed at 100%
273 + * 3. Determine a good value for PID_FAN_SCALING_MIN_SPEED, which is around the speed, where the fan starts moving.
274 + * 4. Repeat step 1. and 2. for this fan speed.
275 + * 5. Enable PID_FAN_SCALING_ALTERNATIVE_DEFINITION and enter the two identified Kf-values in
276 + * PID_FAN_SCALING_AT_FULL_SPEED and PID_FAN_SCALING_AT_MIN_SPEED. Enter the minimum speed in PID_FAN_SCALING_MIN_SPEED
277 + */
278 + //#define PID_FAN_SCALING
279 + #if ENABLED(PID_FAN_SCALING)
280 + //#define PID_FAN_SCALING_ALTERNATIVE_DEFINITION
281 + #if ENABLED(PID_FAN_SCALING_ALTERNATIVE_DEFINITION)
282 + // The alternative definition is used for an easier configuration.
283 + // Just figure out Kf at fullspeed (255) and PID_FAN_SCALING_MIN_SPEED.
284 + // DEFAULT_Kf and PID_FAN_SCALING_LIN_FACTOR are calculated accordingly.
285 +
286 + #define PID_FAN_SCALING_AT_FULL_SPEED 13.0 //=PID_FAN_SCALING_LIN_FACTOR*255+DEFAULT_Kf
287 + #define PID_FAN_SCALING_AT_MIN_SPEED 6.0 //=PID_FAN_SCALING_LIN_FACTOR*PID_FAN_SCALING_MIN_SPEED+DEFAULT_Kf
288 + #define PID_FAN_SCALING_MIN_SPEED 10.0 // Minimum fan speed at which to enable PID_FAN_SCALING
289 +
290 + #define DEFAULT_Kf (255.0*PID_FAN_SCALING_AT_MIN_SPEED-PID_FAN_SCALING_AT_FULL_SPEED*PID_FAN_SCALING_MIN_SPEED)/(255.0-PID_FAN_SCALING_MIN_SPEED)
291 + #define PID_FAN_SCALING_LIN_FACTOR (PID_FAN_SCALING_AT_FULL_SPEED-DEFAULT_Kf)/255.0
292 +
293 + #else
294 + #define PID_FAN_SCALING_LIN_FACTOR (0) // Power loss due to cooling = Kf * (fan_speed)
295 + #define DEFAULT_Kf 10 // A constant value added to the PID-tuner
296 + #define PID_FAN_SCALING_MIN_SPEED 10 // Minimum fan speed at which to enable PID_FAN_SCALING
297 + #endif
298 + #endif
299 + #endif
300 +
301 + /**
302 + * Automatic Temperature Mode
303 + *
304 + * Dynamically adjust the hotend target temperature based on planned E moves.
305 + *
306 + * (Contrast with PID_EXTRUSION_SCALING, which tracks E movement and adjusts PID
307 + * behavior using an additional kC value.)
308 + *
309 + * Autotemp is calculated by (mintemp + factor * mm_per_sec), capped to maxtemp.
310 + *
311 + * Enable Autotemp Mode with M104/M109 F<factor> S<mintemp> B<maxtemp>.
312 + * Disable by sending M104/M109 with no F parameter (or F0 with AUTOTEMP_PROPORTIONAL).
313 + */
314 + #define AUTOTEMP
315 + #if ENABLED(AUTOTEMP)
316 + #define AUTOTEMP_OLDWEIGHT 0.98
317 + // Turn on AUTOTEMP on M104/M109 by default using proportions set here
318 + //#define AUTOTEMP_PROPORTIONAL
319 + #if ENABLED(AUTOTEMP_PROPORTIONAL)
320 + #define AUTOTEMP_MIN_P 0 // (°C) Added to the target temperature
321 + #define AUTOTEMP_MAX_P 5 // (°C) Added to the target temperature
322 + #define AUTOTEMP_FACTOR_P 1 // Apply this F parameter by default (overridden by M104/M109 F)
323 + #endif
324 + #endif
325 +
326 + // Show Temperature ADC value
327 + // Enable for M105 to include ADC values read from temperature sensors.
328 + //#define SHOW_TEMP_ADC_VALUES
329 +
330 + /**
331 + * High Temperature Thermistor Support
332 + *
333 + * Thermistors able to support high temperature tend to have a hard time getting
334 + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP
335 + * will probably be caught when the heating element first turns on during the
336 + * preheating process, which will trigger a min_temp_error as a safety measure
337 + * and force stop everything.
338 + * To circumvent this limitation, we allow for a preheat time (during which,
339 + * min_temp_error won't be triggered) and add a min_temp buffer to handle
340 + * aberrant readings.
341 + *
342 + * If you want to enable this feature for your hotend thermistor(s)
343 + * uncomment and set values > 0 in the constants below
344 + */
345 +
346 + // The number of consecutive low temperature errors that can occur
347 + // before a min_temp_error is triggered. (Shouldn't be more than 10.)
348 + //#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0
349 +
350 + // The number of milliseconds a hotend will preheat before starting to check
351 + // the temperature. This value should NOT be set to the time it takes the
352 + // hot end to reach the target temperature, but the time it takes to reach
353 + // the minimum temperature your thermistor can read. The lower the better/safer.
354 + // This shouldn't need to be more than 30 seconds (30000)
355 + //#define MILLISECONDS_PREHEAT_TIME 0
356 +
357 + // @section extruder
358 +
359 + // Extruder runout prevention.
360 + // If the machine is idle and the temperature over MINTEMP
361 + // then extrude some filament every couple of SECONDS.
362 + //#define EXTRUDER_RUNOUT_PREVENT
363 + #if ENABLED(EXTRUDER_RUNOUT_PREVENT)
364 + #define EXTRUDER_RUNOUT_MINTEMP 190
365 + #define EXTRUDER_RUNOUT_SECONDS 30
366 + #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/min)
367 + #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm)
368 + #endif
369 +
370 + /**
371 + * Hotend Idle Timeout
372 + * Prevent filament in the nozzle from charring and causing a critical jam.
373 + */
374 + //#define HOTEND_IDLE_TIMEOUT
375 + #if ENABLED(HOTEND_IDLE_TIMEOUT)
376 + #define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection
377 + #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection
378 + #define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout
379 + #define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout
380 + #endif
381 +
382 + // @section temperature
383 +
384 + // Calibration for AD595 / AD8495 sensor to adjust temperature measurements.
385 + // The final temperature is calculated as (measuredTemp * GAIN) + OFFSET.
386 + #define TEMP_SENSOR_AD595_OFFSET 0.0
387 + #define TEMP_SENSOR_AD595_GAIN 1.0
388 + #define TEMP_SENSOR_AD8495_OFFSET 0.0
389 + #define TEMP_SENSOR_AD8495_GAIN 1.0
390 +
391 + /**
392 + * Controller Fan
393 + * To cool down the stepper drivers and MOSFETs.
394 + *
395 + * The fan turns on automatically whenever any driver is enabled and turns
396 + * off (or reduces to idle speed) shortly after drivers are turned off.
397 + */
398 + //#define USE_CONTROLLER_FAN
399 + #if ENABLED(USE_CONTROLLER_FAN)
400 + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
401 + //#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered
402 + //#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled.
403 + #define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
404 + #define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
405 + #define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled
406 + #define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors
407 + //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
408 + #if ENABLED(CONTROLLER_FAN_EDITABLE)
409 + #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
410 + #endif
411 + #endif
412 +
413 + // When first starting the main fan, run it at full speed for the
414 + // given number of milliseconds. This gets the fan spinning reliably
415 + // before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
416 + //#define FAN_KICKSTART_TIME 100
417 +
418 + // Some coolers may require a non-zero "off" state.
419 + //#define FAN_OFF_PWM 1
420 +
421 + /**
422 + * PWM Fan Scaling
423 + *
424 + * Define the min/max speeds for PWM fans (as set with M106).
425 + *
426 + * With these options the M106 0-255 value range is scaled to a subset
427 + * to ensure that the fan has enough power to spin, or to run lower
428 + * current fans with higher current. (e.g., 5V/12V fans with 12V/24V)
429 + * Value 0 always turns off the fan.
430 + *
431 + * Define one or both of these to override the default 0-255 range.
432 + */
433 + //#define FAN_MIN_PWM 50
434 + //#define FAN_MAX_PWM 128
435 +
436 + /**
437 + * FAST PWM FAN Settings
438 + *
439 + * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
440 + * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
441 + * frequency as close as possible to the desired frequency.
442 + *
443 + * FAST_PWM_FAN_FREQUENCY [undefined by default]
444 + * Set this to your desired frequency.
445 + * If left undefined this defaults to F = F_CPU/(2*255*1)
446 + * i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers.
447 + * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
448 + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior.
449 + *
450 + * USE_OCR2A_AS_TOP [undefined by default]
451 + * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
452 + * 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
453 + * 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
454 + * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
455 + * PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
456 + * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
457 + */
458 + #if ENABLED(FAST_PWM_FAN)
459 + //#define FAST_PWM_FAN_FREQUENCY 31400
460 + //#define USE_OCR2A_AS_TOP
461 + #endif
462 +
463 + // @section extruder
464 +
465 + /**
466 + * Extruder cooling fans
467 + *
468 + * Extruder auto fans automatically turn on when their extruders'
469 + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE.
470 + *
471 + * Your board's pins file specifies the recommended pins. Override those here
472 + * or set to -1 to disable completely.
473 + *
474 + * Multiple extruders can be assigned to the same pin in which case
475 + * the fan will turn on when any selected extruder is above the threshold.
476 + */
477 + #define E0_AUTO_FAN_PIN P2_04
478 + #define E1_AUTO_FAN_PIN -1
479 + #define E2_AUTO_FAN_PIN -1
480 + #define E3_AUTO_FAN_PIN -1
481 + #define E4_AUTO_FAN_PIN -1
482 + #define E5_AUTO_FAN_PIN -1
483 + #define E6_AUTO_FAN_PIN -1
484 + #define E7_AUTO_FAN_PIN -1
485 + #define CHAMBER_AUTO_FAN_PIN -1
486 +
487 + #define EXTRUDER_AUTO_FAN_TEMPERATURE 50
488 + #define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
489 + #define CHAMBER_AUTO_FAN_TEMPERATURE 30
490 + #define CHAMBER_AUTO_FAN_SPEED 255
491 +
492 + /**
493 + * Part-Cooling Fan Multiplexer
494 + *
495 + * This feature allows you to digitally multiplex the fan output.
496 + * The multiplexer is automatically switched at tool-change.
497 + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans.
498 + */
499 + #define FANMUX0_PIN -1
500 + #define FANMUX1_PIN -1
501 + #define FANMUX2_PIN -1
502 +
503 + /**
504 + * M355 Case Light on-off / brightness
505 + */
506 + //#define CASE_LIGHT_ENABLE
507 + #if ENABLED(CASE_LIGHT_ENABLE)
508 + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed
509 + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
510 + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
511 + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin)
512 + //#define CASE_LIGHT_MAX_PWM 128 // Limit pwm
513 + //#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
514 + //#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
515 + //#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light, requires NEOPIXEL_LED.
516 + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
517 + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
518 + #endif
519 + #endif
520 +
521 + // @section homing
522 +
523 + // If you want endstops to stay on (by default) even when not homing
524 + // enable this option. Override at any time with M120, M121.
525 + //#define ENDSTOPS_ALWAYS_ON_DEFAULT
526 +
527 + // @section extras
528 +
529 + //#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats.
530 +
531 + // Employ an external closed loop controller. Override pins here if needed.
532 + //#define EXTERNAL_CLOSED_LOOP_CONTROLLER
533 + #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
534 + //#define CLOSED_LOOP_ENABLE_PIN -1
535 + //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
536 + #endif
537 +
538 + /**
539 + * Dual Steppers / Dual Endstops
540 + *
541 + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
542 + *
543 + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
544 + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
545 + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
546 + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
547 + *
548 + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
549 + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
550 + * in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
551 + */
552 +
553 + //#define X_DUAL_STEPPER_DRIVERS
554 + #if ENABLED(X_DUAL_STEPPER_DRIVERS)
555 + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
556 + //#define X_DUAL_ENDSTOPS
557 + #if ENABLED(X_DUAL_ENDSTOPS)
558 + #define X2_USE_ENDSTOP _XMAX_
559 + #define X2_ENDSTOP_ADJUSTMENT 0
560 + #endif
561 + #endif
562 +
563 + //#define Y_DUAL_STEPPER_DRIVERS
564 + #if ENABLED(Y_DUAL_STEPPER_DRIVERS)
565 + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
566 + //#define Y_DUAL_ENDSTOPS
567 + #if ENABLED(Y_DUAL_ENDSTOPS)
568 + #define Y2_USE_ENDSTOP _YMAX_
569 + #define Y2_ENDSTOP_ADJUSTMENT 0
570 + #endif
571 + #endif
572 +
573 + //
574 + // For Z set the number of stepper drivers
575 + //
576 + #define NUM_Z_STEPPER_DRIVERS 1 // (1-4) Z options change based on how many
577 +
578 + #if NUM_Z_STEPPER_DRIVERS > 1
579 + //#define Z_MULTI_ENDSTOPS
580 + #if ENABLED(Z_MULTI_ENDSTOPS)
581 + #define Z2_USE_ENDSTOP _XMAX_
582 + #define Z2_ENDSTOP_ADJUSTMENT 0
583 + #if NUM_Z_STEPPER_DRIVERS >= 3
584 + #define Z3_USE_ENDSTOP _YMAX_
585 + #define Z3_ENDSTOP_ADJUSTMENT 0
586 + #endif
587 + #if NUM_Z_STEPPER_DRIVERS >= 4
588 + #define Z4_USE_ENDSTOP _ZMAX_
589 + #define Z4_ENDSTOP_ADJUSTMENT 0
590 + #endif
591 + #endif
592 + #endif
593 +
594 + /**
595 + * Dual X Carriage
596 + *
597 + * This setup has two X carriages that can move independently, each with its own hotend.
598 + * The carriages can be used to print an object with two colors or materials, or in
599 + * "duplication mode" it can print two identical or X-mirrored objects simultaneously.
600 + * The inactive carriage is parked automatically to prevent oozing.
601 + * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis.
602 + * By default the X2 stepper is assigned to the first unused E plug on the board.
603 + *
604 + * The following Dual X Carriage modes can be selected with M605 S<mode>:
605 + *
606 + * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel
607 + * results as long as it supports dual X-carriages. (M605 S0)
608 + *
609 + * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so
610 + * that additional slicer support is not required. (M605 S1)
611 + *
612 + * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with
613 + * the first X-carriage and extruder, to print 2 copies of the same object at the same time.
614 + * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and
615 + * follow with M605 S2 to initiate duplicated movement.
616 + *
617 + * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates
618 + * the movement of the first except the second extruder is reversed in the X axis.
619 + * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and
620 + * follow with M605 S3 to initiate mirrored movement.
621 + */
622 + //#define DUAL_X_CARRIAGE
623 + #if ENABLED(DUAL_X_CARRIAGE)
624 + #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS
625 + #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage
626 + #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage
627 + #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed
628 + #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position
629 + #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS.
630 + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
631 + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
632 + // without modifying the firmware (through the "M218 T1 X???" command).
633 + // Remember: you should set the second extruder x-offset to 0 in your slicer.
634 +
635 + // This is the default power-up mode which can be later using M605.
636 + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
637 +
638 + // Default x offset in duplication mode (typically set to half print bed width)
639 + #define DEFAULT_DUPLICATION_X_OFFSET 100
640 + #endif
641 +
642 + // Activate a solenoid on the active extruder with M380. Disable all with M381.
643 + // Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
644 + //#define EXT_SOLENOID
645 +
646 + // @section homing
647 +
648 + /**
649 + * Homing Procedure
650 + * Homing (G28) does an indefinite move towards the endstops to establish
651 + * the position of the toolhead relative to the workspace.
652 + */
653 +
654 + //#define SENSORLESS_BACKOFF_MM { 2, 2 } // (mm) Backoff from endstops before sensorless homing
655 +
656 + #define HOMING_BUMP_MM { 5, 5, 2 } // (mm) Backoff from endstops after first bump
657 + #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate)
658 +
659 + //#define HOMING_BACKOFF_POST_MM { 2, 2, 2 } // (mm) Backoff from endstops after homing
660 +
661 + //#define QUICK_HOME // If G28 contains XY do a diagonal move first
662 + //#define HOME_Y_BEFORE_X // If G28 contains XY home Y before X
663 + //#define CODEPENDENT_XY_HOMING // If X/Y can't home without homing Y/X first
664 +
665 + // @section bltouch
666 +
667 + #if ENABLED(BLTOUCH)
668 + /**
669 + * Either: Use the defaults (recommended) or: For special purposes, use the following DEFINES
670 + * Do not activate settings that the probe might not understand. Clones might misunderstand
671 + * advanced commands.
672 + *
673 + * Note: If the probe is not deploying, do a "Reset" and "Self-Test" and then check the
674 + * wiring of the BROWN, RED and ORANGE wires.
675 + *
676 + * Note: If the trigger signal of your probe is not being recognized, it has been very often
677 + * because the BLACK and WHITE wires needed to be swapped. They are not "interchangeable"
678 + * like they would be with a real switch. So please check the wiring first.
679 + *
680 + * Settings for all BLTouch and clone probes:
681 + */
682 +
683 + // Safety: The probe needs time to recognize the command.
684 + // Minimum command delay (ms). Enable and increase if needed.
685 + #define BLTOUCH_DELAY 300
686 +
687 + /**
688 + * Settings for BLTOUCH Classic 1.2, 1.3 or BLTouch Smart 1.0, 2.0, 2.2, 3.0, 3.1, and most clones:
689 + */
690 +
691 + // Feature: Switch into SW mode after a deploy. It makes the output pulse longer. Can be useful
692 + // in special cases, like noisy or filtered input configurations.
693 + //#define BLTOUCH_FORCE_SW_MODE
694 +
695 + /**
696 + * Settings for BLTouch Smart 3.0 and 3.1
697 + * Summary:
698 + * - Voltage modes: 5V and OD (open drain - "logic voltage free") output modes
699 + * - High-Speed mode
700 + * - Disable LCD voltage options
701 + */
702 +
703 + /**
704 + * Danger: Don't activate 5V mode unless attached to a 5V-tolerant controller!
705 + * V3.0 or 3.1: Set default mode to 5V mode at Marlin startup.
706 + * If disabled, OD mode is the hard-coded default on 3.0
707 + * On startup, Marlin will compare its eeprom to this value. If the selected mode
708 + * differs, a mode set eeprom write will be completed at initialization.
709 + * Use the option below to force an eeprom write to a V3.1 probe regardless.
710 + */
711 + // #define BLTOUCH_SET_5V_MODE
712 +
713 + /**
714 + * Safety: Activate if connecting a probe with an unknown voltage mode.
715 + * V3.0: Set a probe into mode selected above at Marlin startup. Required for 5V mode on 3.0
716 + * V3.1: Force a probe with unknown mode into selected mode at Marlin startup ( = Probe EEPROM write )
717 + * To preserve the life of the probe, use this once then turn it off and re-flash.
718 + */
719 + //#define BLTOUCH_FORCE_MODE_SET
720 +
721 + /**
722 + * Use "HIGH SPEED" mode for probing.
723 + * Danger: Disable if your probe sometimes fails. Only suitable for stable well-adjusted systems.
724 + * This feature was designed for Delta's with very fast Z moves however higher speed cartesians may function
725 + * If the machine cannot raise the probe fast enough after a trigger, it may enter a fault state.
726 + */
727 + //#define BLTOUCH_HS_MODE
728 +
729 + // Safety: Enable voltage mode settings in the LCD menu.
730 + //#define BLTOUCH_LCD_VOLTAGE_MENU
731 +
732 + #endif // BLTOUCH
733 +
734 + // @section extras
735 +
736 + /**
737 + * Z Steppers Auto-Alignment
738 + * Add the G34 command to align multiple Z steppers using a bed probe.
739 + */
740 + //#define Z_STEPPER_AUTO_ALIGN
741 + #if ENABLED(Z_STEPPER_AUTO_ALIGN)
742 + // Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
743 + // If not defined, probe limits will be used.
744 + // Override with 'M422 S<index> X<pos> Y<pos>'
745 + //#define Z_STEPPER_ALIGN_XY { { 10, 190 }, { 100, 10 }, { 190, 190 } }
746 +
747 + /**
748 + * Orientation for the automatically-calculated probe positions.
749 + * Override Z stepper align points with 'M422 S<index> X<pos> Y<pos>'
750 + *
751 + * 2 Steppers: (0) (1)
752 + * | | 2 |
753 + * | 1 2 | |
754 + * | | 1 |
755 + *
756 + * 3 Steppers: (0) (1) (2) (3)
757 + * | 3 | 1 | 2 1 | 2 |
758 + * | | 3 | | 3 |
759 + * | 1 2 | 2 | 3 | 1 |
760 + *
761 + * 4 Steppers: (0) (1) (2) (3)
762 + * | 4 3 | 1 4 | 2 1 | 3 2 |
763 + * | | | | |
764 + * | 1 2 | 2 3 | 3 4 | 4 1 |
765 + */
766 + #ifndef Z_STEPPER_ALIGN_XY
767 + //#define Z_STEPPERS_ORIENTATION 0
768 + #endif
769 +
770 + // Provide Z stepper positions for more rapid convergence in bed alignment.
771 + // Requires triple stepper drivers (i.e., set NUM_Z_STEPPER_DRIVERS to 3)
772 + //#define Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS
773 + #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
774 + // Define Stepper XY positions for Z1, Z2, Z3 corresponding to
775 + // the Z screw positions in the bed carriage.
776 + // Define one position per Z stepper in stepper driver order.
777 + #define Z_STEPPER_ALIGN_STEPPER_XY { { 210.7, 102.5 }, { 152.6, 220.0 }, { 94.5, 102.5 } }
778 + #else
779 + // Amplification factor. Used to scale the correction step up or down in case
780 + // the stepper (spindle) position is farther out than the test point.
781 + #define Z_STEPPER_ALIGN_AMP 1.0 // Use a value > 1.0 NOTE: This may cause instability!
782 + #endif
783 +
784 + // On a 300mm bed a 5% grade would give a misalignment of ~1.5cm
785 + #define G34_MAX_GRADE 5 // (%) Maximum incline that G34 will handle
786 + #define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment
787 + #define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this
788 + #define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done?
789 + // After G34, re-home Z (G28 Z) or just calculate it from the last probe heights?
790 + // Re-homing might be more precise in reproducing the actual 'G28 Z' homing height, especially on an uneven bed.
791 + #define HOME_AFTER_G34
792 + #endif
793 +
794 + //
795 + // Add the G35 command to read bed corners to help adjust screws. Requires a bed probe.
796 + //
797 + //#define ASSISTED_TRAMMING
798 + #if ENABLED(ASSISTED_TRAMMING)
799 +
800 + // Define positions for probing points, use the hotend as reference not the sensor.
801 + #define TRAMMING_POINT_XY { { 20, 20 }, { 200, 20 }, { 200, 200 }, { 20, 200 } }
802 +
803 + // Define positions names for probing points.
804 + #define TRAMMING_POINT_NAME_1 "Front-Left"
805 + #define TRAMMING_POINT_NAME_2 "Front-Right"
806 + #define TRAMMING_POINT_NAME_3 "Back-Right"
807 + #define TRAMMING_POINT_NAME_4 "Back-Left"
808 +
809 + #define RESTORE_LEVELING_AFTER_G35 // Enable to restore leveling setup after operation
810 + //#define REPORT_TRAMMING_MM // Report Z deviation (mm) for each point relative to the first
811 + //#define ASSISTED_TRAMMING_MENU_ITEM // Add a menu item for Assisted Tramming
812 +
813 + /**
814 + * Screw thread:
815 + * M3: 30 = Clockwise, 31 = Counter-Clockwise
816 + * M4: 40 = Clockwise, 41 = Counter-Clockwise
817 + * M5: 50 = Clockwise, 51 = Counter-Clockwise
818 + */
819 + #define TRAMMING_SCREW_THREAD 30
820 +
821 + #endif
822 +
823 + // @section motion
824 +
825 + #define AXIS_RELATIVE_MODES { false, false, false, false }
826 +
827 + // Add a Duplicate option for well-separated conjoined nozzles
828 + //#define MULTI_NOZZLE_DUPLICATION
829 +
830 + // By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
831 + #define INVERT_X_STEP_PIN false
832 + #define INVERT_Y_STEP_PIN false
833 + #define INVERT_Z_STEP_PIN false
834 + #define INVERT_E_STEP_PIN false
835 +
836 + /**
837 + * Idle Stepper Shutdown
838 + * Set DISABLE_INACTIVE_? 'true' to shut down axis steppers after an idle period.
839 + * The Deactive Time can be overridden with M18 and M84. Set to 0 for No Timeout.
840 + */
841 + #define DEFAULT_STEPPER_DEACTIVE_TIME 120
842 + #define DISABLE_INACTIVE_X true
843 + #define DISABLE_INACTIVE_Y true
844 + #define DISABLE_INACTIVE_Z true // Set 'false' if the nozzle could fall onto your printed part!
845 + #define DISABLE_INACTIVE_E true
846 +
847 + // If the Nozzle or Bed falls when the Z stepper is disabled, set its resting position here.
848 + //#define Z_AFTER_DEACTIVATE Z_HOME_POS
849 +
850 + //#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
851 +
852 + // Default Minimum Feedrates for printing and travel moves
853 + #define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s) Minimum feedrate. Set with M205 S.
854 + #define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s) Minimum travel feedrate. Set with M205 T.
855 +
856 + // Minimum time that a segment needs to take as the buffer gets emptied
857 + #define DEFAULT_MINSEGMENTTIME 20000 // (µs) Set with M205 B.
858 +
859 + // Slow down the machine if the lookahead buffer is (by default) half full.
860 + // Increase the slowdown divisor for larger buffer sizes.
861 + #define SLOWDOWN
862 + #if ENABLED(SLOWDOWN)
863 + #define SLOWDOWN_DIVISOR 2
864 + #endif
865 +
866 + /**
867 + * XY Frequency limit
868 + * Reduce resonance by limiting the frequency of small zigzag infill moves.
869 + * See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html
870 + * Use M201 F<freq> G<min%> to change limits at runtime.
871 + */
872 + //#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>.
873 + #ifdef XY_FREQUENCY_LIMIT
874 + #define XY_FREQUENCY_MIN_PERCENT 5 // (percent) Minimum FR percentage to apply. Set with M201 G<min%>.
875 + #endif
876 +
877 + // Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
878 + // of the buffer and all stops. This should not be much greater than zero and should only be changed
879 + // if unwanted behavior is observed on a user's machine when running at very slow speeds.
880 + #define MINIMUM_PLANNER_SPEED 0.05 // (mm/s)
881 +
882 + //
883 + // Backlash Compensation
884 + // Adds extra movement to axes on direction-changes to account for backlash.
885 + //
886 + //#define BACKLASH_COMPENSATION
887 + #if ENABLED(BACKLASH_COMPENSATION)
888 + // Define values for backlash distance and correction.
889 + // If BACKLASH_GCODE is enabled these values are the defaults.
890 + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm)
891 + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction
892 +
893 + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments
894 + // to reduce print artifacts. (Enabling this is costly in memory and computation!)
895 + //#define BACKLASH_SMOOTHING_MM 3 // (mm)
896 +
897 + // Add runtime configuration and tuning of backlash values (M425)
898 + //#define BACKLASH_GCODE
899 +
900 + #if ENABLED(BACKLASH_GCODE)
901 + // Measure the Z backlash when probing (G29) and set with "M425 Z"
902 + #define MEASURE_BACKLASH_WHEN_PROBING
903 +
904 + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
905 + // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT
906 + // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION
907 + // increments while checking for the contact to be broken.
908 + #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm)
909 + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm)
910 + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/min)
911 + #endif
912 + #endif
913 + #endif
914 +
915 + /**
916 + * Automatic backlash, position and hotend offset calibration
917 + *
918 + * Enable G425 to run automatic calibration using an electrically-
919 + * conductive cube, bolt, or washer mounted on the bed.
920 + *
921 + * G425 uses the probe to touch the top and sides of the calibration object
922 + * on the bed and measures and/or correct positional offsets, axis backlash
923 + * and hotend offsets.
924 + *
925 + * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
926 + * ±5mm of true values for G425 to succeed.
927 + */
928 + //#define CALIBRATION_GCODE
929 + #if ENABLED(CALIBRATION_GCODE)
930 +
931 + //#define CALIBRATION_SCRIPT_PRE "M117 Starting Auto-Calibration\nT0\nG28\nG12\nM117 Calibrating..."
932 + //#define CALIBRATION_SCRIPT_POST "M500\nM117 Calibration data saved"
933 +
934 + #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
935 +
936 + #define CALIBRATION_FEEDRATE_SLOW 60 // mm/min
937 + #define CALIBRATION_FEEDRATE_FAST 1200 // mm/min
938 + #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/min
939 +
940 + // The following parameters refer to the conical section of the nozzle tip.
941 + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm
942 + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm
943 +
944 + // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM).
945 + //#define CALIBRATION_REPORTING
946 +
947 + // The true location and dimension the cube/bolt/washer on the bed.
948 + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0 } // mm
949 + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0 } // mm
950 +
951 + // Comment out any sides which are unreachable by the probe. For best
952 + // auto-calibration results, all sides must be reachable.
953 + #define CALIBRATION_MEASURE_RIGHT
954 + #define CALIBRATION_MEASURE_FRONT
955 + #define CALIBRATION_MEASURE_LEFT
956 + #define CALIBRATION_MEASURE_BACK
957 +
958 + // Probing at the exact top center only works if the center is flat. If
959 + // probing on a screwhead or hollow washer, probe near the edges.
960 + //#define CALIBRATION_MEASURE_AT_TOP_EDGES
961 +
962 + // Define the pin to read during calibration
963 + #ifndef CALIBRATION_PIN
964 + //#define CALIBRATION_PIN -1 // Define here to override the default pin
965 + #define CALIBRATION_PIN_INVERTING false // Set to true to invert the custom pin
966 + //#define CALIBRATION_PIN_PULLDOWN
967 + #define CALIBRATION_PIN_PULLUP
968 + #endif
969 + #endif
970 +
971 + /**
972 + * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
973 + * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
974 + * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
975 + * lowest stepping frequencies.
976 + */
977 + //#define ADAPTIVE_STEP_SMOOTHING
978 +
979 + /**
980 + * Custom Microstepping
981 + * Override as-needed for your setup. Up to 3 MS pins are supported.
982 + */
983 + //#define MICROSTEP1 LOW,LOW,LOW
984 + //#define MICROSTEP2 HIGH,LOW,LOW
985 + //#define MICROSTEP4 LOW,HIGH,LOW
986 + //#define MICROSTEP8 HIGH,HIGH,LOW
987 + //#define MICROSTEP16 LOW,LOW,HIGH
988 + //#define MICROSTEP32 HIGH,LOW,HIGH
989 +
990 + // Microstep settings (Requires a board with pins named X_MS1, X_MS2, etc.)
991 + #define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
992 +
993 + /**
994 + * @section stepper motor current
995 + *
996 + * Some boards have a means of setting the stepper motor current via firmware.
997 + *
998 + * The power on motor currents are set by:
999 + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2
1000 + * known compatible chips: A4982
1001 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H
1002 + * known compatible chips: AD5206
1003 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2
1004 + * known compatible chips: MCP4728
1005 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE
1006 + * known compatible chips: MCP4451, MCP4018
1007 + *
1008 + * Motor currents can also be set by M907 - M910 and by the LCD.
1009 + * M907 - applies to all.
1010 + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H
1011 + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
1012 + */
1013 + //#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps
1014 + //#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
1015 + //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
1016 +
1017 + /**
1018 + * I2C-based DIGIPOTs (e.g., Azteeg X3 Pro)
1019 + */
1020 + //#define DIGIPOT_MCP4018 // Requires https://github.com/stawel/SlowSoftI2CMaster
1021 + //#define DIGIPOT_MCP4451
1022 + #if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
1023 + #define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT:4 AZTEEG_X3_PRO:8 MKS_SBASE:5 MIGHTYBOARD_REVE:5
1024 +
1025 + // Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS.
1026 + // These correspond to the physical drivers, so be mindful if the order is changed.
1027 + #define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO
1028 +
1029 + //#define DIGIPOT_USE_RAW_VALUES // Use DIGIPOT_MOTOR_CURRENT raw wiper values (instead of A4988 motor currents)
1030 +
1031 + /**
1032 + * Common slave addresses:
1033 + *
1034 + * A (A shifted) B (B shifted) IC
1035 + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451
1036 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451
1037 + * AZTEEG_X5_MINI 0x2C (0x58) 0x2E (0x5C) MCP4451
1038 + * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451
1039 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018
1040 + */
1041 + //#define DIGIPOT_I2C_ADDRESS_A 0x2C // Unshifted slave address for first DIGIPOT
1042 + //#define DIGIPOT_I2C_ADDRESS_B 0x2D // Unshifted slave address for second DIGIPOT
1043 + #endif
1044 +
1045 + //===========================================================================
1046 + //=============================Additional Features===========================
1047 + //===========================================================================
1048 +
1049 + // @section lcd
1050 +
1051 + #if EITHER(ULTIPANEL, EXTENSIBLE_UI)
1052 + #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel
1053 + #define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm)
1054 + #if ENABLED(ULTIPANEL)
1055 + #define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
1056 + #define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen
1057 + #endif
1058 + #endif
1059 +
1060 + // Change values more rapidly when the encoder is rotated faster
1061 + #define ENCODER_RATE_MULTIPLIER
1062 + #if ENABLED(ENCODER_RATE_MULTIPLIER)
1063 + #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed
1064 + #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed
1065 + #endif
1066 +
1067 + // Play a beep when the feedrate is changed from the Status Screen
1068 + //#define BEEP_ON_FEEDRATE_CHANGE
1069 + #if ENABLED(BEEP_ON_FEEDRATE_CHANGE)
1070 + #define FEEDRATE_CHANGE_BEEP_DURATION 10
1071 + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
1072 + #endif
1073 +
1074 + #if HAS_LCD_MENU
1075 +
1076 + // Add Probe Z Offset calibration to the Z Probe Offsets menu
1077 + #if HAS_BED_PROBE
1078 + //#define PROBE_OFFSET_WIZARD
1079 + #if ENABLED(PROBE_OFFSET_WIZARD)
1080 + #define PROBE_OFFSET_START -4.0 // Estimated nozzle-to-probe Z offset, plus a little extra
1081 + #endif
1082 + #endif
1083 +
1084 + // Include a page of printer information in the LCD Main Menu
1085 + #define LCD_INFO_MENU
1086 + #if ENABLED(LCD_INFO_MENU)
1087 + //#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
1088 + #endif
1089 +
1090 + // BACK menu items keep the highlight at the top
1091 + //#define TURBO_BACK_MENU_ITEM
1092 +
1093 + /**
1094 + * LED Control Menu
1095 + * Add LED Control to the LCD menu
1096 + */
1097 + //#define LED_CONTROL_MENU
1098 + #if ENABLED(LED_CONTROL_MENU)
1099 + #define LED_COLOR_PRESETS // Enable the Preset Color menu option
1100 + //#define NEO2_COLOR_PRESETS // Enable a second NeoPixel Preset Color menu option
1101 + #if ENABLED(LED_COLOR_PRESETS)
1102 + #define LED_USER_PRESET_RED 255 // User defined RED value
1103 + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value
1104 + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value
1105 + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
1106 + #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
1107 + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
1108 + #endif
1109 + #if ENABLED(NEO2_COLOR_PRESETS)
1110 + #define NEO2_USER_PRESET_RED 255 // User defined RED value
1111 + #define NEO2_USER_PRESET_GREEN 128 // User defined GREEN value
1112 + #define NEO2_USER_PRESET_BLUE 0 // User defined BLUE value
1113 + #define NEO2_USER_PRESET_WHITE 255 // User defined WHITE value
1114 + #define NEO2_USER_PRESET_BRIGHTNESS 255 // User defined intensity
1115 + //#define NEO2_USER_PRESET_STARTUP // Have the printer display the user preset color on startup for the second strip
1116 + #endif
1117 + #endif
1118 +
1119 + #endif // HAS_LCD_MENU
1120 +
1121 + // Scroll a longer status message into view
1122 + #define STATUS_MESSAGE_SCROLLING
1123 +
1124 + // On the Info Screen, display XY with one decimal place when possible
1125 + //#define LCD_DECIMAL_SMALL_XY
1126 +
1127 + // The timeout (in ms) to return to the status screen from sub-menus
1128 + //#define LCD_TIMEOUT_TO_STATUS 15000
1129 +
1130 + // Add an 'M73' G-code to set the current percentage
1131 + //#define LCD_SET_PROGRESS_MANUALLY
1132 +
1133 + // Show the E position (filament used) during printing
1134 + //#define LCD_SHOW_E_TOTAL
1135 +
1136 + #if ENABLED(SHOW_BOOTSCREEN)
1137 + #define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
1138 + #endif
1139 +
1140 + #if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
1141 + //#define SHOW_REMAINING_TIME // Display estimated time to completion
1142 + #if ENABLED(SHOW_REMAINING_TIME)
1143 + //#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
1144 + //#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
1145 + #endif
1146 +
1147 + #if HAS_MARLINUI_U8GLIB
1148 + //#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
1149 + #endif
1150 +
1151 + #if EITHER(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
1152 + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
1153 + #if ENABLED(LCD_PROGRESS_BAR)
1154 + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
1155 + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message
1156 + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever)
1157 + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it
1158 + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar
1159 + #endif
1160 + #endif
1161 + #endif
1162 +
1163 + #if ENABLED(SDSUPPORT)
1164 +
1165 + // The standard SD detect circuit reads LOW when media is inserted and HIGH when empty.
1166 + // Enable this option and set to HIGH if your SD cards are incorrectly detected.
1167 + //#define SD_DETECT_STATE HIGH
1168 +
1169 + //#define SDCARD_READONLY // Read-only SD card (to save over 2K of flash)
1170 +
1171 + #define SD_PROCEDURE_DEPTH 1 // Increase if you need more nested M32 calls
1172 +
1173 + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
1174 + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // Use "M84XYE" to keep Z enabled so your bed stays in place
1175 +
1176 + // Reverse SD sort to show "more recent" files first, according to the card's FAT.
1177 + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended.
1178 + #define SDCARD_RATHERRECENTFIRST
1179 +
1180 + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing
1181 +
1182 + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files
1183 +
1184 + #define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
1185 +
1186 + #if ENABLED(PRINTER_EVENT_LEDS)
1187 + #define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination
1188 + #endif
1189 +
1190 + /**
1191 + * Continue after Power-Loss (Creality3D)
1192 + *
1193 + * Store the current state to the SD Card at the start of each layer
1194 + * during SD printing. If the recovery file is found at boot time, present
1195 + * an option on the LCD screen to continue the print from the last-known
1196 + * point in the file.
1197 + */
1198 + //#define POWER_LOSS_RECOVERY
1199 + #if ENABLED(POWER_LOSS_RECOVERY)
1200 + #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
1201 + //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
1202 + //#define POWER_LOSS_RECOVER_ZHOME // Z homing is needed for proper recovery. 99.9% of the time this should be disabled!
1203 + //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
1204 + //#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
1205 + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
1206 + //#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate
1207 + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
1208 + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power.
1209 +
1210 + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card,
1211 + // especially with "vase mode" printing. Set too high and vases cannot be continued.
1212 + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data
1213 + #endif
1214 +
1215 + /**
1216 + * Sort SD file listings in alphabetical order.
1217 + *
1218 + * With this option enabled, items on SD cards will be sorted
1219 + * by name for easier navigation.
1220 + *
1221 + * By default...
1222 + *
1223 + * - Use the slowest -but safest- method for sorting.
1224 + * - Folders are sorted to the top.
1225 + * - The sort key is statically allocated.
1226 + * - No added G-code (M34) support.
1227 + * - 40 item sorting limit. (Items after the first 40 are unsorted.)
1228 + *
1229 + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
1230 + * compiler to calculate the worst-case usage and throw an error if the SRAM
1231 + * limit is exceeded.
1232 + *
1233 + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
1234 + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
1235 + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
1236 + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
1237 + */
1238 + //#define SDCARD_SORT_ALPHA
1239 +
1240 + // SD Card Sorting options
1241 + #if ENABLED(SDCARD_SORT_ALPHA)
1242 + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
1243 + #define FOLDER_SORTING -1 // -1=above 0=none 1=below
1244 + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 G-code.
1245 + #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
1246 + #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
1247 + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
1248 + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
1249 + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
1250 + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
1251 + #endif
1252 +
1253 + // This allows hosts to request long names for files and folders with M33
1254 + //#define LONG_FILENAME_HOST_SUPPORT
1255 +
1256 + // Enable this option to scroll long filenames in the SD card menu
1257 + #define SCROLL_LONG_FILENAMES
1258 +
1259 + // Leave the heaters on after Stop Print (not recommended!)
1260 + //#define SD_ABORT_NO_COOLDOWN
1261 +
1262 + /**
1263 + * This option allows you to abort SD printing when any endstop is triggered.
1264 + * This feature must be enabled with "M540 S1" or from the LCD menu.
1265 + * To have any effect, endstops must be enabled during SD printing.
1266 + */
1267 + //#define SD_ABORT_ON_ENDSTOP_HIT
1268 +
1269 + /**
1270 + * This option makes it easier to print the same SD Card file again.
1271 + * On print completion the LCD Menu will open with the file selected.
1272 + * You can just click to start the print, or navigate elsewhere.
1273 + */
1274 + //#define SD_REPRINT_LAST_SELECTED_FILE
1275 +
1276 + /**
1277 + * Auto-report SdCard status with M27 S<seconds>
1278 + */
1279 + //#define AUTO_REPORT_SD_STATUS
1280 +
1281 + /**
1282 + * Support for USB thumb drives using an Arduino USB Host Shield or
1283 + * equivalent MAX3421E breakout board. The USB thumb drive will appear
1284 + * to Marlin as an SD card.
1285 + *
1286 + * The MAX3421E can be assigned the same pins as the SD card reader, with
1287 + * the following pin mapping:
1288 + *
1289 + * SCLK, MOSI, MISO --> SCLK, MOSI, MISO
1290 + * INT --> SD_DETECT_PIN [1]
1291 + * SS --> SDSS
1292 + *
1293 + * [1] On AVR an interrupt-capable pin is best for UHS3 compatibility.
1294 + */
1295 + //#define USB_FLASH_DRIVE_SUPPORT
1296 + #if ENABLED(USB_FLASH_DRIVE_SUPPORT)
1297 + #define USB_CS_PIN SDSS
1298 + #define USB_INTR_PIN SD_DETECT_PIN
1299 +
1300 + /**
1301 + * USB Host Shield Library
1302 + *
1303 + * - UHS2 uses no interrupts and has been production-tested
1304 + * on a LulzBot TAZ Pro with a 32-bit Archim board.
1305 + *
1306 + * - UHS3 is newer code with better USB compatibility. But it
1307 + * is less tested and is known to interfere with Servos.
1308 + * [1] This requires USB_INTR_PIN to be interrupt-capable.
1309 + */
1310 + //#define USE_UHS3_USB
1311 + #endif
1312 +
1313 + /**
1314 + * When using a bootloader that supports SD-Firmware-Flashing,
1315 + * add a menu item to activate SD-FW-Update on the next reboot.
1316 + *
1317 + * Requires ATMEGA2560 (Arduino Mega)
1318 + *
1319 + * Tested with this bootloader:
1320 + * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560
1321 + */
1322 + //#define SD_FIRMWARE_UPDATE
1323 + #if ENABLED(SD_FIRMWARE_UPDATE)
1324 + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF
1325 + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0
1326 + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF
1327 + #endif
1328 +
1329 + // Add an optimized binary file transfer mode, initiated with 'M28 B1'
1330 + //#define BINARY_FILE_TRANSFER
1331 +
1332 + /**
1333 + * Set this option to one of the following (or the board's defaults apply):
1334 + *
1335 + * LCD - Use the SD drive in the external LCD controller.
1336 + * ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.)
1337 + * CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file).
1338 + *
1339 + * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
1340 + */
1341 + //#define SDCARD_CONNECTION LCD
1342 +
1343 + #endif // SDSUPPORT
1344 +
1345 + /**
1346 + * By default an onboard SD card reader may be shared as a USB mass-
1347 + * storage device. This option hides the SD card from the host PC.
1348 + */
1349 + //#define NO_SD_HOST_DRIVE // Disable SD Card access over USB (for security).
1350 +
1351 + /**
1352 + * Additional options for Graphical Displays
1353 + *
1354 + * Use the optimizations here to improve printing performance,
1355 + * which can be adversely affected by graphical display drawing,
1356 + * especially when doing several short moves, and when printing
1357 + * on DELTA and SCARA machines.
1358 + *
1359 + * Some of these options may result in the display lagging behind
1360 + * controller events, as there is a trade-off between reliable
1361 + * printing performance versus fast display updates.
1362 + */
1363 + #if HAS_MARLINUI_U8GLIB
1364 + // Show SD percentage next to the progress bar
1365 + //#define DOGM_SD_PERCENT
1366 +
1367 + // Save many cycles by drawing a hollow frame or no frame on the Info Screen
1368 + //#define XYZ_NO_FRAME
1369 + #define XYZ_HOLLOW_FRAME
1370 +
1371 + // Enable to save many cycles by drawing a hollow frame on Menu Screens
1372 + #define MENU_HOLLOW_FRAME
1373 +
1374 + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
1375 + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
1376 + //#define USE_BIG_EDIT_FONT
1377 +
1378 + // A smaller font may be used on the Info Screen. Costs 2434 bytes of PROGMEM.
1379 + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
1380 + //#define USE_SMALL_INFOFONT
1381 +
1382 + // Swap the CW/CCW indicators in the graphics overlay
1383 + //#define OVERLAY_GFX_REVERSE
1384 +
1385 + /**
1386 + * ST7920-based LCDs can emulate a 16 x 4 character display using
1387 + * the ST7920 character-generator for very fast screen updates.
1388 + * Enable LIGHTWEIGHT_UI to use this special display mode.
1389 + *
1390 + * Since LIGHTWEIGHT_UI has limited space, the position and status
1391 + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the
1392 + * length of time to display the status message before clearing.
1393 + *
1394 + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status.
1395 + * This will prevent position updates from being displayed.
1396 + */
1397 + #if ENABLED(U8GLIB_ST7920)
1398 + // Enable this option and reduce the value to optimize screen updates.
1399 + // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
1400 + //#define DOGM_SPI_DELAY_US 5
1401 +
1402 + //#define LIGHTWEIGHT_UI
1403 + #if ENABLED(LIGHTWEIGHT_UI)
1404 + #define STATUS_EXPIRE_SECONDS 20
1405 + #endif
1406 + #endif
1407 +
1408 + /**
1409 + * Status (Info) Screen customizations
1410 + * These options may affect code size and screen render time.
1411 + * Custom status screens can forcibly override these settings.
1412 + */
1413 + //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones
1414 + //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends)
1415 + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM)
1416 + #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
1417 + #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
1418 + #define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating
1419 + //#define STATUS_CUTTER_ANIM // Use a second bitmap to indicate spindle / laser active
1420 + //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
1421 + //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
1422 + //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
1423 + //#define STATUS_HEAT_PERCENT // Show heating in a progress bar
1424 + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash)
1425 + //#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM.
1426 +
1427 + // Frivolous Game Options
1428 + //#define MARLIN_BRICKOUT
1429 + //#define MARLIN_INVADERS
1430 + //#define MARLIN_SNAKE
1431 + //#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu
1432 +
1433 + #endif // HAS_MARLINUI_U8GLIB
1434 +
1435 + //
1436 + // Additional options for DGUS / DWIN displays
1437 + //
1438 + #if HAS_DGUS_LCD
1439 + #define LCD_SERIAL_PORT 3
1440 + #define LCD_BAUDRATE 115200
1441 +
1442 + #define DGUS_RX_BUFFER_SIZE 128
1443 + #define DGUS_TX_BUFFER_SIZE 48
1444 + //#define SERIAL_STATS_RX_BUFFER_OVERRUNS // Fix Rx overrun situation (Currently only for AVR)
1445 +
1446 + #define DGUS_UPDATE_INTERVAL_MS 500 // (ms) Interval between automatic screen updates
1447 +
1448 + #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
1449 + #define DGUS_PRINT_FILENAME // Display the filename during printing
1450 + #define DGUS_PREHEAT_UI // Display a preheat screen during heatup
1451 +
1452 + #if ENABLED(DGUS_LCD_UI_FYSETC)
1453 + //#define DGUS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC
1454 + #else
1455 + #define DGUS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY
1456 + #endif
1457 +
1458 + #define DGUS_FILAMENT_LOADUNLOAD
1459 + #if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
1460 + #define DGUS_FILAMENT_PURGE_LENGTH 10
1461 + #define DGUS_FILAMENT_LOAD_LENGTH_PER_TIME 0.5 // (mm) Adjust in proportion to DGUS_UPDATE_INTERVAL_MS
1462 + #endif
1463 +
1464 + #define DGUS_UI_WAITING // Show a "waiting" screen between some screens
1465 + #if ENABLED(DGUS_UI_WAITING)
1466 + #define DGUS_UI_WAITING_STATUS 10
1467 + #define DGUS_UI_WAITING_STATUS_PERIOD 8 // Increase to slower waiting status looping
1468 + #endif
1469 + #endif
1470 + #endif // HAS_DGUS_LCD
1471 +
1472 + //
1473 + // Touch UI for the FTDI Embedded Video Engine (EVE)
1474 + //
1475 + #if ENABLED(TOUCH_UI_FTDI_EVE)
1476 + // Display board used
1477 + //#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
1478 + //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
1479 + //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
1480 + //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
1481 + //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
1482 + //#define LCD_FYSETC_TFT81050 // FYSETC with 5" (800x480)
1483 +
1484 + // Correct the resolution if not using the stock TFT panel.
1485 + //#define TOUCH_UI_320x240
1486 + //#define TOUCH_UI_480x272
1487 + //#define TOUCH_UI_800x480
1488 +
1489 + // Mappings for boards with a standard RepRapDiscount Display connector
1490 + //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
1491 + //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
1492 + //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
1493 + //#define S6_TFT_PINMAP // FYSETC S6 pin mapping
1494 + //#define F6_TFT_PINMAP // FYSETC F6 pin mapping
1495 +
1496 + //#define OTHER_PIN_LAYOUT // Define pins manually below
1497 + #if ENABLED(OTHER_PIN_LAYOUT)
1498 + // Pins for CS and MOD_RESET (PD) must be chosen
1499 + #define CLCD_MOD_RESET 9
1500 + #define CLCD_SPI_CS 10
1501 +
1502 + // If using software SPI, specify pins for SCLK, MOSI, MISO
1503 + //#define CLCD_USE_SOFT_SPI
1504 + #if ENABLED(CLCD_USE_SOFT_SPI)
1505 + #define CLCD_SOFT_SPI_MOSI 11
1506 + #define CLCD_SOFT_SPI_MISO 12
1507 + #define CLCD_SOFT_SPI_SCLK 13
1508 + #endif
1509 + #endif
1510 +
1511 + // Display Orientation. An inverted (i.e. upside-down) display
1512 + // is supported on the FT800. The FT810 and beyond also support
1513 + // portrait and mirrored orientations.
1514 + //#define TOUCH_UI_INVERTED
1515 + //#define TOUCH_UI_PORTRAIT
1516 + //#define TOUCH_UI_MIRRORED
1517 +
1518 + // UTF8 processing and rendering.
1519 + // Unsupported characters are shown as '?'.
1520 + //#define TOUCH_UI_USE_UTF8
1521 + #if ENABLED(TOUCH_UI_USE_UTF8)
1522 + // Western accents support. These accented characters use
1523 + // combined bitmaps and require relatively little storage.
1524 + #define TOUCH_UI_UTF8_WESTERN_CHARSET
1525 + #if ENABLED(TOUCH_UI_UTF8_WESTERN_CHARSET)
1526 + // Additional character groups. These characters require
1527 + // full bitmaps and take up considerable storage:
1528 + //#define TOUCH_UI_UTF8_SUPERSCRIPTS // ¹ ² ³
1529 + //#define TOUCH_UI_UTF8_COPYRIGHT // © ®
1530 + //#define TOUCH_UI_UTF8_GERMANIC // ß
1531 + //#define TOUCH_UI_UTF8_SCANDINAVIAN // Æ Ð Ø Þ æ ð ø þ
1532 + //#define TOUCH_UI_UTF8_PUNCTUATION // « » ¿ ¡
1533 + //#define TOUCH_UI_UTF8_CURRENCY // ¢ £ ¤ ¥
1534 + //#define TOUCH_UI_UTF8_ORDINALS // º ª
1535 + //#define TOUCH_UI_UTF8_MATHEMATICS // ± × ÷
1536 + //#define TOUCH_UI_UTF8_FRACTIONS // ¼ ½ ¾
1537 + //#define TOUCH_UI_UTF8_SYMBOLS // µ ¶ ¦ § ¬
1538 + #endif
1539 + #endif
1540 +
1541 + // Use a smaller font when labels don't fit buttons
1542 + #define TOUCH_UI_FIT_TEXT
1543 +
1544 + // Allow language selection from menu at run-time (otherwise use LCD_LANGUAGE)
1545 + //#define LCD_LANGUAGE_1 en
1546 + //#define LCD_LANGUAGE_2 fr
1547 + //#define LCD_LANGUAGE_3 de
1548 + //#define LCD_LANGUAGE_4 es
1549 + //#define LCD_LANGUAGE_5 it
1550 +
1551 + // Use a numeric passcode for "Screen lock" keypad.
1552 + // (recommended for smaller displays)
1553 + //#define TOUCH_UI_PASSCODE
1554 +
1555 + // Output extra debug info for Touch UI events
1556 + //#define TOUCH_UI_DEBUG
1557 +
1558 + // Developer menu (accessed by touching "About Printer" copyright text)
1559 + //#define TOUCH_UI_DEVELOPER_MENU
1560 + #endif
1561 +
1562 + //
1563 + // Classic UI Options
1564 + //
1565 + #if TFT_SCALED_DOGLCD
1566 + //#define TFT_MARLINUI_COLOR 0xFFFF // White
1567 + //#define TFT_MARLINBG_COLOR 0x0000 // Black
1568 + //#define TFT_DISABLED_COLOR 0x0003 // Almost black
1569 + //#define TFT_BTCANCEL_COLOR 0xF800 // Red
1570 + //#define TFT_BTARROWS_COLOR 0xDEE6 // 11011 110111 00110 Yellow
1571 + //#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan
1572 + #endif
1573 +
1574 + //
1575 + // ADC Button Debounce
1576 + //
1577 + #if HAS_ADC_BUTTONS
1578 + #define ADC_BUTTON_DEBOUNCE_DELAY 16 // Increase if buttons bounce or repeat too fast
1579 + #endif
1580 +
1581 + // @section safety
1582 +
1583 + /**
1584 + * The watchdog hardware timer will do a reset and disable all outputs
1585 + * if the firmware gets too overloaded to read the temperature sensors.
1586 + *
1587 + * If you find that watchdog reboot causes your AVR board to hang forever,
1588 + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO.
1589 + * NOTE: This method is less reliable as it can only catch hangups while
1590 + * interrupts are enabled.
1591 + */
1592 + #define USE_WATCHDOG
1593 + #if ENABLED(USE_WATCHDOG)
1594 + //#define WATCHDOG_RESET_MANUAL
1595 + #endif
1596 +
1597 + // @section lcd
1598 +
1599 + /**
1600 + * Babystepping enables movement of the axes by tiny increments without changing
1601 + * the current position values. This feature is used primarily to adjust the Z
1602 + * axis in the first layer of a print in real-time.
1603 + *
1604 + * Warning: Does not respect endstops!
1605 + */
1606 + #define BABYSTEPPING
1607 + #if ENABLED(BABYSTEPPING)
1608 + //#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
1609 + //#define BABYSTEP_WITHOUT_HOMING
1610 + //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement).
1611 + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
1612 + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
1613 + //#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps
1614 + #define BABYSTEP_MULTIPLICATOR_Z 10 // (steps or mm) Steps or millimeter distance for each Z babystep
1615 + #define BABYSTEP_MULTIPLICATOR_XY 10 // (steps or mm) Steps or millimeter distance for each XY babystep
1616 +
1617 + #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
1618 + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)
1619 + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
1620 + // Note: Extra time may be added to mitigate controller latency.
1621 + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle.
1622 + #if ENABLED(MOVE_Z_WHEN_IDLE)
1623 + #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size.
1624 + #endif
1625 + #endif
1626 +
1627 + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28
1628 +
1629 + #define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
1630 + #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
1631 + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
1632 + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
1633 + #endif
1634 + #endif
1635 +
1636 + // @section extruder
1637 +
1638 + /**
1639 + * Linear Pressure Control v1.5
1640 + *
1641 + * Assumption: advance [steps] = k * (delta velocity [steps/s])
1642 + * K=0 means advance disabled.
1643 + *
1644 + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions!
1645 + *
1646 + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak.
1647 + * Larger K values will be needed for flexible filament and greater distances.
1648 + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk)
1649 + * print acceleration will be reduced during the affected moves to keep within the limit.
1650 + *
1651 + * See https://marlinfw.org/docs/features/lin_advance.html for full instructions.
1652 + */
1653 + //#define LIN_ADVANCE
1654 + #if ENABLED(LIN_ADVANCE)
1655 + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
1656 + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed
1657 + //#define LA_DEBUG // If enabled, this will generate debug information output over USB.
1658 + //#define EXPERIMENTAL_SCURVE // Enable this option to permit S-Curve Acceleration
1659 + #endif
1660 +
1661 + // @section leveling
1662 +
1663 + /**
1664 + * Points to probe for all 3-point Leveling procedures.
1665 + * Override if the automatically selected points are inadequate.
1666 + */
1667 + #if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL)
1668 + //#define PROBE_PT_1_X 15
1669 + //#define PROBE_PT_1_Y 180
1670 + //#define PROBE_PT_2_X 15
1671 + //#define PROBE_PT_2_Y 20
1672 + //#define PROBE_PT_3_X 170
1673 + //#define PROBE_PT_3_Y 20
1674 + #endif
1675 +
1676 + /**
1677 + * Probing Margins
1678 + *
1679 + * Override PROBING_MARGIN for each side of the build plate
1680 + * Useful to get probe points to exact positions on targets or
1681 + * to allow leveling to avoid plate clamps on only specific
1682 + * sides of the bed. With NOZZLE_AS_PROBE negative values are
1683 + * allowed, to permit probing outside the bed.
1684 + *
1685 + * If you are replacing the prior *_PROBE_BED_POSITION options,
1686 + * LEFT and FRONT values in most cases will map directly over
1687 + * RIGHT and REAR would be the inverse such as
1688 + * (X/Y_BED_SIZE - RIGHT/BACK_PROBE_BED_POSITION)
1689 + *
1690 + * This will allow all positions to match at compilation, however
1691 + * should the probe position be modified with M851XY then the
1692 + * probe points will follow. This prevents any change from causing
1693 + * the probe to be unable to reach any points.
1694 + */
1695 + #if PROBE_SELECTED && !IS_KINEMATIC
1696 + //#define PROBING_MARGIN_LEFT PROBING_MARGIN
1697 + //#define PROBING_MARGIN_RIGHT PROBING_MARGIN
1698 + //#define PROBING_MARGIN_FRONT PROBING_MARGIN
1699 + //#define PROBING_MARGIN_BACK PROBING_MARGIN
1700 + #endif
1701 +
1702 + #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
1703 + // Override the mesh area if the automatic (max) area is too large
1704 + //#define MESH_MIN_X MESH_INSET
1705 + //#define MESH_MIN_Y MESH_INSET
1706 + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
1707 + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
1708 + #endif
1709 +
1710 + /**
1711 + * Repeatedly attempt G29 leveling until it succeeds.
1712 + * Stop after G29_MAX_RETRIES attempts.
1713 + */
1714 + //#define G29_RETRY_AND_RECOVER
1715 + #if ENABLED(G29_RETRY_AND_RECOVER)
1716 + #define G29_MAX_RETRIES 3
1717 + #define G29_HALT_ON_FAILURE
1718 + /**
1719 + * Specify the GCODE commands that will be executed when leveling succeeds,
1720 + * between attempts, and after the maximum number of retries have been tried.
1721 + */
1722 + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done."
1723 + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0"
1724 + #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"
1725 +
1726 + #endif
1727 +
1728 + /**
1729 + * Thermal Probe Compensation
1730 + * Probe measurements are adjusted to compensate for temperature distortion.
1731 + * Use G76 to calibrate this feature. Use M871 to set values manually.
1732 + * For a more detailed explanation of the process see G76_M871.cpp.
1733 + */
1734 + #if HAS_BED_PROBE && TEMP_SENSOR_PROBE && TEMP_SENSOR_BED
1735 + // Enable thermal first layer compensation using bed and probe temperatures
1736 + #define PROBE_TEMP_COMPENSATION
1737 +
1738 + // Add additional compensation depending on hotend temperature
1739 + // Note: this values cannot be calibrated and have to be set manually
1740 + #if ENABLED(PROBE_TEMP_COMPENSATION)
1741 + // Park position to wait for probe cooldown
1742 + #define PTC_PARK_POS { 0, 0, 100 }
1743 +
1744 + // Probe position to probe and wait for probe to reach target temperature
1745 + #define PTC_PROBE_POS { 90, 100 }
1746 +
1747 + // Enable additional compensation using hotend temperature
1748 + // Note: this values cannot be calibrated automatically but have to be set manually
1749 + //#define USE_TEMP_EXT_COMPENSATION
1750 +
1751 + // Probe temperature calibration generates a table of values starting at PTC_SAMPLE_START
1752 + // (e.g. 30), in steps of PTC_SAMPLE_RES (e.g. 5) with PTC_SAMPLE_COUNT (e.g. 10) samples.
1753 +
1754 + //#define PTC_SAMPLE_START 30.0f
1755 + //#define PTC_SAMPLE_RES 5.0f
1756 + //#define PTC_SAMPLE_COUNT 10U
1757 +
1758 + // Bed temperature calibration builds a similar table.
1759 +
1760 + //#define BTC_SAMPLE_START 60.0f
1761 + //#define BTC_SAMPLE_RES 5.0f
1762 + //#define BTC_SAMPLE_COUNT 10U
1763 +
1764 + // The temperature the probe should be at while taking measurements during bed temperature
1765 + // calibration.
1766 + //#define BTC_PROBE_TEMP 30.0f
1767 +
1768 + // Height above Z=0.0f to raise the nozzle. Lowering this can help the probe to heat faster.
1769 + // Note: the Z=0.0f offset is determined by the probe offset which can be set using M851.
1770 + //#define PTC_PROBE_HEATING_OFFSET 0.5f
1771 +
1772 + // Height to raise the Z-probe between heating and taking the next measurement. Some probes
1773 + // may fail to untrigger if they have been triggered for a long time, which can be solved by
1774 + // increasing the height the probe is raised to.
1775 + //#define PTC_PROBE_RAISE 15U
1776 +
1777 + // If the probe is outside of the defined range, use linear extrapolation using the closest
1778 + // point and the PTC_LINEAR_EXTRAPOLATION'th next point. E.g. if set to 4 it will use data[0]
1779 + // and data[4] to perform linear extrapolation for values below PTC_SAMPLE_START.
1780 + //#define PTC_LINEAR_EXTRAPOLATION 4
1781 + #endif
1782 + #endif
1783 +
1784 + // @section extras
1785 +
1786 + //
1787 + // G60/G61 Position Save and Return
1788 + //
1789 + //#define SAVED_POSITIONS 1 // Each saved position slot costs 12 bytes
1790 +
1791 + //
1792 + // G2/G3 Arc Support
1793 + //
1794 + #define ARC_SUPPORT // Disable this feature to save ~3226 bytes
1795 + #if ENABLED(ARC_SUPPORT)
1796 + #define MM_PER_ARC_SEGMENT 1 // (mm) Length (or minimum length) of each arc segment
1797 + //#define ARC_SEGMENTS_PER_R 1 // Max segment length, MM_PER = Min
1798 + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle
1799 + //#define ARC_SEGMENTS_PER_SEC 50 // Use feedrate to choose segment length (with MM_PER_ARC_SEGMENT as the minimum)
1800 + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections
1801 + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
1802 + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
1803 + //#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure
1804 + #endif
1805 +
1806 + // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
1807 + //#define BEZIER_CURVE_SUPPORT
1808 +
1809 + /**
1810 + * Direct Stepping
1811 + *
1812 + * Comparable to the method used by Klipper, G6 direct stepping significantly
1813 + * reduces motion calculations, increases top printing speeds, and results in
1814 + * less step aliasing by calculating all motions in advance.
1815 + * Preparing your G-code: https://github.com/colinrgodsey/step-daemon
1816 + */
1817 + //#define DIRECT_STEPPING
1818 +
1819 + /**
1820 + * G38 Probe Target
1821 + *
1822 + * This option adds G38.2 and G38.3 (probe towards target)
1823 + * and optionally G38.4 and G38.5 (probe away from target).
1824 + * Set MULTIPLE_PROBING for G38 to probe more than once.
1825 + */
1826 + //#define G38_PROBE_TARGET
1827 + #if ENABLED(G38_PROBE_TARGET)
1828 + //#define G38_PROBE_AWAY // Include G38.4 and G38.5 to probe away from target
1829 + #define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move.
1830 + #endif
1831 +
1832 + // Moves (or segments) with fewer steps than this will be joined with the next move
1833 + #define MIN_STEPS_PER_SEGMENT 6
1834 +
1835 + /**
1836 + * Minimum delay before and after setting the stepper DIR (in ns)
1837 + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire)
1838 + * 20 : Minimum for TMC2xxx drivers
1839 + * 200 : Minimum for A4988 drivers
1840 + * 400 : Minimum for A5984 drivers
1841 + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet)
1842 + * 650 : Minimum for DRV8825 drivers
1843 + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet)
1844 + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet)
1845 + *
1846 + * Override the default value based on the driver type set in Configuration.h.
1847 + */
1848 + //#define MINIMUM_STEPPER_POST_DIR_DELAY 650
1849 + //#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
1850 +
1851 + /**
1852 + * Minimum stepper driver pulse width (in µs)
1853 + * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers
1854 + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h
1855 + * 1 : Minimum for A4988 and A5984 stepper drivers
1856 + * 2 : Minimum for DRV8825 stepper drivers
1857 + * 3 : Minimum for TB6600 stepper drivers
1858 + * 30 : Minimum for TB6560 stepper drivers
1859 + *
1860 + * Override the default value based on the driver type set in Configuration.h.
1861 + */
1862 + //#define MINIMUM_STEPPER_PULSE 2
1863 +
1864 + /**
1865 + * Maximum stepping rate (in Hz) the stepper driver allows
1866 + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE)
1867 + * 5000000 : Maximum for TMC2xxx stepper drivers
1868 + * 1000000 : Maximum for LV8729 stepper driver
1869 + * 500000 : Maximum for A4988 stepper driver
1870 + * 250000 : Maximum for DRV8825 stepper driver
1871 + * 150000 : Maximum for TB6600 stepper driver
1872 + * 15000 : Maximum for TB6560 stepper driver
1873 + *
1874 + * Override the default value based on the driver type set in Configuration.h.
1875 + */
1876 + //#define MAXIMUM_STEPPER_RATE 250000
1877 +
1878 + // @section temperature
1879 +
1880 + // Control heater 0 and heater 1 in parallel.
1881 + //#define HEATERS_PARALLEL
1882 +
1883 + //===========================================================================
1884 + //================================= Buffers =================================
1885 + //===========================================================================
1886 +
1887 + // @section motion
1888 +
1889 + // The number of linear moves that can be in the planner at once.
1890 + // The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g. 8, 16, 32)
1891 + #if BOTH(SDSUPPORT, DIRECT_STEPPING)
1892 + #define BLOCK_BUFFER_SIZE 8
1893 + #elif ENABLED(SDSUPPORT)
1894 + #define BLOCK_BUFFER_SIZE 16
1895 + #else
1896 + #define BLOCK_BUFFER_SIZE 16
1897 + #endif
1898 +
1899 + // @section serial
1900 +
1901 + // The ASCII buffer for serial input
1902 + #define MAX_CMD_SIZE 96
1903 + #define BUFSIZE 4
1904 +
1905 + // Transmission to Host Buffer Size
1906 + // To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
1907 + // To buffer a simple "ok" you need 4 bytes.
1908 + // For ADVANCED_OK (M105) you need 32 bytes.
1909 + // For debug-echo: 128 bytes for the optimal speed.
1910 + // Other output doesn't need to be that speedy.
1911 + // :[0, 2, 4, 8, 16, 32, 64, 128, 256]
1912 + #define TX_BUFFER_SIZE 0
1913 +
1914 + // Host Receive Buffer Size
1915 + // Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
1916 + // To use flow control, set this buffer size to at least 1024 bytes.
1917 + // :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
1918 + //#define RX_BUFFER_SIZE 1024
1919 +
1920 + #if RX_BUFFER_SIZE >= 1024
1921 + // Enable to have the controller send XON/XOFF control characters to
1922 + // the host to signal the RX buffer is becoming full.
1923 + //#define SERIAL_XON_XOFF
1924 + #endif
1925 +
1926 + // Add M575 G-code to change the baud rate
1927 + //#define BAUD_RATE_GCODE
1928 +
1929 + #if ENABLED(SDSUPPORT)
1930 + // Enable this option to collect and display the maximum
1931 + // RX queue usage after transferring a file to SD.
1932 + //#define SERIAL_STATS_MAX_RX_QUEUED
1933 +
1934 + // Enable this option to collect and display the number
1935 + // of dropped bytes after a file transfer to SD.
1936 + //#define SERIAL_STATS_DROPPED_RX
1937 + #endif
1938 +
1939 + /**
1940 + * Emergency Command Parser
1941 + *
1942 + * Add a low-level parser to intercept certain commands as they
1943 + * enter the serial receive buffer, so they cannot be blocked.
1944 + * Currently handles M108, M112, M410, M876
1945 + * NOTE: Not yet implemented for all platforms.
1946 + */
1947 + //#define EMERGENCY_PARSER
1948 +
1949 + // Bad Serial-connections can miss a received command by sending an 'ok'
1950 + // Therefore some clients abort after 30 seconds in a timeout.
1951 + // Some other clients start sending commands while receiving a 'wait'.
1952 + // This "wait" is only sent when the buffer is empty. 1 second is a good value here.
1953 + //#define NO_TIMEOUTS 1000 // Milliseconds
1954 +
1955 + // Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
1956 + //#define ADVANCED_OK
1957 +
1958 + // Printrun may have trouble receiving long strings all at once.
1959 + // This option inserts short delays between lines of serial output.
1960 + #define SERIAL_OVERRUN_PROTECTION
1961 +
1962 + // For serial echo, the number of digits after the decimal point
1963 + //#define SERIAL_FLOAT_PRECISION 4
1964 +
1965 + // @section extras
1966 +
1967 + /**
1968 + * Extra Fan Speed
1969 + * Adds a secondary fan speed for each print-cooling fan.
1970 + * 'M106 P<fan> T3-255' : Set a secondary speed for <fan>
1971 + * 'M106 P<fan> T2' : Use the set secondary speed
1972 + * 'M106 P<fan> T1' : Restore the previous fan speed
1973 + */
1974 + //#define EXTRA_FAN_SPEED
1975 +
1976 + /**
1977 + * Firmware-based and LCD-controlled retract
1978 + *
1979 + * Add G10 / G11 commands for automatic firmware-based retract / recover.
1980 + * Use M207 and M208 to define parameters for retract / recover.
1981 + *
1982 + * Use M209 to enable or disable auto-retract.
1983 + * With auto-retract enabled, all G1 E moves within the set range
1984 + * will be converted to firmware-based retract/recover moves.
1985 + *
1986 + * Be sure to turn off auto-retract during filament change.
1987 + *
1988 + * Note that M207 / M208 / M209 settings are saved to EEPROM.
1989 + */
1990 + //#define FWRETRACT
1991 + #if ENABLED(FWRETRACT)
1992 + #define FWRETRACT_AUTORETRACT // Override slicer retractions
1993 + #if ENABLED(FWRETRACT_AUTORETRACT)
1994 + #define MIN_AUTORETRACT 0.1 // (mm) Don't convert E moves under this length
1995 + #define MAX_AUTORETRACT 10.0 // (mm) Don't convert E moves over this length
1996 + #endif
1997 + #define RETRACT_LENGTH 3 // (mm) Default retract length (positive value)
1998 + #define RETRACT_LENGTH_SWAP 13 // (mm) Default swap retract length (positive value)
1999 + #define RETRACT_FEEDRATE 45 // (mm/s) Default feedrate for retracting
2000 + #define RETRACT_ZRAISE 0 // (mm) Default retract Z-raise
2001 + #define RETRACT_RECOVER_LENGTH 0 // (mm) Default additional recover length (added to retract length on recover)
2002 + #define RETRACT_RECOVER_LENGTH_SWAP 0 // (mm) Default additional swap recover length (added to retract length on recover from toolchange)
2003 + #define RETRACT_RECOVER_FEEDRATE 8 // (mm/s) Default feedrate for recovering from retraction
2004 + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // (mm/s) Default feedrate for recovering from swap retraction
2005 + #if ENABLED(MIXING_EXTRUDER)
2006 + //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously
2007 + #endif
2008 + #endif
2009 +
2010 + /**
2011 + * Universal tool change settings.
2012 + * Applies to all types of extruders except where explicitly noted.
2013 + */
2014 + #if HAS_MULTI_EXTRUDER
2015 + // Z raise distance for tool-change, as needed for some extruders
2016 + #define TOOLCHANGE_ZRAISE 2 // (mm)
2017 + //#define TOOLCHANGE_ZRAISE_BEFORE_RETRACT // Apply raise before swap retraction (if enabled)
2018 + //#define TOOLCHANGE_NO_RETURN // Never return to previous position on tool-change
2019 + #if ENABLED(TOOLCHANGE_NO_RETURN)
2020 + //#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // Extra G-code to run after tool-change
2021 + #endif
2022 +
2023 + /**
2024 + * Retract and prime filament on tool-change to reduce
2025 + * ooze and stringing and to get cleaner transitions.
2026 + */
2027 + //#define TOOLCHANGE_FILAMENT_SWAP
2028 + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
2029 + // Load / Unload
2030 + #define TOOLCHANGE_FS_LENGTH 12 // (mm) Load / Unload length
2031 + #define TOOLCHANGE_FS_EXTRA_RESUME_LENGTH 0 // (mm) Extra length for better restart, fine tune by LCD/Gcode)
2032 + #define TOOLCHANGE_FS_RETRACT_SPEED (50*60) // (mm/min) (Unloading)
2033 + #define TOOLCHANGE_FS_UNRETRACT_SPEED (25*60) // (mm/min) (On SINGLENOZZLE or Bowden loading must be slowed down)
2034 +
2035 + // Longer prime to clean out a SINGLENOZZLE
2036 + #define TOOLCHANGE_FS_EXTRA_PRIME 0 // (mm) Extra priming length
2037 + #define TOOLCHANGE_FS_PRIME_SPEED (4.6*60) // (mm/min) Extra priming feedrate
2038 + #define TOOLCHANGE_FS_WIPE_RETRACT 0 // (mm/min) Retract before cooling for less stringing, better wipe, etc.
2039 +
2040 + // Cool after prime to reduce stringing
2041 + #define TOOLCHANGE_FS_FAN -1 // Fan index or -1 to skip
2042 + #define TOOLCHANGE_FS_FAN_SPEED 255 // 0-255
2043 + #define TOOLCHANGE_FS_FAN_TIME 10 // (seconds)
2044 +
2045 + // Swap uninitialized extruder with TOOLCHANGE_FS_PRIME_SPEED for all lengths (recover + prime)
2046 + // (May break filament if not retracted beforehand.)
2047 + //#define TOOLCHANGE_FS_INIT_BEFORE_SWAP
2048 +
2049 + // Prime on the first T0 (If other, TOOLCHANGE_FS_INIT_BEFORE_SWAP applied)
2050 + // Enable it (M217 V[0/1]) before printing, to avoid unwanted priming on host connect
2051 + //#define TOOLCHANGE_FS_PRIME_FIRST_USED
2052 +
2053 + /**
2054 + * Tool Change Migration
2055 + * This feature provides G-code and LCD options to switch tools mid-print.
2056 + * All applicable tool properties are migrated so the print can continue.
2057 + * Tools must be closely matching and other restrictions may apply.
2058 + * Useful to:
2059 + * - Change filament color without interruption
2060 + * - Switch spools automatically on filament runout
2061 + * - Switch to a different nozzle on an extruder jam
2062 + */
2063 + #define TOOLCHANGE_MIGRATION_FEATURE
2064 +
2065 + #endif
2066 +
2067 + /**
2068 + * Position to park head during tool change.
2069 + * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER
2070 + */
2071 + //#define TOOLCHANGE_PARK
2072 + #if ENABLED(TOOLCHANGE_PARK)
2073 + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 }
2074 + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/min)
2075 + //#define TOOLCHANGE_PARK_X_ONLY // X axis only move
2076 + //#define TOOLCHANGE_PARK_Y_ONLY // Y axis only move
2077 + #endif
2078 + #endif // HAS_MULTI_EXTRUDER
2079 +
2080 + /**
2081 + * Advanced Pause
2082 + * Experimental feature for filament change support and for parking the nozzle when paused.
2083 + * Adds the GCode M600 for initiating filament change.
2084 + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle.
2085 + *
2086 + * Requires an LCD display.
2087 + * Requires NOZZLE_PARK_FEATURE.
2088 + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT.
2089 + */
2090 + //#define ADVANCED_PAUSE_FEATURE
2091 + #if ENABLED(ADVANCED_PAUSE_FEATURE)
2092 + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
2093 + #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
2094 + // This short retract is done immediately, before parking the nozzle.
2095 + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
2096 + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
2097 + #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
2098 + // For Bowden, the full length of the tube and nozzle.
2099 + // For direct drive, the full length of the nozzle.
2100 + // Set to 0 for manual unloading.
2101 + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
2102 + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
2103 + // 0 to disable start loading and skip to fast load only
2104 + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
2105 + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
2106 + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle.
2107 + // For Bowden, the full length of the tube and nozzle.
2108 + // For direct drive, the full length of the nozzle.
2109 + //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
2110 + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
2111 + #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
2112 + // Set to 0 for manual extrusion.
2113 + // Filament can be extruded repeatedly from the Filament Change menu
2114 + // until extrusion is consistent, and to purge old filament.
2115 + #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
2116 + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
2117 +
2118 + // Filament Unload does a Retract, Delay, and Purge first:
2119 + #define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
2120 + #define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract.
2121 + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
2122 + #define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload
2123 +
2124 + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
2125 + #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
2126 + #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
2127 +
2128 + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
2129 + //#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change
2130 +
2131 + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
2132 + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
2133 + #endif
2134 +
2135 + // @section tmc
2136 +
2137 + /**
2138 + * TMC26X Stepper Driver options
2139 + *
2140 + * The TMC26XStepper library is required for this stepper driver.
2141 + * https://github.com/trinamic/TMC26XStepper
2142 + */
2143 + #if HAS_DRIVER(TMC26X)
2144 +
2145 + #if AXIS_DRIVER_TYPE_X(TMC26X)
2146 + #define X_MAX_CURRENT 1000 // (mA)
2147 + #define X_SENSE_RESISTOR 91 // (mOhms)
2148 + #define X_MICROSTEPS 16 // Number of microsteps
2149 + #endif
2150 +
2151 + #if AXIS_DRIVER_TYPE_X2(TMC26X)
2152 + #define X2_MAX_CURRENT 1000
2153 + #define X2_SENSE_RESISTOR 91
2154 + #define X2_MICROSTEPS 16
2155 + #endif
2156 +
2157 + #if AXIS_DRIVER_TYPE_Y(TMC26X)
2158 + #define Y_MAX_CURRENT 1000
2159 + #define Y_SENSE_RESISTOR 91
2160 + #define Y_MICROSTEPS 16
2161 + #endif
2162 +
2163 + #if AXIS_DRIVER_TYPE_Y2(TMC26X)
2164 + #define Y2_MAX_CURRENT 1000
2165 + #define Y2_SENSE_RESISTOR 91
2166 + #define Y2_MICROSTEPS 16
2167 + #endif
2168 +
2169 + #if AXIS_DRIVER_TYPE_Z(TMC26X)
2170 + #define Z_MAX_CURRENT 1000
2171 + #define Z_SENSE_RESISTOR 91
2172 + #define Z_MICROSTEPS 16
2173 + #endif
2174 +
2175 + #if AXIS_DRIVER_TYPE_Z2(TMC26X)
2176 + #define Z2_MAX_CURRENT 1000
2177 + #define Z2_SENSE_RESISTOR 91
2178 + #define Z2_MICROSTEPS 16
2179 + #endif
2180 +
2181 + #if AXIS_DRIVER_TYPE_Z3(TMC26X)
2182 + #define Z3_MAX_CURRENT 1000
2183 + #define Z3_SENSE_RESISTOR 91
2184 + #define Z3_MICROSTEPS 16
2185 + #endif
2186 +
2187 + #if AXIS_DRIVER_TYPE_Z4(TMC26X)
2188 + #define Z4_MAX_CURRENT 1000
2189 + #define Z4_SENSE_RESISTOR 91
2190 + #define Z4_MICROSTEPS 16
2191 + #endif
2192 +
2193 + #if AXIS_DRIVER_TYPE_E0(TMC26X)
2194 + #define E0_MAX_CURRENT 1000
2195 + #define E0_SENSE_RESISTOR 91
2196 + #define E0_MICROSTEPS 16
2197 + #endif
2198 +
2199 + #if AXIS_DRIVER_TYPE_E1(TMC26X)
2200 + #define E1_MAX_CURRENT 1000
2201 + #define E1_SENSE_RESISTOR 91
2202 + #define E1_MICROSTEPS 16
2203 + #endif
2204 +
2205 + #if AXIS_DRIVER_TYPE_E2(TMC26X)
2206 + #define E2_MAX_CURRENT 1000
2207 + #define E2_SENSE_RESISTOR 91
2208 + #define E2_MICROSTEPS 16
2209 + #endif
2210 +
2211 + #if AXIS_DRIVER_TYPE_E3(TMC26X)
2212 + #define E3_MAX_CURRENT 1000
2213 + #define E3_SENSE_RESISTOR 91
2214 + #define E3_MICROSTEPS 16
2215 + #endif
2216 +
2217 + #if AXIS_DRIVER_TYPE_E4(TMC26X)
2218 + #define E4_MAX_CURRENT 1000
2219 + #define E4_SENSE_RESISTOR 91
2220 + #define E4_MICROSTEPS 16
2221 + #endif
2222 +
2223 + #if AXIS_DRIVER_TYPE_E5(TMC26X)
2224 + #define E5_MAX_CURRENT 1000
2225 + #define E5_SENSE_RESISTOR 91
2226 + #define E5_MICROSTEPS 16
2227 + #endif
2228 +
2229 + #if AXIS_DRIVER_TYPE_E6(TMC26X)
2230 + #define E6_MAX_CURRENT 1000
2231 + #define E6_SENSE_RESISTOR 91
2232 + #define E6_MICROSTEPS 16
2233 + #endif
2234 +
2235 + #if AXIS_DRIVER_TYPE_E7(TMC26X)
2236 + #define E7_MAX_CURRENT 1000
2237 + #define E7_SENSE_RESISTOR 91
2238 + #define E7_MICROSTEPS 16
2239 + #endif
2240 +
2241 + #endif // TMC26X
2242 +
2243 + // @section tmc_smart
2244 +
2245 + /**
2246 + * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode
2247 + * connect your SPI pins to the hardware SPI interface on your board and define
2248 + * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3
2249 + * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.).
2250 + * You may also use software SPI if you wish to use general purpose IO pins.
2251 + *
2252 + * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN
2253 + * to the driver side PDN_UART pin with a 1K resistor.
2254 + * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without
2255 + * a resistor.
2256 + * The drivers can also be used with hardware serial.
2257 + *
2258 + * TMCStepper library is required to use TMC stepper drivers.
2259 + * https://github.com/teemuatlut/TMCStepper
2260 + */
2261 + #if HAS_TRINAMIC_CONFIG
2262 +
2263 + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
2264 + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
2265 +
2266 + #if AXIS_IS_TMC(X)
2267 + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current.
2268 + #define X_CURRENT_HOME X_CURRENT // (mA) RMS current for sensorless homing
2269 + #define X_MICROSTEPS 16 // 0..256
2270 + #define X_RSENSE 0.11
2271 + #define X_CHAIN_POS -1 // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
2272 + #endif
2273 +
2274 + #if AXIS_IS_TMC(X2)
2275 + #define X2_CURRENT 800
2276 + #define X2_CURRENT_HOME X2_CURRENT
2277 + #define X2_MICROSTEPS 16
2278 + #define X2_RSENSE 0.11
2279 + #define X2_CHAIN_POS -1
2280 + #endif
2281 +
2282 + #if AXIS_IS_TMC(Y)
2283 + #define Y_CURRENT 800
2284 + #define Y_CURRENT_HOME Y_CURRENT
2285 + #define Y_MICROSTEPS 16
2286 + #define Y_RSENSE 0.11
2287 + #define Y_CHAIN_POS -1
2288 + #endif
2289 +
2290 + #if AXIS_IS_TMC(Y2)
2291 + #define Y2_CURRENT 800
2292 + #define Y2_CURRENT_HOME Y2_CURRENT
2293 + #define Y2_MICROSTEPS 16
2294 + #define Y2_RSENSE 0.11
2295 + #define Y2_CHAIN_POS -1
2296 + #endif
2297 +
2298 + #if AXIS_IS_TMC(Z)
2299 + #define Z_CURRENT 800
2300 + #define Z_CURRENT_HOME Z_CURRENT
2301 + #define Z_MICROSTEPS 16
2302 + #define Z_RSENSE 0.11
2303 + #define Z_CHAIN_POS -1
2304 + #endif
2305 +
2306 + #if AXIS_IS_TMC(Z2)
2307 + #define Z2_CURRENT 800
2308 + #define Z2_CURRENT_HOME Z2_CURRENT
2309 + #define Z2_MICROSTEPS 16
2310 + #define Z2_RSENSE 0.11
2311 + #define Z2_CHAIN_POS -1
2312 + #endif
2313 +
2314 + #if AXIS_IS_TMC(Z3)
2315 + #define Z3_CURRENT 800
2316 + #define Z3_CURRENT_HOME Z3_CURRENT
2317 + #define Z3_MICROSTEPS 16
2318 + #define Z3_RSENSE 0.11
2319 + #define Z3_CHAIN_POS -1
2320 + #endif
2321 +
2322 + #if AXIS_IS_TMC(Z4)
2323 + #define Z4_CURRENT 800
2324 + #define Z4_CURRENT_HOME Z4_CURRENT
2325 + #define Z4_MICROSTEPS 16
2326 + #define Z4_RSENSE 0.11
2327 + #define Z4_CHAIN_POS -1
2328 + #endif
2329 +
2330 + #if AXIS_IS_TMC(E0)
2331 + #define E0_CURRENT 800
2332 + #define E0_MICROSTEPS 16
2333 + #define E0_RSENSE 0.11
2334 + #define E0_CHAIN_POS -1
2335 + #endif
2336 +
2337 + #if AXIS_IS_TMC(E1)
2338 + #define E1_CURRENT 800
2339 + #define E1_MICROSTEPS 16
2340 + #define E1_RSENSE 0.11
2341 + #define E1_CHAIN_POS -1
2342 + #endif
2343 +
2344 + #if AXIS_IS_TMC(E2)
2345 + #define E2_CURRENT 800
2346 + #define E2_MICROSTEPS 16
2347 + #define E2_RSENSE 0.11
2348 + #define E2_CHAIN_POS -1
2349 + #endif
2350 +
2351 + #if AXIS_IS_TMC(E3)
2352 + #define E3_CURRENT 800
2353 + #define E3_MICROSTEPS 16
2354 + #define E3_RSENSE 0.11
2355 + #define E3_CHAIN_POS -1
2356 + #endif
2357 +
2358 + #if AXIS_IS_TMC(E4)
2359 + #define E4_CURRENT 800
2360 + #define E4_MICROSTEPS 16
2361 + #define E4_RSENSE 0.11
2362 + #define E4_CHAIN_POS -1
2363 + #endif
2364 +
2365 + #if AXIS_IS_TMC(E5)
2366 + #define E5_CURRENT 800
2367 + #define E5_MICROSTEPS 16
2368 + #define E5_RSENSE 0.11
2369 + #define E5_CHAIN_POS -1
2370 + #endif
2371 +
2372 + #if AXIS_IS_TMC(E6)
2373 + #define E6_CURRENT 800
2374 + #define E6_MICROSTEPS 16
2375 + #define E6_RSENSE 0.11
2376 + #define E6_CHAIN_POS -1
2377 + #endif
2378 +
2379 + #if AXIS_IS_TMC(E7)
2380 + #define E7_CURRENT 800
2381 + #define E7_MICROSTEPS 16
2382 + #define E7_RSENSE 0.11
2383 + #define E7_CHAIN_POS -1
2384 + #endif
2385 +
2386 + /**
2387 + * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here.
2388 + * The default pins can be found in your board's pins file.
2389 + */
2390 + //#define X_CS_PIN -1
2391 + //#define Y_CS_PIN -1
2392 + //#define Z_CS_PIN -1
2393 + //#define X2_CS_PIN -1
2394 + //#define Y2_CS_PIN -1
2395 + //#define Z2_CS_PIN -1
2396 + //#define Z3_CS_PIN -1
2397 + //#define E0_CS_PIN -1
2398 + //#define E1_CS_PIN -1
2399 + //#define E2_CS_PIN -1
2400 + //#define E3_CS_PIN -1
2401 + //#define E4_CS_PIN -1
2402 + //#define E5_CS_PIN -1
2403 + //#define E6_CS_PIN -1
2404 + //#define E7_CS_PIN -1
2405 +
2406 + /**
2407 + * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160).
2408 + * The default SW SPI pins are defined the respective pins files,
2409 + * but you can override or define them here.
2410 + */
2411 + //#define TMC_USE_SW_SPI
2412 + //#define TMC_SW_MOSI -1
2413 + //#define TMC_SW_MISO -1
2414 + //#define TMC_SW_SCK -1
2415 +
2416 + /**
2417 + * Four TMC2209 drivers can use the same HW/SW serial port with hardware configured addresses.
2418 + * Set the address using jumpers on pins MS1 and MS2.
2419 + * Address | MS1 | MS2
2420 + * 0 | LOW | LOW
2421 + * 1 | HIGH | LOW
2422 + * 2 | LOW | HIGH
2423 + * 3 | HIGH | HIGH
2424 + *
2425 + * Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers
2426 + * on the same serial port, either here or in your board's pins file.
2427 + */
2428 + #define X_SLAVE_ADDRESS 0
2429 + #define Y_SLAVE_ADDRESS 0
2430 + #define Z_SLAVE_ADDRESS 0
2431 + #define X2_SLAVE_ADDRESS 0
2432 + #define Y2_SLAVE_ADDRESS 0
2433 + #define Z2_SLAVE_ADDRESS 0
2434 + #define Z3_SLAVE_ADDRESS 0
2435 + #define Z4_SLAVE_ADDRESS 0
2436 + #define E0_SLAVE_ADDRESS 0
2437 + #define E1_SLAVE_ADDRESS 0
2438 + #define E2_SLAVE_ADDRESS 0
2439 + #define E3_SLAVE_ADDRESS 0
2440 + #define E4_SLAVE_ADDRESS 0
2441 + #define E5_SLAVE_ADDRESS 0
2442 + #define E6_SLAVE_ADDRESS 0
2443 + #define E7_SLAVE_ADDRESS 0
2444 +
2445 + /**
2446 + * Software enable
2447 + *
2448 + * Use for drivers that do not use a dedicated enable pin, but rather handle the same
2449 + * function through a communication line such as SPI or UART.
2450 + */
2451 + //#define SOFTWARE_DRIVER_ENABLE
2452 +
2453 + /**
2454 + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only
2455 + * Use Trinamic's ultra quiet stepping mode.
2456 + * When disabled, Marlin will use spreadCycle stepping mode.
2457 + */
2458 + #define STEALTHCHOP_XY
2459 + #define STEALTHCHOP_Z
2460 + #define STEALTHCHOP_E
2461 +
2462 + /**
2463 + * Optimize spreadCycle chopper parameters by using predefined parameter sets
2464 + * or with the help of an example included in the library.
2465 + * Provided parameter sets are
2466 + * CHOPPER_DEFAULT_12V
2467 + * CHOPPER_DEFAULT_19V
2468 + * CHOPPER_DEFAULT_24V
2469 + * CHOPPER_DEFAULT_36V
2470 + * CHOPPER_09STEP_24V // 0.9 degree steppers (24V)
2471 + * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Průša firmware for MK3 (24V)
2472 + * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9
2473 + *
2474 + * Define you own with
2475 + * { <off_time[1..15]>, <hysteresis_end[-3..12]>, hysteresis_start[1..8] }
2476 + */
2477 + #define CHOPPER_TIMING CHOPPER_DEFAULT_24V
2478 +
2479 + /**
2480 + * Monitor Trinamic drivers
2481 + * for error conditions like overtemperature and short to ground.
2482 + * To manage over-temp Marlin can decrease the driver current until the error condition clears.
2483 + * Other detected conditions can be used to stop the current print.
2484 + * Relevant G-codes:
2485 + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given.
2486 + * M911 - Report stepper driver overtemperature pre-warn condition.
2487 + * M912 - Clear stepper driver overtemperature pre-warn condition flag.
2488 + * M122 - Report driver parameters (Requires TMC_DEBUG)
2489 + */
2490 + //#define MONITOR_DRIVER_STATUS
2491 +
2492 + #if ENABLED(MONITOR_DRIVER_STATUS)
2493 + #define CURRENT_STEP_DOWN 50 // [mA]
2494 + #define REPORT_CURRENT_CHANGE
2495 + #define STOP_ON_ERROR
2496 + #endif
2497 +
2498 + /**
2499 + * TMC2130, TMC2160, TMC2208, TMC2209, TMC5130 and TMC5160 only
2500 + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD.
2501 + * This mode allows for faster movements at the expense of higher noise levels.
2502 + * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
2503 + * M913 X/Y/Z/E to live tune the setting
2504 + */
2505 + //#define HYBRID_THRESHOLD
2506 +
2507 + #define X_HYBRID_THRESHOLD 100 // [mm/s]
2508 + #define X2_HYBRID_THRESHOLD 100
2509 + #define Y_HYBRID_THRESHOLD 100
2510 + #define Y2_HYBRID_THRESHOLD 100
2511 + #define Z_HYBRID_THRESHOLD 3
2512 + #define Z2_HYBRID_THRESHOLD 3
2513 + #define Z3_HYBRID_THRESHOLD 3
2514 + #define Z4_HYBRID_THRESHOLD 3
2515 + #define E0_HYBRID_THRESHOLD 30
2516 + #define E1_HYBRID_THRESHOLD 30
2517 + #define E2_HYBRID_THRESHOLD 30
2518 + #define E3_HYBRID_THRESHOLD 30
2519 + #define E4_HYBRID_THRESHOLD 30
2520 + #define E5_HYBRID_THRESHOLD 30
2521 + #define E6_HYBRID_THRESHOLD 30
2522 + #define E7_HYBRID_THRESHOLD 30
2523 +
2524 + /**
2525 + * Use StallGuard to home / probe X, Y, Z.
2526 + *
2527 + * TMC2130, TMC2160, TMC2209, TMC2660, TMC5130, and TMC5160 only
2528 + * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin.
2529 + * X, Y, and Z homing will always be done in spreadCycle mode.
2530 + *
2531 + * X/Y/Z_STALL_SENSITIVITY is the default stall threshold.
2532 + * Use M914 X Y Z to set the stall threshold at runtime:
2533 + *
2534 + * Sensitivity TMC2209 Others
2535 + * HIGHEST 255 -64 (Too sensitive => False positive)
2536 + * LOWEST 0 63 (Too insensitive => No trigger)
2537 + *
2538 + * It is recommended to set HOMING_BUMP_MM to { 0, 0, 0 }.
2539 + *
2540 + * SPI_ENDSTOPS *** Beta feature! *** TMC2130 Only ***
2541 + * Poll the driver through SPI to determine load when homing.
2542 + * Removes the need for a wire from DIAG1 to an endstop pin.
2543 + *
2544 + * IMPROVE_HOMING_RELIABILITY tunes acceleration and jerk when
2545 + * homing and adds a guard period for endstop triggering.
2546 + *
2547 + * Comment *_STALL_SENSITIVITY to disable sensorless homing for that axis.
2548 + */
2549 + #define SENSORLESS_HOMING // StallGuard capable drivers only
2550 +
2551 + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
2552 + // TMC2209: 0...255. TMC2130: -64...63
2553 + #define X_STALL_SENSITIVITY 8
2554 + #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY
2555 + #define Y_STALL_SENSITIVITY 8
2556 + #define Y2_STALL_SENSITIVITY Y_STALL_SENSITIVITY
2557 + //#define Z_STALL_SENSITIVITY 8
2558 + //#define Z2_STALL_SENSITIVITY Z_STALL_SENSITIVITY
2559 + //#define Z3_STALL_SENSITIVITY Z_STALL_SENSITIVITY
2560 + //#define Z4_STALL_SENSITIVITY Z_STALL_SENSITIVITY
2561 + //#define SPI_ENDSTOPS // TMC2130 only
2562 + //#define IMPROVE_HOMING_RELIABILITY
2563 + #endif
2564 +
2565 + /**
2566 + * TMC Homing stepper phase.
2567 + *
2568 + * Improve homing repeatability by homing to stepper coil's nearest absolute
2569 + * phase position. Trinamic drivers use a stepper phase table with 1024 values
2570 + * spanning 4 full steps with 256 positions each (ergo, 1024 positions).
2571 + * Full step positions (128, 384, 640, 896) have the highest holding torque.
2572 + *
2573 + * Values from 0..1023, -1 to disable homing phase for that axis.
2574 + */
2575 + //#define TMC_HOME_PHASE { 896, 896, 896 }
2576 +
2577 + /**
2578 + * Beta feature!
2579 + * Create a 50/50 square wave step pulse optimal for stepper drivers.
2580 + */
2581 + //#define SQUARE_WAVE_STEPPING
2582 +
2583 + /**
2584 + * Enable M122 debugging command for TMC stepper drivers.
2585 + * M122 S0/1 will enable continous reporting.
2586 + */
2587 + #define TMC_DEBUG
2588 +
2589 + /**
2590 + * You can set your own advanced settings by filling in predefined functions.
2591 + * A list of available functions can be found on the library github page
2592 + * https://github.com/teemuatlut/TMCStepper
2593 + *
2594 + * Example:
2595 + * #define TMC_ADV() { \
2596 + * stepperX.diag0_otpw(1); \
2597 + * stepperY.intpol(0); \
2598 + * }
2599 + */
2600 + #define TMC_ADV() { }
2601 +
2602 + #endif // HAS_TRINAMIC_CONFIG
2603 +
2604 + // @section L64XX
2605 +
2606 + /**
2607 + * L64XX Stepper Driver options
2608 + *
2609 + * Arduino-L6470 library (0.8.0 or higher) is required.
2610 + * https://github.com/ameyer/Arduino-L6470
2611 + *
2612 + * Requires the following to be defined in your pins_YOUR_BOARD file
2613 + * L6470_CHAIN_SCK_PIN
2614 + * L6470_CHAIN_MISO_PIN
2615 + * L6470_CHAIN_MOSI_PIN
2616 + * L6470_CHAIN_SS_PIN
2617 + * ENABLE_RESET_L64XX_CHIPS(Q) where Q is 1 to enable and 0 to reset
2618 + */
2619 +
2620 + #if HAS_L64XX
2621 +
2622 + //#define L6470_CHITCHAT // Display additional status info
2623 +
2624 + #if AXIS_IS_L64XX(X)
2625 + #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) - L6474 max is 16
2626 + #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current
2627 + // L6470 & L6474 - VALID: 375 x (1 - 16) - 6A max - rounds down
2628 + // POWERSTEP01: VALID: 1000 x (1 - 32) - 32A max - rounds down
2629 + #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down)
2630 + // L6470 & L6474 - VALID: 31.25 * (1-128) - 4A max - rounds down
2631 + // POWERSTEP01: VALID: 200 x (1 - 32) - 6.4A max - rounds down
2632 + // L6474 - STALLCURRENT setting is used to set the nominal (TVAL) current
2633 + #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper - not used by L6474
2634 + #define X_CHAIN_POS -1 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
2635 + #define X_SLEW_RATE 1 // 0-3, Slew 0 is slowest, 3 is fastest
2636 + #endif
2637 +
2638 + #if AXIS_IS_L64XX(X2)
2639 + #define X2_MICROSTEPS 128
2640 + #define X2_OVERCURRENT 2000
2641 + #define X2_STALLCURRENT 1500
2642 + #define X2_MAX_VOLTAGE 127
2643 + #define X2_CHAIN_POS -1
2644 + #define X2_SLEW_RATE 1
2645 + #endif
2646 +
2647 + #if AXIS_IS_L64XX(Y)
2648 + #define Y_MICROSTEPS 128
2649 + #define Y_OVERCURRENT 2000
2650 + #define Y_STALLCURRENT 1500
2651 + #define Y_MAX_VOLTAGE 127
2652 + #define Y_CHAIN_POS -1
2653 + #define Y_SLEW_RATE 1
2654 + #endif
2655 +
2656 + #if AXIS_IS_L64XX(Y2)
2657 + #define Y2_MICROSTEPS 128
2658 + #define Y2_OVERCURRENT 2000
2659 + #define Y2_STALLCURRENT 1500
2660 + #define Y2_MAX_VOLTAGE 127
2661 + #define Y2_CHAIN_POS -1
2662 + #define Y2_SLEW_RATE 1
2663 + #endif
2664 +
2665 + #if AXIS_IS_L64XX(Z)
2666 + #define Z_MICROSTEPS 128
2667 + #define Z_OVERCURRENT 2000
2668 + #define Z_STALLCURRENT 1500
2669 + #define Z_MAX_VOLTAGE 127
2670 + #define Z_CHAIN_POS -1
2671 + #define Z_SLEW_RATE 1
2672 + #endif
2673 +
2674 + #if AXIS_IS_L64XX(Z2)
2675 + #define Z2_MICROSTEPS 128
2676 + #define Z2_OVERCURRENT 2000
2677 + #define Z2_STALLCURRENT 1500
2678 + #define Z2_MAX_VOLTAGE 127
2679 + #define Z2_CHAIN_POS -1
2680 + #define Z2_SLEW_RATE 1
2681 + #endif
2682 +
2683 + #if AXIS_IS_L64XX(Z3)
2684 + #define Z3_MICROSTEPS 128
2685 + #define Z3_OVERCURRENT 2000
2686 + #define Z3_STALLCURRENT 1500
2687 + #define Z3_MAX_VOLTAGE 127
2688 + #define Z3_CHAIN_POS -1
2689 + #define Z3_SLEW_RATE 1
2690 + #endif
2691 +
2692 + #if AXIS_IS_L64XX(Z4)
2693 + #define Z4_MICROSTEPS 128
2694 + #define Z4_OVERCURRENT 2000
2695 + #define Z4_STALLCURRENT 1500
2696 + #define Z4_MAX_VOLTAGE 127
2697 + #define Z4_CHAIN_POS -1
2698 + #define Z4_SLEW_RATE 1
2699 + #endif
2700 +
2701 + #if AXIS_IS_L64XX(E0)
2702 + #define E0_MICROSTEPS 128
2703 + #define E0_OVERCURRENT 2000
2704 + #define E0_STALLCURRENT 1500
2705 + #define E0_MAX_VOLTAGE 127
2706 + #define E0_CHAIN_POS -1
2707 + #define E0_SLEW_RATE 1
2708 + #endif
2709 +
2710 + #if AXIS_IS_L64XX(E1)
2711 + #define E1_MICROSTEPS 128
2712 + #define E1_OVERCURRENT 2000
2713 + #define E1_STALLCURRENT 1500
2714 + #define E1_MAX_VOLTAGE 127
2715 + #define E1_CHAIN_POS -1
2716 + #define E1_SLEW_RATE 1
2717 + #endif
2718 +
2719 + #if AXIS_IS_L64XX(E2)
2720 + #define E2_MICROSTEPS 128
2721 + #define E2_OVERCURRENT 2000
2722 + #define E2_STALLCURRENT 1500
2723 + #define E2_MAX_VOLTAGE 127
2724 + #define E2_CHAIN_POS -1
2725 + #define E2_SLEW_RATE 1
2726 + #endif
2727 +
2728 + #if AXIS_IS_L64XX(E3)
2729 + #define E3_MICROSTEPS 128
2730 + #define E3_OVERCURRENT 2000
2731 + #define E3_STALLCURRENT 1500
2732 + #define E3_MAX_VOLTAGE 127
2733 + #define E3_CHAIN_POS -1
2734 + #define E3_SLEW_RATE 1
2735 + #endif
2736 +
2737 + #if AXIS_IS_L64XX(E4)
2738 + #define E4_MICROSTEPS 128
2739 + #define E4_OVERCURRENT 2000
2740 + #define E4_STALLCURRENT 1500
2741 + #define E4_MAX_VOLTAGE 127
2742 + #define E4_CHAIN_POS -1
2743 + #define E4_SLEW_RATE 1
2744 + #endif
2745 +
2746 + #if AXIS_IS_L64XX(E5)
2747 + #define E5_MICROSTEPS 128
2748 + #define E5_OVERCURRENT 2000
2749 + #define E5_STALLCURRENT 1500
2750 + #define E5_MAX_VOLTAGE 127
2751 + #define E5_CHAIN_POS -1
2752 + #define E5_SLEW_RATE 1
2753 + #endif
2754 +
2755 + #if AXIS_IS_L64XX(E6)
2756 + #define E6_MICROSTEPS 128
2757 + #define E6_OVERCURRENT 2000
2758 + #define E6_STALLCURRENT 1500
2759 + #define E6_MAX_VOLTAGE 127
2760 + #define E6_CHAIN_POS -1
2761 + #define E6_SLEW_RATE 1
2762 + #endif
2763 +
2764 + #if AXIS_IS_L64XX(E7)
2765 + #define E7_MICROSTEPS 128
2766 + #define E7_OVERCURRENT 2000
2767 + #define E7_STALLCURRENT 1500
2768 + #define E7_MAX_VOLTAGE 127
2769 + #define E7_CHAIN_POS -1
2770 + #define E7_SLEW_RATE 1
2771 + #endif
2772 +
2773 + /**
2774 + * Monitor L6470 drivers for error conditions like over temperature and over current.
2775 + * In the case of over temperature Marlin can decrease the drive until the error condition clears.
2776 + * Other detected conditions can be used to stop the current print.
2777 + * Relevant G-codes:
2778 + * 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.
2779 + * I not present or I0 or I1 - X, Y, Z or E0
2780 + * I2 - X2, Y2, Z2 or E1
2781 + * I3 - Z3 or E3
2782 + * I4 - Z4 or E4
2783 + * I5 - E5
2784 + * M916 - Increase drive level until get thermal warning
2785 + * M917 - Find minimum current thresholds
2786 + * M918 - Increase speed until max or error
2787 + * M122 S0/1 - Report driver parameters
2788 + */
2789 + //#define MONITOR_L6470_DRIVER_STATUS
2790 +
2791 + #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
2792 + #define KVAL_HOLD_STEP_DOWN 1
2793 + //#define L6470_STOP_ON_ERROR
2794 + #endif
2795 +
2796 + #endif // HAS_L64XX
2797 +
2798 + // @section i2cbus
2799 +
2800 + //
2801 + // I2C Master ID for LPC176x LCD and Digital Current control
2802 + // Does not apply to other peripherals based on the Wire library.
2803 + //
2804 + //#define I2C_MASTER_ID 1 // Set a value from 0 to 2
2805 +
2806 + /**
2807 + * TWI/I2C BUS
2808 + *
2809 + * This feature is an EXPERIMENTAL feature so it shall not be used on production
2810 + * machines. Enabling this will allow you to send and receive I2C data from slave
2811 + * devices on the bus.
2812 + *
2813 + * ; Example #1
2814 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
2815 + * ; It uses multiple M260 commands with one B<base 10> arg
2816 + * M260 A99 ; Target slave address
2817 + * M260 B77 ; M
2818 + * M260 B97 ; a
2819 + * M260 B114 ; r
2820 + * M260 B108 ; l
2821 + * M260 B105 ; i
2822 + * M260 B110 ; n
2823 + * M260 S1 ; Send the current buffer
2824 + *
2825 + * ; Example #2
2826 + * ; Request 6 bytes from slave device with address 0x63 (99)
2827 + * M261 A99 B5
2828 + *
2829 + * ; Example #3
2830 + * ; Example serial output of a M261 request
2831 + * echo:i2c-reply: from:99 bytes:5 data:hello
2832 + */
2833 +
2834 + //#define EXPERIMENTAL_I2CBUS
2835 + #if ENABLED(EXPERIMENTAL_I2CBUS)
2836 + #define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave
2837 + #endif
2838 +
2839 + // @section extras
2840 +
2841 + /**
2842 + * Photo G-code
2843 + * Add the M240 G-code to take a photo.
2844 + * The photo can be triggered by a digital pin or a physical movement.
2845 + */
2846 + //#define PHOTO_GCODE
2847 + #if ENABLED(PHOTO_GCODE)
2848 + // A position to move to (and raise Z) before taking the photo
2849 + //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 } // { xpos, ypos, zraise } (M240 X Y Z)
2850 + //#define PHOTO_DELAY_MS 100 // (ms) Duration to pause before moving back (M240 P)
2851 + //#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S)
2852 +
2853 + // Canon RC-1 or homebrew digital camera trigger
2854 + // Data from: https://www.doc-diy.net/photo/rc-1_hacked/
2855 + //#define PHOTOGRAPH_PIN 23
2856 +
2857 + // Canon Hack Development Kit
2858 + // https://captain-slow.dk/2014/03/09/3d-printing-timelapses/
2859 + //#define CHDK_PIN 4
2860 +
2861 + // Optional second move with delay to trigger the camera shutter
2862 + //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS } // { xpos, ypos } (M240 I J)
2863 +
2864 + // Duration to hold the switch or keep CHDK_PIN high
2865 + //#define PHOTO_SWITCH_MS 50 // (ms) (M240 D)
2866 +
2867 + /**
2868 + * PHOTO_PULSES_US may need adjustment depending on board and camera model.
2869 + * Pin must be running at 48.4kHz.
2870 + * Be sure to use a PHOTOGRAPH_PIN which can rise and fall quick enough.
2871 + * (e.g., MKS SBase temp sensor pin was too slow, so used P1.23 on J8.)
2872 + *
2873 + * Example pulse data for Nikon: https://bit.ly/2FKD0Aq
2874 + * IR Wiring: https://git.io/JvJf7
2875 + */
2876 + //#define PHOTO_PULSES_US { 2000, 27850, 400, 1580, 400, 3580, 400 } // (µs) Durations for each 48.4kHz oscillation
2877 + #ifdef PHOTO_PULSES_US
2878 + #define PHOTO_PULSE_DELAY_US 13 // (µs) Approximate duration of each HIGH and LOW pulse in the oscillation
2879 + #endif
2880 + #endif
2881 +
2882 + /**
2883 + * Spindle & Laser control
2884 + *
2885 + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and
2886 + * to set spindle speed, spindle direction, and laser power.
2887 + *
2888 + * SuperPid is a router/spindle speed controller used in the CNC milling community.
2889 + * Marlin can be used to turn the spindle on and off. It can also be used to set
2890 + * the spindle speed from 5,000 to 30,000 RPM.
2891 + *
2892 + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V
2893 + * hardware PWM pin for the speed control and a pin for the rotation direction.
2894 + *
2895 + * See https://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
2896 + */
2897 + //#define SPINDLE_FEATURE
2898 + //#define LASER_FEATURE
2899 + #if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
2900 + #define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if the on/off function is active HIGH
2901 + #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power
2902 + #define SPINDLE_LASER_PWM_INVERT false // Set to "true" if the speed/power goes up when you want it to go slower
2903 +
2904 + #define SPINDLE_LASER_FREQUENCY 2500 // (Hz) Spindle/laser frequency (only on supported HALs: AVR and LPC)
2905 +
2906 + /**
2907 + * Speed / Power can be set ('M3 S') and displayed in terms of:
2908 + * - PWM255 (S0 - S255)
2909 + * - PERCENT (S0 - S100)
2910 + * - RPM (S0 - S50000) Best for use with a spindle
2911 + */
2912 + #define CUTTER_POWER_UNIT PWM255
2913 +
2914 + /**
2915 + * Relative Cutter Power
2916 + * Normally, 'M3 O<power>' sets
2917 + * OCR power is relative to the range SPEED_POWER_MIN...SPEED_POWER_MAX.
2918 + * so input powers of 0...255 correspond to SPEED_POWER_MIN...SPEED_POWER_MAX
2919 + * instead of normal range (0 to SPEED_POWER_MAX).
2920 + * Best used with (e.g.) SuperPID router controller: S0 = 5,000 RPM and S255 = 30,000 RPM
2921 + */
2922 + //#define CUTTER_POWER_RELATIVE // Set speed proportional to [SPEED_POWER_MIN...SPEED_POWER_MAX]
2923 +
2924 + #if ENABLED(SPINDLE_FEATURE)
2925 + //#define SPINDLE_CHANGE_DIR // Enable if your spindle controller can change spindle direction
2926 + #define SPINDLE_CHANGE_DIR_STOP // Enable if the spindle should stop before changing spin direction
2927 + #define SPINDLE_INVERT_DIR false // Set to "true" if the spin direction is reversed
2928 +
2929 + #define SPINDLE_LASER_POWERUP_DELAY 5000 // (ms) Delay to allow the spindle/laser to come up to speed/power
2930 + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // (ms) Delay to allow the spindle to stop
2931 +
2932 + /**
2933 + * M3/M4 Power Equation
2934 + *
2935 + * Each tool uses different value ranges for speed / power control.
2936 + * These parameters are used to convert between tool power units and PWM.
2937 + *
2938 + * Speed/Power = (PWMDC / 255 * 100 - SPEED_POWER_INTERCEPT) / SPEED_POWER_SLOPE
2939 + * PWMDC = (spdpwr - SPEED_POWER_MIN) / (SPEED_POWER_MAX - SPEED_POWER_MIN) / SPEED_POWER_SLOPE
2940 + */
2941 + #define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
2942 + #define SPEED_POWER_MIN 5000 // (RPM)
2943 + #define SPEED_POWER_MAX 30000 // (RPM) SuperPID router controller 0 - 30,000 RPM
2944 + #define SPEED_POWER_STARTUP 25000 // (RPM) M3/M4 speed/power default (with no arguments)
2945 +
2946 + #else
2947 +
2948 + #define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage
2949 + #define SPEED_POWER_MIN 0 // (%) 0-100
2950 + #define SPEED_POWER_MAX 100 // (%) 0-100
2951 + #define SPEED_POWER_STARTUP 80 // (%) M3/M4 speed/power default (with no arguments)
2952 +
2953 + /**
2954 + * Enable inline laser power to be handled in the planner / stepper routines.
2955 + * Inline power is specified by the I (inline) flag in an M3 command (e.g., M3 S20 I)
2956 + * or by the 'S' parameter in G0/G1/G2/G3 moves (see LASER_MOVE_POWER).
2957 + *
2958 + * This allows the laser to keep in perfect sync with the planner and removes
2959 + * the powerup/down delay since lasers require negligible time.
2960 + */
2961 + #define LASER_POWER_INLINE
2962 +
2963 + #if ENABLED(LASER_POWER_INLINE)
2964 + /**
2965 + * Scale the laser's power in proportion to the movement rate.
2966 + *
2967 + * - Sets the entry power proportional to the entry speed over the nominal speed.
2968 + * - Ramps the power up every N steps to approximate the speed trapezoid.
2969 + * - Due to the limited power resolution this is only approximate.
2970 + */
2971 + #define LASER_POWER_INLINE_TRAPEZOID
2972 +
2973 + /**
2974 + * Continuously calculate the current power (nominal_power * current_rate / nominal_rate).
2975 + * Required for accurate power with non-trapezoidal acceleration (e.g., S_CURVE_ACCELERATION).
2976 + * This is a costly calculation so this option is discouraged on 8-bit AVR boards.
2977 + *
2978 + * LASER_POWER_INLINE_TRAPEZOID_CONT_PER defines how many step cycles there are between power updates. If your
2979 + * board isn't able to generate steps fast enough (and you are using LASER_POWER_INLINE_TRAPEZOID_CONT), increase this.
2980 + * Note that when this is zero it means it occurs every cycle; 1 means a delay wait one cycle then run, etc.
2981 + */
2982 + //#define LASER_POWER_INLINE_TRAPEZOID_CONT
2983 +
2984 + /**
2985 + * Stepper iterations between power updates. Increase this value if the board
2986 + * can't keep up with the processing demands of LASER_POWER_INLINE_TRAPEZOID_CONT.
2987 + * Disable (or set to 0) to recalculate power on every stepper iteration.
2988 + */
2989 + //#define LASER_POWER_INLINE_TRAPEZOID_CONT_PER 10
2990 +
2991 + /**
2992 + * Include laser power in G0/G1/G2/G3/G5 commands with the 'S' parameter
2993 + */
2994 + //#define LASER_MOVE_POWER
2995 +
2996 + #if ENABLED(LASER_MOVE_POWER)
2997 + // Turn off the laser on G0 moves with no power parameter.
2998 + // If a power parameter is provided, use that instead.
2999 + //#define LASER_MOVE_G0_OFF
3000 +
3001 + // Turn off the laser on G28 homing.
3002 + //#define LASER_MOVE_G28_OFF
3003 + #endif
3004 +
3005 + /**
3006 + * Inline flag inverted
3007 + *
3008 + * WARNING: M5 will NOT turn off the laser unless another move
3009 + * is done (so G-code files must end with 'M5 I').
3010 + */
3011 + //#define LASER_POWER_INLINE_INVERT
3012 +
3013 + /**
3014 + * Continuously apply inline power. ('M3 S3' == 'G1 S3' == 'M3 S3 I')
3015 + *
3016 + * The laser might do some weird things, so only enable this
3017 + * feature if you understand the implications.
3018 + */
3019 + //#define LASER_POWER_INLINE_CONTINUOUS
3020 +
3021 + #else
3022 +
3023 + #define SPINDLE_LASER_POWERUP_DELAY 50 // (ms) Delay to allow the spindle/laser to come up to speed/power
3024 + #define SPINDLE_LASER_POWERDOWN_DELAY 50 // (ms) Delay to allow the spindle to stop
3025 +
3026 + #endif
3027 + #endif
3028 + #endif
3029 +
3030 + /**
3031 + * Coolant Control
3032 + *
3033 + * Add the M7, M8, and M9 commands to turn mist or flood coolant on and off.
3034 + *
3035 + * Note: COOLANT_MIST_PIN and/or COOLANT_FLOOD_PIN must also be defined.
3036 + */
3037 + //#define COOLANT_CONTROL
3038 + #if ENABLED(COOLANT_CONTROL)
3039 + #define COOLANT_MIST // Enable if mist coolant is present
3040 + #define COOLANT_FLOOD // Enable if flood coolant is present
3041 + #define COOLANT_MIST_INVERT false // Set "true" if the on/off function is reversed
3042 + #define COOLANT_FLOOD_INVERT false // Set "true" if the on/off function is reversed
3043 + #endif
3044 +
3045 + /**
3046 + * Filament Width Sensor
3047 + *
3048 + * Measures the filament width in real-time and adjusts
3049 + * flow rate to compensate for any irregularities.
3050 + *
3051 + * Also allows the measured filament diameter to set the
3052 + * extrusion rate, so the slicer only has to specify the
3053 + * volume.
3054 + *
3055 + * Only a single extruder is supported at this time.
3056 + *
3057 + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector
3058 + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
3059 + * 301 RAMBO : Analog input 3
3060 + *
3061 + * Note: May require analog pins to be defined for other boards.
3062 + */
3063 + //#define FILAMENT_WIDTH_SENSOR
3064 +
3065 + #if ENABLED(FILAMENT_WIDTH_SENSOR)
3066 + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4]
3067 + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
3068 +
3069 + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
3070 + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
3071 +
3072 + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
3073 +
3074 + // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
3075 + //#define FILAMENT_LCD_DISPLAY
3076 + #endif
3077 +
3078 + /**
3079 + * Power Monitor
3080 + * Monitor voltage (V) and/or current (A), and -when possible- power (W)
3081 + *
3082 + * Read and configure with M430
3083 + *
3084 + * The current sensor feeds DC voltage (relative to the measured current) to an analog pin
3085 + * The voltage sensor feeds DC voltage (relative to the measured voltage) to an analog pin
3086 + */
3087 + //#define POWER_MONITOR_CURRENT // Monitor the system current
3088 + //#define POWER_MONITOR_VOLTAGE // Monitor the system voltage
3089 + #if EITHER(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE)
3090 + #define POWER_MONITOR_VOLTS_PER_AMP 0.05000 // Input voltage to the MCU analog pin per amp - DO NOT apply more than ADC_VREF!
3091 + #define POWER_MONITOR_CURRENT_OFFSET -1 // Offset value for current sensors with linear function output
3092 + #define POWER_MONITOR_VOLTS_PER_VOLT 0.11786 // Input voltage to the MCU analog pin per volt - DO NOT apply more than ADC_VREF!
3093 + #define POWER_MONITOR_FIXED_VOLTAGE 13.6 // Voltage for a current sensor with no voltage sensor (for power display)
3094 + #endif
3095 +
3096 + /**
3097 + * CNC Coordinate Systems
3098 + *
3099 + * Enables G53 and G54-G59.3 commands to select coordinate systems
3100 + * and G92.1 to reset the workspace to native machine space.
3101 + */
3102 + //#define CNC_COORDINATE_SYSTEMS
3103 +
3104 + /**
3105 + * Auto-report temperatures with M155 S<seconds>
3106 + */
3107 + #define AUTO_REPORT_TEMPERATURES
3108 +
3109 + /**
3110 + * Include capabilities in M115 output
3111 + */
3112 + #define EXTENDED_CAPABILITIES_REPORT
3113 + #if ENABLED(EXTENDED_CAPABILITIES_REPORT)
3114 + //#define M115_GEOMETRY_REPORT
3115 + #endif
3116 +
3117 + /**
3118 + * Expected Printer Check
3119 + * Add the M16 G-code to compare a string to the MACHINE_NAME.
3120 + * M16 with a non-matching string causes the printer to halt.
3121 + */
3122 + //#define EXPECTED_PRINTER_CHECK
3123 +
3124 + /**
3125 + * Disable all Volumetric extrusion options
3126 + */
3127 + //#define NO_VOLUMETRICS
3128 +
3129 + #if DISABLED(NO_VOLUMETRICS)
3130 + /**
3131 + * Volumetric extrusion default state
3132 + * Activate to make volumetric extrusion the default method,
3133 + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter.
3134 + *
3135 + * M200 D0 to disable, M200 Dn to set a new diameter (and enable volumetric).
3136 + * M200 S0/S1 to disable/enable volumetric extrusion.
3137 + */
3138 + //#define VOLUMETRIC_DEFAULT_ON
3139 +
3140 + //#define VOLUMETRIC_EXTRUDER_LIMIT
3141 + #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT)
3142 + /**
3143 + * Default volumetric extrusion limit in cubic mm per second (mm^3/sec).
3144 + * This factory setting applies to all extruders.
3145 + * Use 'M200 [T<extruder>] L<limit>' to override and 'M502' to reset.
3146 + * A non-zero value activates Volume-based Extrusion Limiting.
3147 + */
3148 + #define DEFAULT_VOLUMETRIC_EXTRUDER_LIMIT 0.00 // (mm^3/sec)
3149 + #endif
3150 + #endif
3151 +
3152 + /**
3153 + * Enable this option for a leaner build of Marlin that removes all
3154 + * workspace offsets, simplifying coordinate transformations, leveling, etc.
3155 + *
3156 + * - M206 and M428 are disabled.
3157 + * - G92 will revert to its behavior from Marlin 1.0.
3158 + */
3159 + //#define NO_WORKSPACE_OFFSETS
3160 +
3161 + // Extra options for the M114 "Current Position" report
3162 + //#define M114_DETAIL // Use 'M114` for details to check planner calculations
3163 + //#define M114_REALTIME // Real current position based on forward kinematics
3164 + //#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed.
3165 +
3166 + //#define REPORT_FAN_CHANGE // Report the new fan speed when changed by M106 (and others)
3167 +
3168 + /**
3169 + * Set the number of proportional font spaces required to fill up a typical character space.
3170 + * This can help to better align the output of commands like `G29 O` Mesh Output.
3171 + *
3172 + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0.
3173 + * Otherwise, adjust according to your client and font.
3174 + */
3175 + #define PROPORTIONAL_FONT_RATIO 1.0
3176 +
3177 + /**
3178 + * Spend 28 bytes of SRAM to optimize the GCode parser
3179 + */
3180 + #define FASTER_GCODE_PARSER
3181 +
3182 + #if ENABLED(FASTER_GCODE_PARSER)
3183 + //#define GCODE_QUOTED_STRINGS // Support for quoted string parameters
3184 + #endif
3185 +
3186 + //#define GCODE_CASE_INSENSITIVE // Accept G-code sent to the firmware in lowercase
3187 +
3188 + //#define REPETIER_GCODE_M360 // Add commands originally from Repetier FW
3189 +
3190 + /**
3191 + * CNC G-code options
3192 + * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
3193 + * Note that G0 feedrates should be used with care for 3D printing (if used at all).
3194 + * High feedrates may cause ringing and harm print quality.
3195 + */
3196 + //#define PAREN_COMMENTS // Support for parentheses-delimited comments
3197 + //#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
3198 +
3199 + // Enable and set a (default) feedrate for all G0 moves
3200 + //#define G0_FEEDRATE 3000 // (mm/min)
3201 + #ifdef G0_FEEDRATE
3202 + //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode
3203 + #endif
3204 +
3205 + /**
3206 + * Startup commands
3207 + *
3208 + * Execute certain G-code commands immediately after power-on.
3209 + */
3210 + //#define STARTUP_COMMANDS "M17 Z"
3211 +
3212 + /**
3213 + * G-code Macros
3214 + *
3215 + * Add G-codes M810-M819 to define and run G-code macros.
3216 + * Macros are not saved to EEPROM.
3217 + */
3218 + //#define GCODE_MACROS
3219 + #if ENABLED(GCODE_MACROS)
3220 + #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used
3221 + #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro
3222 + #endif
3223 +
3224 + /**
3225 + * User-defined menu items that execute custom GCode
3226 + */
3227 + //#define CUSTOM_USER_MENUS
3228 + #if ENABLED(CUSTOM_USER_MENUS)
3229 + //#define CUSTOM_USER_MENU_TITLE "Custom Commands"
3230 + #define USER_SCRIPT_DONE "M117 User Script Done"
3231 + #define USER_SCRIPT_AUDIBLE_FEEDBACK
3232 + //#define USER_SCRIPT_RETURN // Return to status screen after a script
3233 +
3234 + #define USER_DESC_1 "Home & UBL Info"
3235 + #define USER_GCODE_1 "G28\nG29 W"
3236 +
3237 + #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL
3238 + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
3239 +
3240 + #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL
3241 + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
3242 +
3243 + #define USER_DESC_4 "Heat Bed/Home/Level"
3244 + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
3245 +
3246 + #define USER_DESC_5 "Home & Info"
3247 + #define USER_GCODE_5 "G28\nM503"
3248 + #endif
3249 +
3250 + /**
3251 + * Host Action Commands
3252 + *
3253 + * Define host streamer action commands in compliance with the standard.
3254 + *
3255 + * See https://reprap.org/wiki/G-code#Action_commands
3256 + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel
3257 + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed
3258 + *
3259 + * Some features add reason codes to extend these commands.
3260 + *
3261 + * Host Prompt Support enables Marlin to use the host for user prompts so
3262 + * filament runout and other processes can be managed from the host side.
3263 + */
3264 + //#define HOST_ACTION_COMMANDS
3265 + #if ENABLED(HOST_ACTION_COMMANDS)
3266 + //#define HOST_PROMPT_SUPPORT
3267 + //#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
3268 + #endif
3269 +
3270 + /**
3271 + * Cancel Objects
3272 + *
3273 + * Implement M486 to allow Marlin to skip objects
3274 + */
3275 + //#define CANCEL_OBJECTS
3276 +
3277 + /**
3278 + * I2C position encoders for closed loop control.
3279 + * Developed by Chris Barr at Aus3D.
3280 + *
3281 + * Wiki: https://wiki.aus3d.com.au/Magnetic_Encoder
3282 + * Github: https://github.com/Aus3D/MagneticEncoder
3283 + *
3284 + * Supplier: https://aus3d.com.au/magnetic-encoder-module
3285 + * Alternative Supplier: https://reliabuild3d.com/
3286 + *
3287 + * Reliabuild encoders have been modified to improve reliability.
3288 + */
3289 +
3290 + //#define I2C_POSITION_ENCODERS
3291 + #if ENABLED(I2C_POSITION_ENCODERS)
3292 +
3293 + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5
3294 + // encoders supported currently.
3295 +
3296 + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200.
3297 + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. <X|Y|Z|E>_AXIS.
3298 + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or-
3299 + // I2CPE_ENC_TYPE_ROTARY.
3300 + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for
3301 + // 1mm poles. For linear encoders this is ticks / mm,
3302 + // for rotary encoders this is ticks / revolution.
3303 + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper
3304 + // steps per full revolution (motor steps/rev * microstepping)
3305 + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel.
3306 + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction.
3307 + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the
3308 + // printer will attempt to correct the error; errors
3309 + // smaller than this are ignored to minimize effects of
3310 + // measurement noise / latency (filter).
3311 +
3312 + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2.
3313 + #define I2CPE_ENC_2_AXIS Y_AXIS
3314 + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR
3315 + #define I2CPE_ENC_2_TICKS_UNIT 2048
3316 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200)
3317 + //#define I2CPE_ENC_2_INVERT
3318 + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP
3319 + #define I2CPE_ENC_2_EC_THRESH 0.10
3320 +
3321 + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options
3322 + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below.
3323 +
3324 + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4.
3325 + #define I2CPE_ENC_4_AXIS E_AXIS
3326 +
3327 + #define I2CPE_ENC_5_ADDR 34 // Encoder 5.
3328 + #define I2CPE_ENC_5_AXIS E_AXIS
3329 +
3330 + // Default settings for encoders which are enabled, but without settings configured above.
3331 + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR
3332 + #define I2CPE_DEF_ENC_TICKS_UNIT 2048
3333 + #define I2CPE_DEF_TICKS_REV (16 * 200)
3334 + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE
3335 + #define I2CPE_DEF_EC_THRESH 0.1
3336 +
3337 + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given
3338 + // axis after which the printer will abort. Comment out to
3339 + // disable abort behavior.
3340 +
3341 + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault
3342 + // for this amount of time (in ms) before the encoder
3343 + // is trusted again.
3344 +
3345 + /**
3346 + * Position is checked every time a new command is executed from the buffer but during long moves,
3347 + * this setting determines the minimum update time between checks. A value of 100 works well with
3348 + * error rolling average when attempting to correct only for skips and not for vibration.
3349 + */
3350 + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks.
3351 +
3352 + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise.
3353 + #define I2CPE_ERR_ROLLING_AVERAGE
3354 +
3355 + #endif // I2C_POSITION_ENCODERS
3356 +
3357 + /**
3358 + * Analog Joystick(s)
3359 + */
3360 + //#define JOYSTICK
3361 + #if ENABLED(JOYSTICK)
3362 + #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
3363 + #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
3364 + #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
3365 + #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
3366 +
3367 + //#define INVERT_JOY_X // Enable if X direction is reversed
3368 + //#define INVERT_JOY_Y // Enable if Y direction is reversed
3369 + //#define INVERT_JOY_Z // Enable if Z direction is reversed
3370 +
3371 + // Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
3372 + #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
3373 + #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
3374 + #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
3375 + //#define JOYSTICK_DEBUG
3376 + #endif
3377 +
3378 + /**
3379 + * Mechanical Gantry Calibration
3380 + * Modern replacement for the Prusa TMC_Z_CALIBRATION.
3381 + * Adds capability to work with any adjustable current drivers.
3382 + * Implemented as G34 because M915 is deprecated.
3383 + */
3384 + //#define MECHANICAL_GANTRY_CALIBRATION
3385 + #if ENABLED(MECHANICAL_GANTRY_CALIBRATION)
3386 + #define GANTRY_CALIBRATION_CURRENT 600 // Default calibration current in ma
3387 + #define GANTRY_CALIBRATION_EXTRA_HEIGHT 15 // Extra distance in mm past Z_###_POS to move
3388 + #define GANTRY_CALIBRATION_FEEDRATE 500 // Feedrate for correction move
3389 + //#define GANTRY_CALIBRATION_TO_MIN // Enable to calibrate Z in the MIN direction
3390 +
3391 + //#define GANTRY_CALIBRATION_SAFE_POSITION { X_CENTER, Y_CENTER } // Safe position for nozzle
3392 + //#define GANTRY_CALIBRATION_XY_PARK_FEEDRATE 3000 // XY Park Feedrate - MMM
3393 + //#define GANTRY_CALIBRATION_COMMANDS_PRE ""
3394 + #define GANTRY_CALIBRATION_COMMANDS_POST "G28" // G28 highly recommended to ensure an accurate position
3395 + #endif
3396 +
3397 + /**
3398 + * MAX7219 Debug Matrix
3399 + *
3400 + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.
3401 + * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage.
3402 + */
3403 + //#define MAX7219_DEBUG
3404 + #if ENABLED(MAX7219_DEBUG)
3405 + #define MAX7219_CLK_PIN 64
3406 + #define MAX7219_DIN_PIN 57
3407 + #define MAX7219_LOAD_PIN 44
3408 +
3409 + //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
3410 + #define MAX7219_INIT_TEST 2 // Test pattern at startup: 0=none, 1=sweep, 2=spiral
3411 + #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
3412 + #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
3413 + // connector at: right=0 bottom=-90 top=90 left=180
3414 + //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order
3415 + //#define MAX7219_SIDE_BY_SIDE // Big chip+matrix boards can be chained side-by-side
3416 +
3417 + /**
3418 + * Sample debug features
3419 + * If you add more debug displays, be careful to avoid conflicts!
3420 + */
3421 + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning
3422 + #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row
3423 + #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row
3424 +
3425 + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row
3426 + // If you experience stuttering, reboots, etc. this option can reveal how
3427 + // tweaks made to the configuration are affecting the printer in real-time.
3428 + #endif
3429 +
3430 + /**
3431 + * NanoDLP Sync support
3432 + *
3433 + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp"
3434 + * string to enable synchronization with DLP projector exposure. This change will allow to use
3435 + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands
3436 + */
3437 + //#define NANODLP_Z_SYNC
3438 + #if ENABLED(NANODLP_Z_SYNC)
3439 + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move.
3440 + // Default behavior is limited to Z axis only.
3441 + #endif
3442 +
3443 + /**
3444 + * WiFi Support (Espressif ESP32 WiFi)
3445 + */
3446 + //#define WIFISUPPORT // Marlin embedded WiFi managenent
3447 + //#define ESP3D_WIFISUPPORT // ESP3D Library WiFi management (https://github.com/luc-github/ESP3DLib)
3448 +
3449 + #if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT)
3450 + //#define WEBSUPPORT // Start a webserver (which may include auto-discovery)
3451 + //#define OTASUPPORT // Support over-the-air firmware updates
3452 + //#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host
3453 +
3454 + /**
3455 + * To set a default WiFi SSID / Password, create a file called Configuration_Secure.h with
3456 + * the following defines, customized for your network. This specific file is excluded via
3457 + * .gitignore to prevent it from accidentally leaking to the public.
3458 + *
3459 + * #define WIFI_SSID "WiFi SSID"
3460 + * #define WIFI_PWD "WiFi Password"
3461 + */
3462 + //#include "Configuration_Secure.h" // External file with WiFi SSID / Password
3463 + #endif
3464 +
3465 + /**
3466 + * Průša Multi-Material Unit v2
3467 + * Enable in Configuration.h
3468 + */
3469 + #if ENABLED(PRUSA_MMU2)
3470 +
3471 + // Serial port used for communication with MMU2.
3472 + // For AVR enable the UART port used for the MMU. (e.g., mmuSerial)
3473 + // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)
3474 + #define MMU2_SERIAL_PORT 2
3475 + #define MMU2_SERIAL mmuSerial
3476 +
3477 + // Use hardware reset for MMU if a pin is defined for it
3478 + //#define MMU2_RST_PIN 23
3479 +
3480 + // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)
3481 + //#define MMU2_MODE_12V
3482 +
3483 + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout
3484 + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600"
3485 +
3486 + // Add an LCD menu for MMU2
3487 + //#define MMU2_MENUS
3488 + #if ENABLED(MMU2_MENUS)
3489 + // Settings for filament load / unload from the LCD menu.
3490 + // This is for Průša MK3-style extruders. Customize for your hardware.
3491 + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0
3492 + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \
3493 + { 7.2, 1145 }, \
3494 + { 14.4, 871 }, \
3495 + { 36.0, 1393 }, \
3496 + { 14.4, 871 }, \
3497 + { 50.0, 198 }
3498 +
3499 + #define MMU2_RAMMING_SEQUENCE \
3500 + { 1.0, 1000 }, \
3501 + { 1.0, 1500 }, \
3502 + { 2.0, 2000 }, \
3503 + { 1.5, 3000 }, \
3504 + { 2.5, 4000 }, \
3505 + { -15.0, 5000 }, \
3506 + { -14.0, 1200 }, \
3507 + { -6.0, 600 }, \
3508 + { 10.0, 700 }, \
3509 + { -10.0, 400 }, \
3510 + { -50.0, 2000 }
3511 + #endif
3512 +
3513 + /**
3514 + * MMU Extruder Sensor
3515 + *
3516 + * Support for a Průša (or other) IR Sensor to detect filament near the extruder
3517 + * and make loading more reliable. Suitable for an extruder equipped with a filament
3518 + * sensor less than 38mm from the gears.
3519 + *
3520 + * During loading the extruder will stop when the sensor is triggered, then do a last
3521 + * move up to the gears. If no filament is detected, the MMU2 can make some more attempts.
3522 + * If all attempts fail, a filament runout will be triggered.
3523 + */
3524 + //#define MMU_EXTRUDER_SENSOR
3525 + #if ENABLED(MMU_EXTRUDER_SENSOR)
3526 + #define MMU_LOADING_ATTEMPTS_NR 5 // max. number of attempts to load filament if first load fail
3527 + #endif
3528 +
3529 + /**
3530 + * Using a sensor like the MMU2S
3531 + * This mode requires a MK3S extruder with a sensor at the extruder idler, like the MMU2S.
3532 + * See https://help.prusa3d.com/en/guide/3b-mk3s-mk2-5s-extruder-upgrade_41560, step 11
3533 + */
3534 + //#define PRUSA_MMU2_S_MODE
3535 + #if ENABLED(PRUSA_MMU2_S_MODE)
3536 + #define MMU2_C0_RETRY 5 // Number of retries (total time = timeout*retries)
3537 +
3538 + #define MMU2_CAN_LOAD_FEEDRATE 800 // (mm/min)
3539 + #define MMU2_CAN_LOAD_SEQUENCE \
3540 + { 0.1, MMU2_CAN_LOAD_FEEDRATE }, \
3541 + { 60.0, MMU2_CAN_LOAD_FEEDRATE }, \
3542 + { -52.0, MMU2_CAN_LOAD_FEEDRATE }
3543 +
3544 + #define MMU2_CAN_LOAD_RETRACT 6.0 // (mm) Keep under the distance between Load Sequence values
3545 + #define MMU2_CAN_LOAD_DEVIATION 0.8 // (mm) Acceptable deviation
3546 +
3547 + #define MMU2_CAN_LOAD_INCREMENT 0.2 // (mm) To reuse within MMU2 module
3548 + #define MMU2_CAN_LOAD_INCREMENT_SEQUENCE \
3549 + { -MMU2_CAN_LOAD_INCREMENT, MMU2_CAN_LOAD_FEEDRATE }
3550 +
3551 + #endif
3552 +
3553 + //#define MMU2_DEBUG // Write debug info to serial output
3554 +
3555 + #endif // PRUSA_MMU2
3556 +
3557 + /**
3558 + * Advanced Print Counter settings
3559 + */
3560 + #if ENABLED(PRINTCOUNTER)
3561 + #define SERVICE_WARNING_BUZZES 3
3562 + // Activate up to 3 service interval watchdogs
3563 + //#define SERVICE_NAME_1 "Service S"
3564 + //#define SERVICE_INTERVAL_1 100 // print hours
3565 + //#define SERVICE_NAME_2 "Service L"
3566 + //#define SERVICE_INTERVAL_2 200 // print hours
3567 + //#define SERVICE_NAME_3 "Service 3"
3568 + //#define SERVICE_INTERVAL_3 1 // print hours
3569 + #endif
3570 +
3571 + // @section develop
3572 +
3573 + //
3574 + // M100 Free Memory Watcher to debug memory usage
3575 + //
3576 + //#define M100_FREE_MEMORY_WATCHER
3577 +
3578 + //
3579 + // M42 - Set pin states
3580 + //
3581 + //#define DIRECT_PIN_CONTROL
3582 +
3583 + //
3584 + // M43 - display pin status, toggle pins, watch pins, watch endstops & toggle LED, test servo probe
3585 + //
3586 + //#define PINS_DEBUGGING
3587 +
3588 + // Enable Marlin dev mode which adds some special commands
3589 + //#define MARLIN_DEV_MODE
Newer Older