catalinutzz

Tronxy x5sa pro with hemera configuration.h (marlin)

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