From 4c2fe3bad8db90711dc781c838aac7d3cb35b16a Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Wed, 15 May 2019 23:00:26 -0400 Subject: [PATCH] Bump and fix mesh define issue --- Marlin/Configuration.h | 12 +- Marlin/src/HAL/HAL_AVR/HAL.h | 15 +- Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp | 4 +- Marlin/src/HAL/HAL_AVR/endstop_interrupts.h | 42 +- Marlin/src/HAL/HAL_AVR/fast_pwm.cpp | 24 +- Marlin/src/HAL/HAL_AVR/fastio_1280.h | 292 +- Marlin/src/HAL/HAL_AVR/fastio_1281.h | 188 +- Marlin/src/HAL/HAL_AVR/fastio_168.h | 76 +- Marlin/src/HAL/HAL_AVR/fastio_644.h | 144 +- Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h | 212 +- Marlin/src/HAL/HAL_AVR/fastio_AVR.cpp | 2 +- Marlin/src/HAL/HAL_AVR/fastio_AVR.h | 2 +- Marlin/src/HAL/HAL_AVR/servo_AVR.cpp | 2 +- .../HAL/HAL_AVR/u8g_com_HAL_AVR_sw_spi.cpp | 193 ++ Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp | 4 +- .../src/HAL/HAL_DUE/EepromEmulation_Due.cpp | 2 +- Marlin/src/HAL/HAL_DUE/G2_pins.h | 2 +- Marlin/src/HAL/HAL_DUE/HAL.h | 7 +- .../src/HAL/HAL_DUE/InterruptVectors_Due.cpp | 2 +- Marlin/src/HAL/HAL_DUE/Servo_Due.cpp | 2 +- Marlin/src/HAL/HAL_DUE/pinsDebug.h | 2 +- .../HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp | 14 +- .../HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp | 52 +- .../HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi.cpp | 148 + .../HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.cpp | 112 + .../HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.h | 34 + Marlin/src/HAL/HAL_ESP32/HAL.h | 14 +- Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp | 6 +- Marlin/src/HAL/HAL_ESP32/i2s.cpp | 20 +- Marlin/src/HAL/HAL_ESP32/i2s.h | 2 + Marlin/src/HAL/HAL_LINUX/HAL.h | 7 +- Marlin/src/HAL/HAL_LINUX/fastio.h | 2 +- Marlin/src/HAL/HAL_LINUX/hardware/Timer.cpp | 8 +- Marlin/src/HAL/HAL_LINUX/main.cpp | 2 +- .../HAL/HAL_LINUX/persistent_store_impl.cpp | 4 +- Marlin/src/HAL/HAL_LPC1768/HAL.h | 14 +- Marlin/src/HAL/HAL_LPC1768/HAL_timers.h | 8 +- Marlin/src/HAL/HAL_LPC1768/fastio.h | 2 +- .../u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp | 2 +- ...LPC1768_ssd_sw_i2c.cpp under construction | 2 +- .../u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp | 7 +- .../u8g/u8g_com_HAL_LPC1768_sw_spi.cpp | 23 +- .../HAL/HAL_LPC1768/upload_extra_script.py | 23 +- Marlin/src/HAL/HAL_STM32/HAL.h | 18 +- Marlin/src/HAL/HAL_STM32F1/HAL.cpp | 7 +- Marlin/src/HAL/HAL_STM32F1/HAL.h | 16 +- Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h | 3 +- .../HAL/HAL_STM32F1/HAL_timers_STM32F1.cpp | 5 +- Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h | 2 +- .../HAL_STM32F1/persistent_store_sdcard.cpp | 71 +- .../HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp | 2 +- Marlin/src/HAL/HAL_STM32F4/HAL.h | 18 +- .../src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp | 2 +- Marlin/src/HAL/HAL_STM32F7/HAL.h | 4 +- Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp | 9 - Marlin/src/HAL/HAL_TEENSY31_32/HAL.h | 9 +- Marlin/src/HAL/HAL_TEENSY35_36/HAL.h | 10 +- Marlin/src/HAL/shared/HAL_ST7920.h | 2 +- Marlin/src/HAL/shared/Marduino.h | 57 + Marlin/src/HAL/shared/backtrace/unwarm.cpp | 2 +- .../src/HAL/shared/backtrace/unwarm_arm.cpp | 6 +- .../src/HAL/shared/backtrace/unwarmbytab.cpp | 6 +- .../src/HAL/shared/backtrace/unwmemaccess.cpp | 4 +- Marlin/src/HAL/shared/servo.cpp | 1 - Marlin/src/Marlin.cpp | 25 +- Marlin/src/Marlin.h | 2 +- Marlin/src/core/language.h | 2 + Marlin/src/core/serial.cpp | 2 +- Marlin/src/core/serial.h | 4 +- Marlin/src/feature/backlash.cpp | 139 + Marlin/src/feature/backlash.h | 88 + Marlin/src/feature/bedlevel/bedlevel.cpp | 1 - Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 10 +- Marlin/src/feature/bltouch.cpp | 135 +- Marlin/src/feature/bltouch.h | 78 +- Marlin/src/feature/fwretract.cpp | 6 +- Marlin/src/feature/host_actions.cpp | 2 +- Marlin/src/feature/host_actions.h | 8 +- Marlin/src/feature/mixing.cpp | 6 +- Marlin/src/feature/mixing.h | 18 +- Marlin/src/feature/pause.cpp | 33 +- Marlin/src/feature/pause.h | 6 +- Marlin/src/feature/power.cpp | 4 + Marlin/src/feature/power_loss_recovery.cpp | 22 +- Marlin/src/feature/power_loss_recovery.h | 6 +- Marlin/src/feature/prusa_MMU2/mmu2.cpp | 6 +- Marlin/src/feature/runout.cpp | 2 +- Marlin/src/feature/runout.h | 25 +- Marlin/src/feature/tmc_util.cpp | 32 +- Marlin/src/feature/twibus.cpp | 2 +- Marlin/src/feature/twibus.h | 2 +- Marlin/src/gcode/bedlevel/G26.cpp | 4 +- Marlin/src/gcode/bedlevel/M420.cpp | 1 - Marlin/src/gcode/bedlevel/abl/G29.cpp | 8 +- Marlin/src/gcode/bedlevel/ubl/M421.cpp | 2 +- Marlin/src/gcode/calibrate/G34_M422.cpp | 3 +- Marlin/src/gcode/calibrate/G425.cpp | 26 +- Marlin/src/gcode/calibrate/M100.cpp | 154 +- Marlin/src/gcode/calibrate/M425.cpp | 44 +- Marlin/src/gcode/config/M301.cpp | 2 +- Marlin/src/gcode/config/M305.cpp | 81 + Marlin/src/gcode/control/M80_M81.cpp | 2 +- Marlin/src/gcode/control/M999.cpp | 2 +- Marlin/src/gcode/eeprom/M500-M504.cpp | 13 - Marlin/src/gcode/feature/advance/M900.cpp | 6 +- Marlin/src/gcode/feature/pause/M600.cpp | 25 +- Marlin/src/gcode/feature/pause/M701_M702.cpp | 67 +- Marlin/src/gcode/feature/runout/M412.cpp | 9 + Marlin/src/gcode/gcode.cpp | 39 +- Marlin/src/gcode/gcode.h | 6 + Marlin/src/gcode/host/M115.cpp | 2 +- Marlin/src/gcode/parser.cpp | 26 +- Marlin/src/gcode/parser.h | 14 +- Marlin/src/gcode/queue.cpp | 20 +- Marlin/src/gcode/sdcard/M23.cpp | 2 + Marlin/src/gcode/temperature/M141_M191.cpp | 6 +- Marlin/src/inc/Conditionals_LCD.h | 27 +- Marlin/src/inc/Conditionals_adv.h | 18 + Marlin/src/inc/Conditionals_post.h | 91 +- Marlin/src/inc/SanityCheck.h | 56 +- Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp | 4 +- Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp | 10 +- Marlin/src/lcd/dogm/HAL_LCD_com_defines.h | 8 +- .../u8g_dev_ssd1306_sh1106_128x64_I2C.cpp | 62 +- .../lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp | 19 +- .../lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp | 52 +- Marlin/src/lcd/dogm/u8g_fontutf8.cpp | 12 +- Marlin/src/lcd/dogm/ultralcd_DOGM.cpp | 12 +- Marlin/src/lcd/dogm/ultralcd_DOGM.h | 10 +- .../lcd/extensible_ui/lib/Creality_DWIN.cpp | 30 + Marlin/src/lcd/extensible_ui/ui_api.cpp | 115 +- Marlin/src/lcd/extensible_ui/ui_api.h | 29 +- Marlin/src/lcd/fontutils.h | 5 +- Marlin/src/lcd/language/language_de.h | 23 +- Marlin/src/lcd/language/language_en.h | 29 +- Marlin/src/lcd/language/language_fr.h | 121 +- Marlin/src/lcd/language/language_it.h | 19 +- Marlin/src/lcd/language/language_sk.h | 18 +- Marlin/src/lcd/malyanlcd.cpp | 150 +- Marlin/src/lcd/menu/game/invaders.cpp | 2 +- Marlin/src/lcd/menu/menu.cpp | 27 +- Marlin/src/lcd/menu/menu.h | 47 +- Marlin/src/lcd/menu/menu_advanced.cpp | 22 +- Marlin/src/lcd/menu/menu_backlash.cpp | 13 +- Marlin/src/lcd/menu/menu_bed_corners.cpp | 34 +- Marlin/src/lcd/menu/menu_configuration.cpp | 12 +- Marlin/src/lcd/menu/menu_filament.cpp | 4 +- Marlin/src/lcd/menu/menu_game.cpp | 1 + Marlin/src/lcd/menu/menu_job_recovery.cpp | 2 + Marlin/src/lcd/menu/menu_main.cpp | 51 +- Marlin/src/lcd/menu/menu_mixer.cpp | 24 +- Marlin/src/lcd/menu/menu_sdcard.cpp | 16 +- Marlin/src/lcd/menu/menu_service.cpp | 54 +- Marlin/src/lcd/menu/menu_ubl.cpp | 4 +- Marlin/src/lcd/thermistornames.h | 8 +- Marlin/src/lcd/ultralcd.cpp | 36 +- Marlin/src/lcd/ultralcd.h | 27 +- Marlin/src/libs/L6470/L6470_Marlin.cpp | 2 +- Marlin/src/libs/duration_t.h | 2 +- Marlin/src/libs/softspi.h | 35 +- Marlin/src/libs/vector_3.cpp | 2 +- Marlin/src/module/configuration_store.cpp | 293 +- Marlin/src/module/configuration_store.h | 2 +- Marlin/src/module/endstops.cpp | 13 +- Marlin/src/module/motion.cpp | 18 +- Marlin/src/module/planner.cpp | 125 +- Marlin/src/module/planner.h | 12 +- Marlin/src/module/printcounter.cpp | 8 + Marlin/src/module/probe.cpp | 32 +- Marlin/src/module/stepper.cpp | 12 +- Marlin/src/module/stepper.h | 12 +- Marlin/src/module/temperature.cpp | 561 +++- Marlin/src/module/temperature.h | 151 +- Marlin/src/module/thermistor/thermistor_20.h | 14 +- Marlin/src/module/thermistor/thermistors.h | 38 +- Marlin/src/pins/pins_AZSMZ_MINI.h | 25 +- Marlin/src/pins/pins_BIGTREE_SKR_V1.3.h | 72 +- Marlin/src/pins/pins_COHESION3D_REMIX.h | 149 +- Marlin/src/pins/pins_FYSETC_F6_13.h | 21 +- Marlin/src/pins/pins_MALYAN_M200.h | 9 +- Marlin/src/pins/pins_MIGHTYBOARD_REVE.h | 2 +- Marlin/src/pins/pins_MKS_SBASE.h | 22 +- Marlin/src/pins/pins_PRINTRBOARD_G2.h | 16 +- Marlin/src/pins/pins_RAMPS.h | 97 +- Marlin/src/pins/pins_RAMPS_FD_V1.h | 27 +- Marlin/src/pins/pins_RAMPS_RE_ARM.h | 52 +- Marlin/src/pins/pins_RUMBA.h | 25 + Marlin/src/pins/pins_RURAMPS4D_11.h | 26 +- Marlin/src/pins/pins_RURAMPS4D_13.h | 26 +- Marlin/src/sd/SdBaseFile.cpp | 4 +- Marlin/src/sd/cardreader.cpp | 74 +- Marlin/src/sd/cardreader.h | 7 +- Marlin/src/sd/usb_flashdrive/lib/Usb.cpp | 30 +- Marlin/src/sd/usb_flashdrive/lib/UsbCore.h | 4 +- Marlin/src/sd/usb_flashdrive/lib/address.h | 2 +- .../src/sd/usb_flashdrive/lib/masstorage.cpp | 16 +- Marlin/src/sd/usb_flashdrive/lib/parsetools.h | 8 +- config/default/Configuration.h | 114 +- config/default/Configuration_adv.h | 163 +- .../examples/3DFabXYZ/Migbot/Configuration.h | 106 +- .../3DFabXYZ/Migbot/Configuration_adv.h | 163 +- .../AlephObjects/TAZ4/Configuration.h | 114 +- .../AlephObjects/TAZ4/Configuration_adv.h | 163 +- .../AliExpress/CL-260/Configuration.h | 114 +- .../AliExpress/UM2pExt/Configuration.h | 114 +- .../AliExpress/UM2pExt/Configuration_adv.h | 163 +- config/examples/Anet/A2/Configuration.h | 114 +- config/examples/Anet/A2/Configuration_adv.h | 163 +- config/examples/Anet/A2plus/Configuration.h | 114 +- .../examples/Anet/A2plus/Configuration_adv.h | 163 +- config/examples/Anet/A6/Configuration.h | 114 +- config/examples/Anet/A6/Configuration_adv.h | 163 +- config/examples/Anet/A8/Configuration.h | 114 +- config/examples/Anet/A8/Configuration_adv.h | 163 +- config/examples/Anet/A8plus/Configuration.h | 2143 +++++++++++++++ .../examples/Anet/A8plus/Configuration_adv.h | 2418 ++++++++++++++++ config/examples/Anet/E16/Configuration.h | 2144 +++++++++++++++ config/examples/Anet/E16/Configuration_adv.h | 2420 +++++++++++++++++ config/examples/Anet/E16/_Bootscreen.h | 73 + config/examples/Anet/E16/_Statusscreen.h | 82 + config/examples/AnyCubic/i3/Configuration.h | 114 +- .../examples/AnyCubic/i3/Configuration_adv.h | 163 +- config/examples/ArmEd/Configuration.h | 114 +- config/examples/ArmEd/Configuration_adv.h | 163 +- config/examples/Azteeg/X5GT/Configuration.h | 114 +- .../BIBO/TouchX/cyclops/Configuration.h | 114 +- .../BIBO/TouchX/cyclops/Configuration_adv.h | 163 +- .../BIBO/TouchX/default/Configuration.h | 114 +- .../BIBO/TouchX/default/Configuration_adv.h | 163 +- config/examples/BQ/Hephestos/Configuration.h | 114 +- .../examples/BQ/Hephestos/Configuration_adv.h | 158 +- .../examples/BQ/Hephestos_2/Configuration.h | 122 +- .../BQ/Hephestos_2/Configuration_adv.h | 158 +- config/examples/BQ/WITBOX/Configuration.h | 114 +- config/examples/BQ/WITBOX/Configuration_adv.h | 158 +- config/examples/Cartesio/Configuration.h | 114 +- config/examples/Cartesio/Configuration_adv.h | 163 +- .../examples/Creality/CR-10/Configuration.h | 116 +- .../Creality/CR-10/Configuration_adv.h | 163 +- .../examples/Creality/CR-10S/Configuration.h | 116 +- .../Creality/CR-10S/Configuration_adv.h | 163 +- .../Creality/CR-10_5S/Configuration.h | 116 +- .../Creality/CR-10_5S/Configuration_adv.h | 163 +- .../Creality/CR-10mini/Configuration.h | 116 +- .../Creality/CR-10mini/Configuration_adv.h | 163 +- config/examples/Creality/CR-8/Configuration.h | 116 +- .../Creality/CR-8/Configuration_adv.h | 163 +- .../examples/Creality/Ender-2/Configuration.h | 116 +- .../Creality/Ender-2/Configuration_adv.h | 158 +- .../examples/Creality/Ender-3/Configuration.h | 114 +- .../Creality/Ender-3/Configuration_adv.h | 160 +- .../examples/Creality/Ender-4/Configuration.h | 116 +- .../Creality/Ender-4/Configuration_adv.h | 163 +- config/examples/Einstart-S/Configuration.h | 110 +- .../examples/Einstart-S/Configuration_adv.h | 163 +- config/examples/Felix/Configuration.h | 114 +- config/examples/Felix/Configuration_adv.h | 163 +- config/examples/Felix/DUAL/Configuration.h | 114 +- .../FlashForge/CreatorPro/Configuration.h | 113 +- .../FlashForge/CreatorPro/Configuration_adv.h | 158 +- .../FolgerTech/i3-2020/Configuration.h | 114 +- .../FolgerTech/i3-2020/Configuration_adv.h | 163 +- .../examples/Formbot/Raptor/Configuration.h | 114 +- .../Formbot/Raptor/Configuration_adv.h | 167 +- .../examples/Formbot/T_Rex_2+/Configuration.h | 120 +- .../Formbot/T_Rex_2+/Configuration_adv.h | 169 +- .../examples/Formbot/T_Rex_3/Configuration.h | 120 +- .../Formbot/T_Rex_3/Configuration_adv.h | 163 +- config/examples/Geeetech/A10M/Configuration.h | 130 +- .../Geeetech/A10M/Configuration_adv.h | 163 +- config/examples/Geeetech/A20M/Configuration.h | 130 +- .../Geeetech/A20M/Configuration_adv.h | 163 +- .../examples/Geeetech/GT2560/Configuration.h | 116 +- .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 107 +- .../Geeetech/MeCreator2/Configuration.h | 114 +- .../Geeetech/MeCreator2/Configuration_adv.h | 158 +- .../Geeetech/Prusa i3 Pro B/README.md | 17 +- .../Prusa i3 Pro B/bltouch/Configuration.h | 120 +- .../Prusa i3 Pro B/noprobe/Configuration.h | 121 +- .../Geeetech/Prusa i3 Pro C/Configuration.h | 114 +- .../Prusa i3 Pro C/Configuration_adv.h | 163 +- .../Geeetech/Prusa i3 Pro W/Configuration.h | 114 +- .../Prusa i3 Pro W/Configuration_adv.h | 163 +- .../examples/Infitary/i3-M508/Configuration.h | 114 +- .../Infitary/i3-M508/Configuration_adv.h | 163 +- config/examples/JGAurora/A5/Configuration.h | 114 +- .../examples/JGAurora/A5/Configuration_adv.h | 158 +- config/examples/MakerParts/Configuration.h | 114 +- .../examples/MakerParts/Configuration_adv.h | 163 +- config/examples/Malyan/M150/Configuration.h | 114 +- .../examples/Malyan/M150/Configuration_adv.h | 163 +- config/examples/Malyan/M200/Configuration.h | 114 +- .../examples/Malyan/M200/Configuration_adv.h | 163 +- .../Micromake/C1/basic/Configuration.h | 114 +- .../Micromake/C1/enhanced/Configuration.h | 114 +- .../Micromake/C1/enhanced/Configuration_adv.h | 163 +- config/examples/Mks/Robin/Configuration.h | 114 +- config/examples/Mks/Robin/Configuration_adv.h | 163 +- config/examples/Mks/Sbase/Configuration.h | 114 +- config/examples/Mks/Sbase/Configuration_adv.h | 163 +- .../Printrbot/PrintrboardG2/Configuration.h | 114 +- .../examples/RapideLite/RL200/Configuration.h | 114 +- .../RapideLite/RL200/Configuration_adv.h | 163 +- .../examples/RepRapPro/Huxley/Configuration.h | 114 +- .../RepRapWorld/Megatronics/Configuration.h | 114 +- config/examples/RigidBot/Configuration.h | 114 +- config/examples/RigidBot/Configuration_adv.h | 163 +- config/examples/SCARA/Configuration.h | 116 +- config/examples/SCARA/Configuration_adv.h | 158 +- .../STM32/Black_STM32F407VET6/Configuration.h | 2132 +++++++++++++++ .../Black_STM32F407VET6/Configuration_adv.h | 2415 ++++++++++++++++ .../{ => STM32}/STM32F10/Configuration.h | 114 +- .../{ => STM32}/STM32F4/Configuration.h | 114 +- .../{ => STM32}/stm32f103ret6/Configuration.h | 114 +- config/examples/Sanguinololu/Configuration.h | 106 +- .../examples/Sanguinololu/Configuration_adv.h | 163 +- config/examples/TheBorg/Configuration.h | 114 +- config/examples/TheBorg/Configuration_adv.h | 163 +- config/examples/TinyBoy2/Configuration.h | 114 +- config/examples/TinyBoy2/Configuration_adv.h | 163 +- config/examples/Tronxy/X1/Configuration.h | 114 +- config/examples/Tronxy/X3A/Configuration.h | 114 +- .../examples/Tronxy/X3A/Configuration_adv.h | 163 +- config/examples/Tronxy/X5S-2E/Configuration.h | 114 +- .../Tronxy/X5S-2E/Configuration_adv.h | 163 +- config/examples/Tronxy/X5S/Configuration.h | 114 +- config/examples/Tronxy/XY100/Configuration.h | 114 +- .../UltiMachine/Archim1/Configuration.h | 114 +- .../UltiMachine/Archim1/Configuration_adv.h | 163 +- .../UltiMachine/Archim2/Configuration.h | 114 +- .../UltiMachine/Archim2/Configuration_adv.h | 163 +- config/examples/VORONDesign/Configuration.h | 114 +- .../examples/VORONDesign/Configuration_adv.h | 163 +- .../examples/Velleman/K8200/Configuration.h | 114 +- .../Velleman/K8200/Configuration_adv.h | 163 +- .../examples/Velleman/K8400/Configuration.h | 106 +- .../Velleman/K8400/Configuration_adv.h | 163 +- .../Velleman/K8400/Dual-head/Configuration.h | 106 +- .../examples/WASP/PowerWASP/Configuration.h | 114 +- .../WASP/PowerWASP/Configuration_adv.h | 163 +- .../Wanhao/Duplicator 6/Configuration.h | 114 +- .../Wanhao/Duplicator 6/Configuration_adv.h | 158 +- .../examples/adafruit/ST7565/Configuration.h | 114 +- .../delta/Anycubic/Kossel/Configuration.h | 113 +- .../delta/Anycubic/Kossel/Configuration_adv.h | 158 +- .../FLSUN/auto_calibrate/Configuration.h | 116 +- .../FLSUN/auto_calibrate/Configuration_adv.h | 158 +- .../delta/FLSUN/kossel/Configuration.h | 116 +- .../delta/FLSUN/kossel/Configuration_adv.h | 158 +- .../delta/FLSUN/kossel_mini/Configuration.h | 116 +- .../FLSUN/kossel_mini/Configuration_adv.h | 158 +- .../Geeetech/Rostock 301/Configuration.h | 119 +- .../Geeetech/Rostock 301/Configuration_adv.h | 158 +- .../delta/Hatchbox_Alpha/Configuration.h | 116 +- .../examples/delta/MKS/SBASE/Configuration.h | 116 +- .../delta/MKS/SBASE/Configuration_adv.h | 158 +- .../delta/Tevo Little Monster/Configuration.h | 109 +- .../Tevo Little Monster/Configuration_adv.h | 158 +- config/examples/delta/generic/Configuration.h | 116 +- .../delta/generic/Configuration_adv.h | 158 +- .../delta/kossel_mini/Configuration.h | 116 +- .../delta/kossel_mini/Configuration_adv.h | 158 +- .../examples/delta/kossel_pro/Configuration.h | 116 +- .../examples/delta/kossel_xl/Configuration.h | 116 +- .../delta/kossel_xl/Configuration_adv.h | 158 +- .../examples/gCreate/gMax1.5+/Configuration.h | 105 +- .../gCreate/gMax1.5+/Configuration_adv.h | 163 +- config/examples/makibox/Configuration.h | 114 +- config/examples/makibox/Configuration_adv.h | 163 +- config/examples/tvrrug/Round2/Configuration.h | 114 +- .../tvrrug/Round2/Configuration_adv.h | 163 +- config/examples/wt150/Configuration.h | 114 +- config/examples/wt150/Configuration_adv.h | 163 +- 373 files changed, 34830 insertions(+), 8157 deletions(-) create mode 100644 Marlin/src/HAL/HAL_AVR/u8g_com_HAL_AVR_sw_spi.cpp create mode 100644 Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi.cpp create mode 100644 Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.cpp create mode 100644 Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.h create mode 100644 Marlin/src/HAL/shared/Marduino.h create mode 100644 Marlin/src/feature/backlash.cpp create mode 100644 Marlin/src/feature/backlash.h create mode 100644 Marlin/src/gcode/config/M305.cpp create mode 100644 config/examples/Anet/A8plus/Configuration.h create mode 100644 config/examples/Anet/A8plus/Configuration_adv.h create mode 100644 config/examples/Anet/E16/Configuration.h create mode 100644 config/examples/Anet/E16/Configuration_adv.h create mode 100644 config/examples/Anet/E16/_Bootscreen.h create mode 100644 config/examples/Anet/E16/_Statusscreen.h create mode 100644 config/examples/STM32/Black_STM32F407VET6/Configuration.h create mode 100644 config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h rename config/examples/{ => STM32}/STM32F10/Configuration.h (93%) rename config/examples/{ => STM32}/STM32F4/Configuration.h (93%) rename config/examples/{ => STM32}/stm32f103ret6/Configuration.h (93%) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index fb7658c6ed..3165791b6c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -106,7 +106,7 @@ Melzi board users may only select ABL_BI for bilinear leveling */ //#define ABL_BI -//#define ABL_UBL +#define ABL_UBL //#define POWER_LOSS_RECOVERY //Large and does not fit with any other features on Melzi, or UBL on Atmega /* @@ -1228,21 +1228,17 @@ * The BLTouch probe uses a Hall effect sensor and emulates a servo. */ #if ENABLED(ABL_BLTOUCH) -#define BLTOUCH + #define BLTOUCH #endif #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // (ms) Enable and increase if needed /** * BLTouch V3.0 and newer smart series * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. */ - #define BLTOUCH_V3 - #if ENABLED(BLTOUCH_V3) - #define BLTOUCH_FORCE_5V_MODE - //#define BLTOUCH_FORCE_OPEN_DRAIN_MODE - #endif + #define BLTOUCH_FORCE_5V_MODE #endif /** diff --git a/Marlin/src/HAL/HAL_AVR/HAL.h b/Marlin/src/HAL/HAL_AVR/HAL.h index b5b63dc5d1..9dc5e95c55 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL.h +++ b/Marlin/src/HAL/HAL_AVR/HAL.h @@ -24,14 +24,7 @@ #include -#include - -#include -#include -#include -#include -#include - +#include "../shared/Marduino.h" #include "../shared/HAL_SPI.h" #include "fastio_AVR.h" #include "watchdog_AVR.h" @@ -43,6 +36,12 @@ #include "MarlinSerial.h" #endif +#include +#include +#include +#include +#include + // -------------------------------------------------------------------------- // Defines // -------------------------------------------------------------------------- diff --git a/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp b/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp index a3fe161251..592a4bca68 100644 --- a/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp +++ b/Marlin/src/HAL/HAL_AVR/HAL_spi_AVR.cpp @@ -66,7 +66,7 @@ void spiBegin (void) { } -#if DISABLED(SOFTWARE_SPI) +#if DISABLED(SOFTWARE_SPI, FORCE_SOFT_SPI) //------------------------------------------------------------------------------ // Hardware SPI @@ -264,6 +264,6 @@ void spiBegin (void) { spiSend(buf[i]); } -#endif // SOFTWARE_SPI +#endif // SOFTWARE_SPI, FORCE_SOFT_SPI #endif // __AVR__ diff --git a/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h b/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h index c066703942..cabf830c90 100644 --- a/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h +++ b/Marlin/src/HAL/HAL_AVR/endstop_interrupts.h @@ -54,7 +54,7 @@ void endstop_ISR(void) { endstops.update(); } #undef digitalPinToPCICR #define digitalPinToPCICR(p) ( WITHIN(p, 10, 15) || \ WITHIN(p, 50, 53) || \ - WITHIN(p, 62, 69) ? &PCICR : (uint8_t*)0 ) + WITHIN(p, 62, 69) ? &PCICR : nullptr ) #undef digitalPinToPCICRbit #define digitalPinToPCICRbit(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? 0 : \ WITHIN(p, 14, 15) ? 1 : \ @@ -64,7 +64,7 @@ void endstop_ISR(void) { endstops.update(); } #define digitalPinToPCMSK(p) ( WITHIN(p, 10, 13) || WITHIN(p, 50, 53) ? &PCMSK0 : \ WITHIN(p, 14, 15) ? &PCMSK1 : \ WITHIN(p, 62, 69) ? &PCMSK2 : \ - (uint8_t *)0 ) + nullptr ) #undef digitalPinToPCMSKbit #define digitalPinToPCMSKbit(p) ( WITHIN(p, 10, 13) ? ((p) - 6) : \ (p) == 14 || (p) == 51 ? 2 : \ @@ -78,9 +78,11 @@ void endstop_ISR(void) { endstops.update(); } // Install Pin change interrupt for a pin. Can be called multiple times. void pciSetup(const int8_t pin) { - SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin - SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt - SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group + if (digitalPinToPCMSK(pin) != nullptr) { + SBI(*digitalPinToPCMSK(pin), digitalPinToPCMSKbit(pin)); // enable pin + SBI(PCIFR, digitalPinToPCICRbit(pin)); // clear any outstanding interrupt + SBI(PCICR, digitalPinToPCICRbit(pin)); // enable interrupt for the group + } } // Handlers for pin change interrupts @@ -107,7 +109,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(X_MAX_PIN), endstop_ISR, CHANGE); // assign it #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(X_MAX_PIN) != NULL, "X_MAX_PIN is not interrupt-capable"); // if pin has no pin change interrupt - error + static_assert(digitalPinToPCICR(X_MAX_PIN), "X_MAX_PIN is not interrupt-capable"); // if pin has no pin change interrupt - error pciSetup(X_MAX_PIN); // assign it #endif #endif @@ -117,7 +119,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(X_MIN_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(X_MIN_PIN) != NULL, "X_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(X_MIN_PIN), "X_MIN_PIN is not interrupt-capable"); pciSetup(X_MIN_PIN); #endif #endif @@ -127,7 +129,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Y_MAX_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Y_MAX_PIN) != NULL, "Y_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Y_MAX_PIN), "Y_MAX_PIN is not interrupt-capable"); pciSetup(Y_MAX_PIN); #endif #endif @@ -137,7 +139,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Y_MIN_PIN) != NULL, "Y_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Y_MIN_PIN), "Y_MIN_PIN is not interrupt-capable"); pciSetup(Y_MIN_PIN); #endif #endif @@ -147,7 +149,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Z_MAX_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Z_MAX_PIN) != NULL, "Z_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Z_MAX_PIN), "Z_MAX_PIN is not interrupt-capable"); pciSetup(Z_MAX_PIN); #endif #endif @@ -157,7 +159,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Z_MIN_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Z_MIN_PIN) != NULL, "Z_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Z_MIN_PIN), "Z_MIN_PIN is not interrupt-capable"); pciSetup(Z_MIN_PIN); #endif #endif @@ -167,7 +169,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(X2_MAX_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(X2_MAX_PIN) != NULL, "X2_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(X2_MAX_PIN), "X2_MAX_PIN is not interrupt-capable"); pciSetup(X2_MAX_PIN); #endif #endif @@ -177,7 +179,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(X2_MIN_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(X2_MIN_PIN) != NULL, "X2_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(X2_MIN_PIN), "X2_MIN_PIN is not interrupt-capable"); pciSetup(X2_MIN_PIN); #endif #endif @@ -187,7 +189,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Y2_MAX_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Y2_MAX_PIN) != NULL, "Y2_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Y2_MAX_PIN), "Y2_MAX_PIN is not interrupt-capable"); pciSetup(Y2_MAX_PIN); #endif #endif @@ -197,7 +199,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Y2_MIN_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Y2_MIN_PIN) != NULL, "Y2_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Y2_MIN_PIN), "Y2_MIN_PIN is not interrupt-capable"); pciSetup(Y2_MIN_PIN); #endif #endif @@ -207,7 +209,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Z2_MAX_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Z2_MAX_PIN) != NULL, "Z2_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Z2_MAX_PIN), "Z2_MAX_PIN is not interrupt-capable"); pciSetup(Z2_MAX_PIN); #endif #endif @@ -217,7 +219,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Z2_MIN_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Z2_MIN_PIN) != NULL, "Z2_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Z2_MIN_PIN), "Z2_MIN_PIN is not interrupt-capable"); pciSetup(Z2_MIN_PIN); #endif #endif @@ -227,7 +229,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Z3_MAX_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Z3_MAX_PIN) != NULL, "Z3_MAX_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Z3_MAX_PIN), "Z3_MAX_PIN is not interrupt-capable"); pciSetup(Z3_MAX_PIN); #endif #endif @@ -237,7 +239,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Z3_MIN_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Z3_MIN_PIN) != NULL, "Z3_MIN_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Z3_MIN_PIN), "Z3_MIN_PIN is not interrupt-capable"); pciSetup(Z3_MIN_PIN); #endif #endif @@ -247,7 +249,7 @@ void setup_endstop_interrupts( void ) { attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE); #else // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration! - static_assert(digitalPinToPCICR(Z_MIN_PROBE_PIN) != NULL, "Z_MIN_PROBE_PIN is not interrupt-capable"); + static_assert(digitalPinToPCICR(Z_MIN_PROBE_PIN), "Z_MIN_PROBE_PIN is not interrupt-capable"); pciSetup(Z_MIN_PROBE_PIN); #endif #endif diff --git a/Marlin/src/HAL/HAL_AVR/fast_pwm.cpp b/Marlin/src/HAL/HAL_AVR/fast_pwm.cpp index b38a4acea2..0f17ed1ac7 100644 --- a/Marlin/src/HAL/HAL_AVR/fast_pwm.cpp +++ b/Marlin/src/HAL/HAL_AVR/fast_pwm.cpp @@ -38,9 +38,9 @@ #ifdef TCCR2 case TIMER2: { Timer timer = { - /*TCCRnQ*/ { &TCCR2, NULL, NULL}, - /*OCRnQ*/ { (uint16_t*)&OCR2, NULL, NULL}, - /*ICRn*/ NULL, + /*TCCRnQ*/ { &TCCR2, nullptr, nullptr}, + /*OCRnQ*/ { (uint16_t*)&OCR2, nullptr, nullptr}, + /*ICRn*/ nullptr, /*n, q*/ 2, 0 }; } @@ -49,9 +49,9 @@ case TIMER2A: break; // protect TIMER2A case TIMER2B: { Timer timer = { - /*TCCRnQ*/ { &TCCR2A, &TCCR2B, NULL}, - /*OCRnQ*/ { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, NULL}, - /*ICRn*/ NULL, + /*TCCRnQ*/ { &TCCR2A, &TCCR2B, nullptr}, + /*OCRnQ*/ { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, nullptr}, + /*ICRn*/ nullptr, /*n, q*/ 2, 1 }; return timer; @@ -60,9 +60,9 @@ case TIMER2B: ++q; case TIMER2A: { Timer timer = { - /*TCCRnQ*/ { &TCCR2A, &TCCR2B, NULL}, - /*OCRnQ*/ { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, NULL}, - /*ICRn*/ NULL, + /*TCCRnQ*/ { &TCCR2A, &TCCR2B, nullptr}, + /*OCRnQ*/ { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, nullptr}, + /*ICRn*/ nullptr, 2, q }; return timer; @@ -111,9 +111,9 @@ #endif } Timer timer = { - /*TCCRnQ*/ { NULL, NULL, NULL}, - /*OCRnQ*/ { NULL, NULL, NULL}, - /*ICRn*/ NULL, + /*TCCRnQ*/ { nullptr, nullptr, nullptr}, + /*OCRnQ*/ { nullptr, nullptr, nullptr}, + /*ICRn*/ nullptr, 0, 0 }; return timer; diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1280.h b/Marlin/src/HAL/HAL_AVR/fastio_1280.h index 1e3c44a4f5..2c37b0a697 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_1280.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_1280.h @@ -71,13 +71,13 @@ #define DIO0_RPORT PINE #define DIO0_WPORT PORTE #define DIO0_DDR DDRE -#define DIO0_PWM NULL +#define DIO0_PWM nullptr #define DIO1_PIN PINE1 #define DIO1_RPORT PINE #define DIO1_WPORT PORTE #define DIO1_DDR DDRE -#define DIO1_PWM NULL +#define DIO1_PWM nullptr #define DIO2_PIN PINE4 #define DIO2_RPORT PINE @@ -137,13 +137,13 @@ #define DIO11_RPORT PINB #define DIO11_WPORT PORTB #define DIO11_DDR DDRB -#define DIO11_PWM NULL +#define DIO11_PWM nullptr #define DIO12_PIN PINB6 #define DIO12_RPORT PINB #define DIO12_WPORT PORTB #define DIO12_DDR DDRB -#define DIO12_PWM NULL +#define DIO12_PWM nullptr #define DIO13_PIN PINB7 #define DIO13_RPORT PINB @@ -155,181 +155,181 @@ #define DIO14_RPORT PINJ #define DIO14_WPORT PORTJ #define DIO14_DDR DDRJ -#define DIO14_PWM NULL +#define DIO14_PWM nullptr #define DIO15_PIN PINJ0 #define DIO15_RPORT PINJ #define DIO15_WPORT PORTJ #define DIO15_DDR DDRJ -#define DIO15_PWM NULL +#define DIO15_PWM nullptr #define DIO16_PIN PINH1 #define DIO16_RPORT PINH #define DIO16_WPORT PORTH #define DIO16_DDR DDRH -#define DIO16_PWM NULL +#define DIO16_PWM nullptr #define DIO17_PIN PINH0 #define DIO17_RPORT PINH #define DIO17_WPORT PORTH #define DIO17_DDR DDRH -#define DIO17_PWM NULL +#define DIO17_PWM nullptr #define DIO18_PIN PIND3 #define DIO18_RPORT PIND #define DIO18_WPORT PORTD #define DIO18_DDR DDRD -#define DIO18_PWM NULL +#define DIO18_PWM nullptr #define DIO19_PIN PIND2 #define DIO19_RPORT PIND #define DIO19_WPORT PORTD #define DIO19_DDR DDRD -#define DIO19_PWM NULL +#define DIO19_PWM nullptr #define DIO20_PIN PIND1 #define DIO20_RPORT PIND #define DIO20_WPORT PORTD #define DIO20_DDR DDRD -#define DIO20_PWM NULL +#define DIO20_PWM nullptr #define DIO21_PIN PIND0 #define DIO21_RPORT PIND #define DIO21_WPORT PORTD #define DIO21_DDR DDRD -#define DIO21_PWM NULL +#define DIO21_PWM nullptr #define DIO22_PIN PINA0 #define DIO22_RPORT PINA #define DIO22_WPORT PORTA #define DIO22_DDR DDRA -#define DIO22_PWM NULL +#define DIO22_PWM nullptr #define DIO23_PIN PINA1 #define DIO23_RPORT PINA #define DIO23_WPORT PORTA #define DIO23_DDR DDRA -#define DIO23_PWM NULL +#define DIO23_PWM nullptr #define DIO24_PIN PINA2 #define DIO24_RPORT PINA #define DIO24_WPORT PORTA #define DIO24_DDR DDRA -#define DIO24_PWM NULL +#define DIO24_PWM nullptr #define DIO25_PIN PINA3 #define DIO25_RPORT PINA #define DIO25_WPORT PORTA #define DIO25_DDR DDRA -#define DIO25_PWM NULL +#define DIO25_PWM nullptr #define DIO26_PIN PINA4 #define DIO26_RPORT PINA #define DIO26_WPORT PORTA #define DIO26_DDR DDRA -#define DIO26_PWM NULL +#define DIO26_PWM nullptr #define DIO27_PIN PINA5 #define DIO27_RPORT PINA #define DIO27_WPORT PORTA #define DIO27_DDR DDRA -#define DIO27_PWM NULL +#define DIO27_PWM nullptr #define DIO28_PIN PINA6 #define DIO28_RPORT PINA #define DIO28_WPORT PORTA #define DIO28_DDR DDRA -#define DIO28_PWM NULL +#define DIO28_PWM nullptr #define DIO29_PIN PINA7 #define DIO29_RPORT PINA #define DIO29_WPORT PORTA #define DIO29_DDR DDRA -#define DIO29_PWM NULL +#define DIO29_PWM nullptr #define DIO30_PIN PINC7 #define DIO30_RPORT PINC #define DIO30_WPORT PORTC #define DIO30_DDR DDRC -#define DIO30_PWM NULL +#define DIO30_PWM nullptr #define DIO31_PIN PINC6 #define DIO31_RPORT PINC #define DIO31_WPORT PORTC #define DIO31_DDR DDRC -#define DIO31_PWM NULL +#define DIO31_PWM nullptr #define DIO32_PIN PINC5 #define DIO32_RPORT PINC #define DIO32_WPORT PORTC #define DIO32_DDR DDRC -#define DIO32_PWM NULL +#define DIO32_PWM nullptr #define DIO33_PIN PINC4 #define DIO33_RPORT PINC #define DIO33_WPORT PORTC #define DIO33_DDR DDRC -#define DIO33_PWM NULL +#define DIO33_PWM nullptr #define DIO34_PIN PINC3 #define DIO34_RPORT PINC #define DIO34_WPORT PORTC #define DIO34_DDR DDRC -#define DIO34_PWM NULL +#define DIO34_PWM nullptr #define DIO35_PIN PINC2 #define DIO35_RPORT PINC #define DIO35_WPORT PORTC #define DIO35_DDR DDRC -#define DIO35_PWM NULL +#define DIO35_PWM nullptr #define DIO36_PIN PINC1 #define DIO36_RPORT PINC #define DIO36_WPORT PORTC #define DIO36_DDR DDRC -#define DIO36_PWM NULL +#define DIO36_PWM nullptr #define DIO37_PIN PINC0 #define DIO37_RPORT PINC #define DIO37_WPORT PORTC #define DIO37_DDR DDRC -#define DIO37_PWM NULL +#define DIO37_PWM nullptr #define DIO38_PIN PIND7 #define DIO38_RPORT PIND #define DIO38_WPORT PORTD #define DIO38_DDR DDRD -#define DIO38_PWM NULL +#define DIO38_PWM nullptr #define DIO39_PIN PING2 #define DIO39_RPORT PING #define DIO39_WPORT PORTG #define DIO39_DDR DDRG -#define DIO39_PWM NULL +#define DIO39_PWM nullptr #define DIO40_PIN PING1 #define DIO40_RPORT PING #define DIO40_WPORT PORTG #define DIO40_DDR DDRG -#define DIO40_PWM NULL +#define DIO40_PWM nullptr #define DIO41_PIN PING0 #define DIO41_RPORT PING #define DIO41_WPORT PORTG #define DIO41_DDR DDRG -#define DIO41_PWM NULL +#define DIO41_PWM nullptr #define DIO42_PIN PINL7 #define DIO42_RPORT PINL #define DIO42_WPORT PORTL #define DIO42_DDR DDRL -#define DIO42_PWM NULL +#define DIO42_PWM nullptr #define DIO43_PIN PINL6 #define DIO43_RPORT PINL #define DIO43_WPORT PORTL #define DIO43_DDR DDRL -#define DIO43_PWM NULL +#define DIO43_PWM nullptr #define DIO44_PIN PINL5 #define DIO44_RPORT PINL @@ -353,139 +353,139 @@ #define DIO47_RPORT PINL #define DIO47_WPORT PORTL #define DIO47_DDR DDRL -#define DIO47_PWM NULL +#define DIO47_PWM nullptr #define DIO48_PIN PINL1 #define DIO48_RPORT PINL #define DIO48_WPORT PORTL #define DIO48_DDR DDRL -#define DIO48_PWM NULL +#define DIO48_PWM nullptr #define DIO49_PIN PINL0 #define DIO49_RPORT PINL #define DIO49_WPORT PORTL #define DIO49_DDR DDRL -#define DIO49_PWM NULL +#define DIO49_PWM nullptr #define DIO50_PIN PINB3 #define DIO50_RPORT PINB #define DIO50_WPORT PORTB #define DIO50_DDR DDRB -#define DIO50_PWM NULL +#define DIO50_PWM nullptr #define DIO51_PIN PINB2 #define DIO51_RPORT PINB #define DIO51_WPORT PORTB #define DIO51_DDR DDRB -#define DIO51_PWM NULL +#define DIO51_PWM nullptr #define DIO52_PIN PINB1 #define DIO52_RPORT PINB #define DIO52_WPORT PORTB #define DIO52_DDR DDRB -#define DIO52_PWM NULL +#define DIO52_PWM nullptr #define DIO53_PIN PINB0 #define DIO53_RPORT PINB #define DIO53_WPORT PORTB #define DIO53_DDR DDRB -#define DIO53_PWM NULL +#define DIO53_PWM nullptr #define DIO54_PIN PINF0 #define DIO54_RPORT PINF #define DIO54_WPORT PORTF #define DIO54_DDR DDRF -#define DIO54_PWM NULL +#define DIO54_PWM nullptr #define DIO55_PIN PINF1 #define DIO55_RPORT PINF #define DIO55_WPORT PORTF #define DIO55_DDR DDRF -#define DIO55_PWM NULL +#define DIO55_PWM nullptr #define DIO56_PIN PINF2 #define DIO56_RPORT PINF #define DIO56_WPORT PORTF #define DIO56_DDR DDRF -#define DIO56_PWM NULL +#define DIO56_PWM nullptr #define DIO57_PIN PINF3 #define DIO57_RPORT PINF #define DIO57_WPORT PORTF #define DIO57_DDR DDRF -#define DIO57_PWM NULL +#define DIO57_PWM nullptr #define DIO58_PIN PINF4 #define DIO58_RPORT PINF #define DIO58_WPORT PORTF #define DIO58_DDR DDRF -#define DIO58_PWM NULL +#define DIO58_PWM nullptr #define DIO59_PIN PINF5 #define DIO59_RPORT PINF #define DIO59_WPORT PORTF #define DIO59_DDR DDRF -#define DIO59_PWM NULL +#define DIO59_PWM nullptr #define DIO60_PIN PINF6 #define DIO60_RPORT PINF #define DIO60_WPORT PORTF #define DIO60_DDR DDRF -#define DIO60_PWM NULL +#define DIO60_PWM nullptr #define DIO61_PIN PINF7 #define DIO61_RPORT PINF #define DIO61_WPORT PORTF #define DIO61_DDR DDRF -#define DIO61_PWM NULL +#define DIO61_PWM nullptr #define DIO62_PIN PINK0 #define DIO62_RPORT PINK #define DIO62_WPORT PORTK #define DIO62_DDR DDRK -#define DIO62_PWM NULL +#define DIO62_PWM nullptr #define DIO63_PIN PINK1 #define DIO63_RPORT PINK #define DIO63_WPORT PORTK #define DIO63_DDR DDRK -#define DIO63_PWM NULL +#define DIO63_PWM nullptr #define DIO64_PIN PINK2 #define DIO64_RPORT PINK #define DIO64_WPORT PORTK #define DIO64_DDR DDRK -#define DIO64_PWM NULL +#define DIO64_PWM nullptr #define DIO65_PIN PINK3 #define DIO65_RPORT PINK #define DIO65_WPORT PORTK #define DIO65_DDR DDRK -#define DIO65_PWM NULL +#define DIO65_PWM nullptr #define DIO66_PIN PINK4 #define DIO66_RPORT PINK #define DIO66_WPORT PORTK #define DIO66_DDR DDRK -#define DIO66_PWM NULL +#define DIO66_PWM nullptr #define DIO67_PIN PINK5 #define DIO67_RPORT PINK #define DIO67_WPORT PORTK #define DIO67_DDR DDRK -#define DIO67_PWM NULL +#define DIO67_PWM nullptr #define DIO68_PIN PINK6 #define DIO68_RPORT PINK #define DIO68_WPORT PORTK #define DIO68_DDR DDRK -#define DIO68_PWM NULL +#define DIO68_PWM nullptr #define DIO69_PIN PINK7 #define DIO69_RPORT PINK #define DIO69_WPORT PORTK #define DIO69_DDR DDRK -#define DIO69_PWM NULL +#define DIO69_PWM nullptr //#define FASTIO_EXT_START 70 //#define FASTIO_EXT_END 85 @@ -494,171 +494,171 @@ #define DIO70_RPORT PING #define DIO70_WPORT PORTG #define DIO70_DDR DDRG -#define DIO70_PWM NULL +#define DIO70_PWM nullptr #define DIO71_PIN PING3 #define DIO71_RPORT PING #define DIO71_WPORT PORTG #define DIO71_DDR DDRG -#define DIO71_PWM NULL +#define DIO71_PWM nullptr #define DIO72_PIN PINJ2 #define DIO72_RPORT PINJ #define DIO72_WPORT PORTJ #define DIO72_DDR DDRJ -#define DIO72_PWM NULL +#define DIO72_PWM nullptr #define DIO73_PIN PINJ3 #define DIO73_RPORT PINJ #define DIO73_WPORT PORTJ #define DIO73_DDR DDRJ -#define DIO73_PWM NULL +#define DIO73_PWM nullptr #define DIO74_PIN PINJ7 #define DIO74_RPORT PINJ #define DIO74_WPORT PORTJ #define DIO74_DDR DDRJ -#define DIO74_PWM NULL +#define DIO74_PWM nullptr #define DIO75_PIN PINJ4 #define DIO75_RPORT PINJ #define DIO75_WPORT PORTJ #define DIO75_DDR DDRJ -#define DIO75_PWM NULL +#define DIO75_PWM nullptr #define DIO76_PIN PINJ5 #define DIO76_RPORT PINJ #define DIO76_WPORT PORTJ #define DIO76_DDR DDRJ -#define DIO76_PWM NULL +#define DIO76_PWM nullptr #define DIO77_PIN PINJ6 #define DIO77_RPORT PINJ #define DIO77_WPORT PORTJ #define DIO77_DDR DDRJ -#define DIO77_PWM NULL +#define DIO77_PWM nullptr #define DIO78_PIN PINE2 #define DIO78_RPORT PINE #define DIO78_WPORT PORTE #define DIO78_DDR DDRE -#define DIO78_PWM NULL +#define DIO78_PWM nullptr #define DIO79_PIN PINE6 #define DIO79_RPORT PINE #define DIO79_WPORT PORTE #define DIO79_DDR DDRE -#define DIO79_PWM NULL +#define DIO79_PWM nullptr #define DIO80_PIN PINE7 #define DIO80_RPORT PINE #define DIO80_WPORT PORTE #define DIO80_DDR DDRE -#define DIO80_PWM NULL +#define DIO80_PWM nullptr #define DIO81_PIN PIND4 #define DIO81_RPORT PIND #define DIO81_WPORT PORTD #define DIO81_DDR DDRD -#define DIO81_PWM NULL +#define DIO81_PWM nullptr #define DIO82_PIN PIND5 #define DIO82_RPORT PIND #define DIO82_WPORT PORTD #define DIO82_DDR DDRD -#define DIO82_PWM NULL +#define DIO82_PWM nullptr #define DIO83_PIN PIND6 #define DIO83_RPORT PIND #define DIO83_WPORT PORTD #define DIO83_DDR DDRD -#define DIO83_PWM NULL +#define DIO83_PWM nullptr #define DIO84_PIN PINH2 #define DIO84_RPORT PINH #define DIO84_WPORT PORTH #define DIO84_DDR DDRH -#define DIO84_PWM NULL +#define DIO84_PWM nullptr #define DIO85_PIN PINH7 #define DIO85_RPORT PINH #define DIO85_WPORT PORTH #define DIO85_DDR DDRH -#define DIO85_PWM NULL +#define DIO85_PWM nullptr #undef PA0 #define PA0_PIN PINA0 #define PA0_RPORT PINA #define PA0_WPORT PORTA #define PA0_DDR DDRA -#define PA0_PWM NULL +#define PA0_PWM nullptr #undef PA1 #define PA1_PIN PINA1 #define PA1_RPORT PINA #define PA1_WPORT PORTA #define PA1_DDR DDRA -#define PA1_PWM NULL +#define PA1_PWM nullptr #undef PA2 #define PA2_PIN PINA2 #define PA2_RPORT PINA #define PA2_WPORT PORTA #define PA2_DDR DDRA -#define PA2_PWM NULL +#define PA2_PWM nullptr #undef PA3 #define PA3_PIN PINA3 #define PA3_RPORT PINA #define PA3_WPORT PORTA #define PA3_DDR DDRA -#define PA3_PWM NULL +#define PA3_PWM nullptr #undef PA4 #define PA4_PIN PINA4 #define PA4_RPORT PINA #define PA4_WPORT PORTA #define PA4_DDR DDRA -#define PA4_PWM NULL +#define PA4_PWM nullptr #undef PA5 #define PA5_PIN PINA5 #define PA5_RPORT PINA #define PA5_WPORT PORTA #define PA5_DDR DDRA -#define PA5_PWM NULL +#define PA5_PWM nullptr #undef PA6 #define PA6_PIN PINA6 #define PA6_RPORT PINA #define PA6_WPORT PORTA #define PA6_DDR DDRA -#define PA6_PWM NULL +#define PA6_PWM nullptr #undef PA7 #define PA7_PIN PINA7 #define PA7_RPORT PINA #define PA7_WPORT PORTA #define PA7_DDR DDRA -#define PA7_PWM NULL +#define PA7_PWM nullptr #undef PB0 #define PB0_PIN PINB0 #define PB0_RPORT PINB #define PB0_WPORT PORTB #define PB0_DDR DDRB -#define PB0_PWM NULL +#define PB0_PWM nullptr #undef PB1 #define PB1_PIN PINB1 #define PB1_RPORT PINB #define PB1_WPORT PORTB #define PB1_DDR DDRB -#define PB1_PWM NULL +#define PB1_PWM nullptr #undef PB2 #define PB2_PIN PINB2 #define PB2_RPORT PINB #define PB2_WPORT PORTB #define PB2_DDR DDRB -#define PB2_PWM NULL +#define PB2_PWM nullptr #undef PB3 #define PB3_PIN PINB3 #define PB3_RPORT PINB #define PB3_WPORT PORTB #define PB3_DDR DDRB -#define PB3_PWM NULL +#define PB3_PWM nullptr #undef PB4 #define PB4_PIN PINB4 #define PB4_RPORT PINB @@ -670,13 +670,13 @@ #define PB5_RPORT PINB #define PB5_WPORT PORTB #define PB5_DDR DDRB -#define PB5_PWM NULL +#define PB5_PWM nullptr #undef PB6 #define PB6_PIN PINB6 #define PB6_RPORT PINB #define PB6_WPORT PORTB #define PB6_DDR DDRB -#define PB6_PWM NULL +#define PB6_PWM nullptr #undef PB7 #define PB7_PIN PINB7 #define PB7_RPORT PINB @@ -689,117 +689,117 @@ #define PC0_RPORT PINC #define PC0_WPORT PORTC #define PC0_DDR DDRC -#define PC0_PWM NULL +#define PC0_PWM nullptr #undef PC1 #define PC1_PIN PINC1 #define PC1_RPORT PINC #define PC1_WPORT PORTC #define PC1_DDR DDRC -#define PC1_PWM NULL +#define PC1_PWM nullptr #undef PC2 #define PC2_PIN PINC2 #define PC2_RPORT PINC #define PC2_WPORT PORTC #define PC2_DDR DDRC -#define PC2_PWM NULL +#define PC2_PWM nullptr #undef PC3 #define PC3_PIN PINC3 #define PC3_RPORT PINC #define PC3_WPORT PORTC #define PC3_DDR DDRC -#define PC3_PWM NULL +#define PC3_PWM nullptr #undef PC4 #define PC4_PIN PINC4 #define PC4_RPORT PINC #define PC4_WPORT PORTC #define PC4_DDR DDRC -#define PC4_PWM NULL +#define PC4_PWM nullptr #undef PC5 #define PC5_PIN PINC5 #define PC5_RPORT PINC #define PC5_WPORT PORTC #define PC5_DDR DDRC -#define PC5_PWM NULL +#define PC5_PWM nullptr #undef PC6 #define PC6_PIN PINC6 #define PC6_RPORT PINC #define PC6_WPORT PORTC #define PC6_DDR DDRC -#define PC6_PWM NULL +#define PC6_PWM nullptr #undef PC7 #define PC7_PIN PINC7 #define PC7_RPORT PINC #define PC7_WPORT PORTC #define PC7_DDR DDRC -#define PC7_PWM NULL +#define PC7_PWM nullptr #undef PD0 #define PD0_PIN PIND0 #define PD0_RPORT PIND #define PD0_WPORT PORTD #define PD0_DDR DDRD -#define PD0_PWM NULL +#define PD0_PWM nullptr #undef PD1 #define PD1_PIN PIND1 #define PD1_RPORT PIND #define PD1_WPORT PORTD #define PD1_DDR DDRD -#define PD1_PWM NULL +#define PD1_PWM nullptr #undef PD2 #define PD2_PIN PIND2 #define PD2_RPORT PIND #define PD2_WPORT PORTD #define PD2_DDR DDRD -#define PD2_PWM NULL +#define PD2_PWM nullptr #undef PD3 #define PD3_PIN PIND3 #define PD3_RPORT PIND #define PD3_WPORT PORTD #define PD3_DDR DDRD -#define PD3_PWM NULL +#define PD3_PWM nullptr #undef PD4 #define PD4_PIN PIND4 #define PD4_RPORT PIND #define PD4_WPORT PORTD #define PD4_DDR DDRD -#define PD4_PWM NULL +#define PD4_PWM nullptr #undef PD5 #define PD5_PIN PIND5 #define PD5_RPORT PIND #define PD5_WPORT PORTD #define PD5_DDR DDRD -#define PD5_PWM NULL +#define PD5_PWM nullptr #undef PD6 #define PD6_PIN PIND6 #define PD6_RPORT PIND #define PD6_WPORT PORTD #define PD6_DDR DDRD -#define PD6_PWM NULL +#define PD6_PWM nullptr #undef PD7 #define PD7_PIN PIND7 #define PD7_RPORT PIND #define PD7_WPORT PORTD #define PD7_DDR DDRD -#define PD7_PWM NULL +#define PD7_PWM nullptr #undef PE0 #define PE0_PIN PINE0 #define PE0_RPORT PINE #define PE0_WPORT PORTE #define PE0_DDR DDRE -#define PE0_PWM NULL +#define PE0_PWM nullptr #undef PE1 #define PE1_PIN PINE1 #define PE1_RPORT PINE #define PE1_WPORT PORTE #define PE1_DDR DDRE -#define PE1_PWM NULL +#define PE1_PWM nullptr #undef PE2 #define PE2_PIN PINE2 #define PE2_RPORT PINE #define PE2_WPORT PORTE #define PE2_DDR DDRE -#define PE2_PWM NULL +#define PE2_PWM nullptr #undef PE3 #define PE3_PIN PINE3 #define PE3_RPORT PINE @@ -823,93 +823,93 @@ #define PE6_RPORT PINE #define PE6_WPORT PORTE #define PE6_DDR DDRE -#define PE6_PWM NULL +#define PE6_PWM nullptr #undef PE7 #define PE7_PIN PINE7 #define PE7_RPORT PINE #define PE7_WPORT PORTE #define PE7_DDR DDRE -#define PE7_PWM NULL +#define PE7_PWM nullptr #undef PF0 #define PF0_PIN PINF0 #define PF0_RPORT PINF #define PF0_WPORT PORTF #define PF0_DDR DDRF -#define PF0_PWM NULL +#define PF0_PWM nullptr #undef PF1 #define PF1_PIN PINF1 #define PF1_RPORT PINF #define PF1_WPORT PORTF #define PF1_DDR DDRF -#define PF1_PWM NULL +#define PF1_PWM nullptr #undef PF2 #define PF2_PIN PINF2 #define PF2_RPORT PINF #define PF2_WPORT PORTF #define PF2_DDR DDRF -#define PF2_PWM NULL +#define PF2_PWM nullptr #undef PF3 #define PF3_PIN PINF3 #define PF3_RPORT PINF #define PF3_WPORT PORTF #define PF3_DDR DDRF -#define PF3_PWM NULL +#define PF3_PWM nullptr #undef PF4 #define PF4_PIN PINF4 #define PF4_RPORT PINF #define PF4_WPORT PORTF #define PF4_DDR DDRF -#define PF4_PWM NULL +#define PF4_PWM nullptr #undef PF5 #define PF5_PIN PINF5 #define PF5_RPORT PINF #define PF5_WPORT PORTF #define PF5_DDR DDRF -#define PF5_PWM NULL +#define PF5_PWM nullptr #undef PF6 #define PF6_PIN PINF6 #define PF6_RPORT PINF #define PF6_WPORT PORTF #define PF6_DDR DDRF -#define PF6_PWM NULL +#define PF6_PWM nullptr #undef PF7 #define PF7_PIN PINF7 #define PF7_RPORT PINF #define PF7_WPORT PORTF #define PF7_DDR DDRF -#define PF7_PWM NULL +#define PF7_PWM nullptr #undef PG0 #define PG0_PIN PING0 #define PG0_RPORT PING #define PG0_WPORT PORTG #define PG0_DDR DDRG -#define PG0_PWM NULL +#define PG0_PWM nullptr #undef PG1 #define PG1_PIN PING1 #define PG1_RPORT PING #define PG1_WPORT PORTG #define PG1_DDR DDRG -#define PG1_PWM NULL +#define PG1_PWM nullptr #undef PG2 #define PG2_PIN PING2 #define PG2_RPORT PING #define PG2_WPORT PORTG #define PG2_DDR DDRG -#define PG2_PWM NULL +#define PG2_PWM nullptr #undef PG3 #define PG3_PIN PING3 #define PG3_RPORT PING #define PG3_WPORT PORTG #define PG3_DDR DDRG -#define PG3_PWM NULL +#define PG3_PWM nullptr #undef PG4 #define PG4_PIN PING4 #define PG4_RPORT PING #define PG4_WPORT PORTG #define PG4_DDR DDRG -#define PG4_PWM NULL +#define PG4_PWM nullptr #undef PG5 #define PG5_PIN PING5 #define PG5_RPORT PING @@ -922,19 +922,19 @@ #define PH0_RPORT PINH #define PH0_WPORT PORTH #define PH0_DDR DDRH -#define PH0_PWM NULL +#define PH0_PWM nullptr #undef PH1 #define PH1_PIN PINH1 #define PH1_RPORT PINH #define PH1_WPORT PORTH #define PH1_DDR DDRH -#define PH1_PWM NULL +#define PH1_PWM nullptr #undef PH2 #define PH2_PIN PINH2 #define PH2_RPORT PINH #define PH2_WPORT PORTH #define PH2_DDR DDRH -#define PH2_PWM NULL +#define PH2_PWM nullptr #undef PH3 #define PH3_PIN PINH3 #define PH3_RPORT PINH @@ -964,124 +964,124 @@ #define PH7_RPORT PINH #define PH7_WPORT PORTH #define PH7_DDR DDRH -#define PH7_PWM NULL +#define PH7_PWM nullptr #undef PJ0 #define PJ0_PIN PINJ0 #define PJ0_RPORT PINJ #define PJ0_WPORT PORTJ #define PJ0_DDR DDRJ -#define PJ0_PWM NULL +#define PJ0_PWM nullptr #undef PJ1 #define PJ1_PIN PINJ1 #define PJ1_RPORT PINJ #define PJ1_WPORT PORTJ #define PJ1_DDR DDRJ -#define PJ1_PWM NULL +#define PJ1_PWM nullptr #undef PJ2 #define PJ2_PIN PINJ2 #define PJ2_RPORT PINJ #define PJ2_WPORT PORTJ #define PJ2_DDR DDRJ -#define PJ2_PWM NULL +#define PJ2_PWM nullptr #undef PJ3 #define PJ3_PIN PINJ3 #define PJ3_RPORT PINJ #define PJ3_WPORT PORTJ #define PJ3_DDR DDRJ -#define PJ3_PWM NULL +#define PJ3_PWM nullptr #undef PJ4 #define PJ4_PIN PINJ4 #define PJ4_RPORT PINJ #define PJ4_WPORT PORTJ #define PJ4_DDR DDRJ -#define PJ4_PWM NULL +#define PJ4_PWM nullptr #undef PJ5 #define PJ5_PIN PINJ5 #define PJ5_RPORT PINJ #define PJ5_WPORT PORTJ #define PJ5_DDR DDRJ -#define PJ5_PWM NULL +#define PJ5_PWM nullptr #undef PJ6 #define PJ6_PIN PINJ6 #define PJ6_RPORT PINJ #define PJ6_WPORT PORTJ #define PJ6_DDR DDRJ -#define PJ6_PWM NULL +#define PJ6_PWM nullptr #undef PJ7 #define PJ7_PIN PINJ7 #define PJ7_RPORT PINJ #define PJ7_WPORT PORTJ #define PJ7_DDR DDRJ -#define PJ7_PWM NULL +#define PJ7_PWM nullptr #undef PK0 #define PK0_PIN PINK0 #define PK0_RPORT PINK #define PK0_WPORT PORTK #define PK0_DDR DDRK -#define PK0_PWM NULL +#define PK0_PWM nullptr #undef PK1 #define PK1_PIN PINK1 #define PK1_RPORT PINK #define PK1_WPORT PORTK #define PK1_DDR DDRK -#define PK1_PWM NULL +#define PK1_PWM nullptr #undef PK2 #define PK2_PIN PINK2 #define PK2_RPORT PINK #define PK2_WPORT PORTK #define PK2_DDR DDRK -#define PK2_PWM NULL +#define PK2_PWM nullptr #undef PK3 #define PK3_PIN PINK3 #define PK3_RPORT PINK #define PK3_WPORT PORTK #define PK3_DDR DDRK -#define PK3_PWM NULL +#define PK3_PWM nullptr #undef PK4 #define PK4_PIN PINK4 #define PK4_RPORT PINK #define PK4_WPORT PORTK #define PK4_DDR DDRK -#define PK4_PWM NULL +#define PK4_PWM nullptr #undef PK5 #define PK5_PIN PINK5 #define PK5_RPORT PINK #define PK5_WPORT PORTK #define PK5_DDR DDRK -#define PK5_PWM NULL +#define PK5_PWM nullptr #undef PK6 #define PK6_PIN PINK6 #define PK6_RPORT PINK #define PK6_WPORT PORTK #define PK6_DDR DDRK -#define PK6_PWM NULL +#define PK6_PWM nullptr #undef PK7 #define PK7_PIN PINK7 #define PK7_RPORT PINK #define PK7_WPORT PORTK #define PK7_DDR DDRK -#define PK7_PWM NULL +#define PK7_PWM nullptr #undef PL0 #define PL0_PIN PINL0 #define PL0_RPORT PINL #define PL0_WPORT PORTL #define PL0_DDR DDRL -#define PL0_PWM NULL +#define PL0_PWM nullptr #undef PL1 #define PL1_PIN PINL1 #define PL1_RPORT PINL #define PL1_WPORT PORTL #define PL1_DDR DDRL -#define PL1_PWM NULL +#define PL1_PWM nullptr #undef PL2 #define PL2_PIN PINL2 #define PL2_RPORT PINL #define PL2_WPORT PORTL #define PL2_DDR DDRL -#define PL2_PWM NULL +#define PL2_PWM nullptr #undef PL3 #define PL3_PIN PINL3 #define PL3_RPORT PINL @@ -1105,10 +1105,10 @@ #define PL6_RPORT PINL #define PL6_WPORT PORTL #define PL6_DDR DDRL -#define PL6_PWM NULL +#define PL6_PWM nullptr #undef PL7 #define PL7_PIN PINL7 #define PL7_RPORT PINL #define PL7_WPORT PORTL #define PL7_DDR DDRL -#define PL7_PWM NULL +#define PL7_PWM nullptr diff --git a/Marlin/src/HAL/HAL_AVR/fastio_1281.h b/Marlin/src/HAL/HAL_AVR/fastio_1281.h index 9707c7d54b..be34d0727c 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_1281.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_1281.h @@ -63,13 +63,13 @@ #define DIO0_RPORT PINE #define DIO0_WPORT PORTE #define DIO0_DDR DDRE -#define DIO0_PWM NULL +#define DIO0_PWM nullptr #define DIO1_PIN PINE1 #define DIO1_RPORT PINE #define DIO1_WPORT PORTE #define DIO1_DDR DDRE -#define DIO1_PWM NULL +#define DIO1_PWM nullptr #define DIO2_PIN PINE4 #define DIO2_RPORT PINE @@ -123,339 +123,339 @@ #define DIO10_RPORT PINB #define DIO10_WPORT PORTB #define DIO10_DDR DDRB -#define DIO10_PWM NULL +#define DIO10_PWM nullptr #define DIO11_PIN PINB2 #define DIO11_RPORT PINB #define DIO11_WPORT PORTB #define DIO11_DDR DDRB -#define DIO11_PWM NULL +#define DIO11_PWM nullptr #define DIO12_PIN PINB3 #define DIO12_RPORT PINB #define DIO12_WPORT PORTB #define DIO12_DDR DDRB -#define DIO12_PWM NULL +#define DIO12_PWM nullptr #define DIO13_PIN PINE2 #define DIO13_RPORT PINE #define DIO13_WPORT PORTE #define DIO13_DDR DDRE -#define DIO13_PWM NULL +#define DIO13_PWM nullptr #define DIO14_PIN PINE6 #define DIO14_RPORT PINE #define DIO14_WPORT PORTE #define DIO14_DDR DDRE -#define DIO14_PWM NULL +#define DIO14_PWM nullptr #define DIO15_PIN PINE7 #define DIO15_RPORT PINE #define DIO15_WPORT PORTE #define DIO15_DDR DDRE -#define DIO15_PWM NULL +#define DIO15_PWM nullptr #define DIO16_PIN PINB0 #define DIO16_RPORT PINB #define DIO16_WPORT PORTB #define DIO16_DDR DDRB -#define DIO16_PWM NULL +#define DIO16_PWM nullptr #define DIO17_PIN PIND0 #define DIO17_RPORT PIND #define DIO17_WPORT PORTD #define DIO17_DDR DDRD -#define DIO17_PWM NULL +#define DIO17_PWM nullptr #define DIO18_PIN PIND1 #define DIO18_RPORT PIND #define DIO18_WPORT PORTD #define DIO18_DDR DDRD -#define DIO18_PWM NULL +#define DIO18_PWM nullptr #define DIO19_PIN PIND2 #define DIO19_RPORT PIND #define DIO19_WPORT PORTD #define DIO19_DDR DDRD -#define DIO19_PWM NULL +#define DIO19_PWM nullptr #define DIO20_PIN PIND3 #define DIO20_RPORT PIND #define DIO20_WPORT PORTD #define DIO20_DDR DDRD -#define DIO20_PWM NULL +#define DIO20_PWM nullptr #define DIO21_PIN PIND4 #define DIO21_RPORT PIND #define DIO21_WPORT PORTD #define DIO21_DDR DDRD -#define DIO21_PWM NULL +#define DIO21_PWM nullptr #define DIO22_PIN PIND5 #define DIO22_RPORT PIND #define DIO22_WPORT PORTD #define DIO22_DDR DDRD -#define DIO22_PWM NULL +#define DIO22_PWM nullptr #define DIO23_PIN PIND6 #define DIO23_RPORT PIND #define DIO23_WPORT PORTD #define DIO23_DDR DDRD -#define DIO23_PWM NULL +#define DIO23_PWM nullptr #define DIO24_PIN PIND7 #define DIO24_RPORT PIND #define DIO24_WPORT PORTD #define DIO24_DDR DDRD -#define DIO24_PWM NULL +#define DIO24_PWM nullptr #define DIO25_PIN PING0 #define DIO25_RPORT PING #define DIO25_WPORT PORTG #define DIO25_DDR DDRG -#define DIO25_PWM NULL +#define DIO25_PWM nullptr #define DIO26_PIN PING1 #define DIO26_RPORT PING #define DIO26_WPORT PORTG #define DIO26_DDR DDRG -#define DIO26_PWM NULL +#define DIO26_PWM nullptr #define DIO27_PIN PING2 #define DIO27_RPORT PING #define DIO27_WPORT PORTG #define DIO27_DDR DDRG -#define DIO27_PWM NULL +#define DIO27_PWM nullptr #define DIO28_PIN PING3 #define DIO28_RPORT PING #define DIO28_WPORT PORTG #define DIO28_DDR DDRG -#define DIO28_PWM NULL +#define DIO28_PWM nullptr #define DIO29_PIN PING4 #define DIO29_RPORT PING #define DIO29_WPORT PORTG #define DIO29_DDR DDRG -#define DIO29_PWM NULL +#define DIO29_PWM nullptr #define DIO30_PIN PINC0 #define DIO30_RPORT PINC #define DIO30_WPORT PORTC #define DIO30_DDR DDRC -#define DIO30_PWM NULL +#define DIO30_PWM nullptr #define DIO31_PIN PINC1 #define DIO31_RPORT PINC #define DIO31_WPORT PORTC #define DIO31_DDR DDRC -#define DIO31_PWM NULL +#define DIO31_PWM nullptr #define DIO32_PIN PINC2 #define DIO32_RPORT PINC #define DIO32_WPORT PORTC #define DIO32_DDR DDRC -#define DIO32_PWM NULL +#define DIO32_PWM nullptr #define DIO33_PIN PINC3 #define DIO33_RPORT PINC #define DIO33_WPORT PORTC #define DIO33_DDR DDRC -#define DIO33_PWM NULL +#define DIO33_PWM nullptr #define DIO34_PIN PINC4 #define DIO34_RPORT PINC #define DIO34_WPORT PORTC #define DIO34_DDR DDRC -#define DIO34_PWM NULL +#define DIO34_PWM nullptr #define DIO35_PIN PINC5 #define DIO35_RPORT PINC #define DIO35_WPORT PORTC #define DIO35_DDR DDRC -#define DIO35_PWM NULL +#define DIO35_PWM nullptr #define DIO36_PIN PINC6 #define DIO36_RPORT PINC #define DIO36_WPORT PORTC #define DIO36_DDR DDRC -#define DIO36_PWM NULL +#define DIO36_PWM nullptr #define DIO37_PIN PINC7 #define DIO37_RPORT PINC #define DIO37_WPORT PORTC #define DIO37_DDR DDRC -#define DIO37_PWM NULL +#define DIO37_PWM nullptr #define DIO38_PIN PINA0 #define DIO38_RPORT PINA #define DIO38_WPORT PORTA #define DIO38_DDR DDRA -#define DIO38_PWM NULL +#define DIO38_PWM nullptr #define DIO39_PIN PINA1 #define DIO39_RPORT PINA #define DIO39_WPORT PORTA #define DIO39_DDR DDRA -#define DIO39_PWM NULL +#define DIO39_PWM nullptr #define DIO40_PIN PINA2 #define DIO40_RPORT PINA #define DIO40_WPORT PORTA #define DIO40_DDR DDRA -#define DIO40_PWM NULL +#define DIO40_PWM nullptr #define DIO41_PIN PINA3 #define DIO41_RPORT PINA #define DIO41_WPORT PORTA #define DIO41_DDR DDRA -#define DIO41_PWM NULL +#define DIO41_PWM nullptr #define DIO42_PIN PINA4 #define DIO42_RPORT PINA #define DIO42_WPORT PORTA #define DIO42_DDR DDRA -#define DIO42_PWM NULL +#define DIO42_PWM nullptr #define DIO43_PIN PINA5 #define DIO43_RPORT PINA #define DIO43_WPORT PORTA #define DIO43_DDR DDRA -#define DIO43_PWM NULL +#define DIO43_PWM nullptr #define DIO44_PIN PINA6 #define DIO44_RPORT PINA #define DIO44_WPORT PORTA #define DIO44_DDR DDRA -#define DIO44_PWM NULL +#define DIO44_PWM nullptr #define DIO45_PIN PINA7 #define DIO45_RPORT PINA #define DIO45_WPORT PORTA #define DIO45_DDR DDRA -#define DIO45_PWM NULL +#define DIO45_PWM nullptr #define DIO46_PIN PINF0 #define DIO46_RPORT PINF #define DIO46_WPORT PORTF #define DIO46_DDR DDRF -#define DIO46_PWM NULL +#define DIO46_PWM nullptr #define DIO47_PIN PINF1 #define DIO47_RPORT PINF #define DIO47_WPORT PORTF #define DIO47_DDR DDRF -#define DIO47_PWM NULL +#define DIO47_PWM nullptr #define DIO48_PIN PINF2 #define DIO48_RPORT PINF #define DIO48_WPORT PORTF #define DIO48_DDR DDRF -#define DIO48_PWM NULL +#define DIO48_PWM nullptr #define DIO49_PIN PINF3 #define DIO49_RPORT PINF #define DIO49_WPORT PORTF #define DIO49_DDR DDRF -#define DIO49_PWM NULL +#define DIO49_PWM nullptr #define DIO50_PIN PINF4 #define DIO50_RPORT PINF #define DIO50_WPORT PORTF #define DIO50_DDR DDRF -#define DIO50_PWM NULL +#define DIO50_PWM nullptr #define DIO51_PIN PINF5 #define DIO51_RPORT PINF #define DIO51_WPORT PORTF #define DIO51_DDR DDRF -#define DIO51_PWM NULL +#define DIO51_PWM nullptr #define DIO52_PIN PINF6 #define DIO52_RPORT PINF #define DIO52_WPORT PORTF #define DIO52_DDR DDRF -#define DIO52_PWM NULL +#define DIO52_PWM nullptr #define DIO53_PIN PINF7 #define DIO53_RPORT PINF #define DIO53_WPORT PORTF #define DIO53_DDR DDRF -#define DIO53_PWM NULL +#define DIO53_PWM nullptr #undef PA0 #define PA0_PIN PINA0 #define PA0_RPORT PINA #define PA0_WPORT PORTA #define PA0_DDR DDRA -#define PA0_PWM NULL +#define PA0_PWM nullptr #undef PA1 #define PA1_PIN PINA1 #define PA1_RPORT PINA #define PA1_WPORT PORTA #define PA1_DDR DDRA -#define PA1_PWM NULL +#define PA1_PWM nullptr #undef PA2 #define PA2_PIN PINA2 #define PA2_RPORT PINA #define PA2_WPORT PORTA #define PA2_DDR DDRA -#define PA2_PWM NULL +#define PA2_PWM nullptr #undef PA3 #define PA3_PIN PINA3 #define PA3_RPORT PINA #define PA3_WPORT PORTA #define PA3_DDR DDRA -#define PA3_PWM NULL +#define PA3_PWM nullptr #undef PA4 #define PA4_PIN PINA4 #define PA4_RPORT PINA #define PA4_WPORT PORTA #define PA4_DDR DDRA -#define PA4_PWM NULL +#define PA4_PWM nullptr #undef PA5 #define PA5_PIN PINA5 #define PA5_RPORT PINA #define PA5_WPORT PORTA #define PA5_DDR DDRA -#define PA5_PWM NULL +#define PA5_PWM nullptr #undef PA6 #define PA6_PIN PINA6 #define PA6_RPORT PINA #define PA6_WPORT PORTA #define PA6_DDR DDRA -#define PA6_PWM NULL +#define PA6_PWM nullptr #undef PA7 #define PA7_PIN PINA7 #define PA7_RPORT PINA #define PA7_WPORT PORTA #define PA7_DDR DDRA -#define PA7_PWM NULL +#define PA7_PWM nullptr #undef PB0 #define PB0_PIN PINB0 #define PB0_RPORT PINB #define PB0_WPORT PORTB #define PB0_DDR DDRB -#define PB0_PWM NULL +#define PB0_PWM nullptr #undef PB1 #define PB1_PIN PINB1 #define PB1_RPORT PINB #define PB1_WPORT PORTB #define PB1_DDR DDRB -#define PB1_PWM NULL +#define PB1_PWM nullptr #undef PB2 #define PB2_PIN PINB2 #define PB2_RPORT PINB #define PB2_WPORT PORTB #define PB2_DDR DDRB -#define PB2_PWM NULL +#define PB2_PWM nullptr #undef PB3 #define PB3_PIN PINB3 #define PB3_RPORT PINB #define PB3_WPORT PORTB #define PB3_DDR DDRB -#define PB3_PWM NULL +#define PB3_PWM nullptr #undef PB4 #define PB4_PIN PINB4 #define PB4_RPORT PINB @@ -467,13 +467,13 @@ #define PB5_RPORT PINB #define PB5_WPORT PORTB #define PB5_DDR DDRB -#define PB5_PWM NULL +#define PB5_PWM nullptr #undef PB6 #define PB6_PIN PINB6 #define PB6_RPORT PINB #define PB6_WPORT PORTB #define PB6_DDR DDRB -#define PB6_PWM NULL +#define PB6_PWM nullptr #undef PB7 #define PB7_PIN PINB7 #define PB7_RPORT PINB @@ -486,117 +486,117 @@ #define PC0_RPORT PINC #define PC0_WPORT PORTC #define PC0_DDR DDRC -#define PC0_PWM NULL +#define PC0_PWM nullptr #undef PC1 #define PC1_PIN PINC1 #define PC1_RPORT PINC #define PC1_WPORT PORTC #define PC1_DDR DDRC -#define PC1_PWM NULL +#define PC1_PWM nullptr #undef PC2 #define PC2_PIN PINC2 #define PC2_RPORT PINC #define PC2_WPORT PORTC #define PC2_DDR DDRC -#define PC2_PWM NULL +#define PC2_PWM nullptr #undef PC3 #define PC3_PIN PINC3 #define PC3_RPORT PINC #define PC3_WPORT PORTC #define PC3_DDR DDRC -#define PC3_PWM NULL +#define PC3_PWM nullptr #undef PC4 #define PC4_PIN PINC4 #define PC4_RPORT PINC #define PC4_WPORT PORTC #define PC4_DDR DDRC -#define PC4_PWM NULL +#define PC4_PWM nullptr #undef PC5 #define PC5_PIN PINC5 #define PC5_RPORT PINC #define PC5_WPORT PORTC #define PC5_DDR DDRC -#define PC5_PWM NULL +#define PC5_PWM nullptr #undef PC6 #define PC6_PIN PINC6 #define PC6_RPORT PINC #define PC6_WPORT PORTC #define PC6_DDR DDRC -#define PC6_PWM NULL +#define PC6_PWM nullptr #undef PC7 #define PC7_PIN PINC7 #define PC7_RPORT PINC #define PC7_WPORT PORTC #define PC7_DDR DDRC -#define PC7_PWM NULL +#define PC7_PWM nullptr #undef PD0 #define PD0_PIN PIND0 #define PD0_RPORT PIND #define PD0_WPORT PORTD #define PD0_DDR DDRD -#define PD0_PWM NULL +#define PD0_PWM nullptr #undef PD1 #define PD1_PIN PIND1 #define PD1_RPORT PIND #define PD1_WPORT PORTD #define PD1_DDR DDRD -#define PD1_PWM NULL +#define PD1_PWM nullptr #undef PD2 #define PD2_PIN PIND2 #define PD2_RPORT PIND #define PD2_WPORT PORTD #define PD2_DDR DDRD -#define PD2_PWM NULL +#define PD2_PWM nullptr #undef PD3 #define PD3_PIN PIND3 #define PD3_RPORT PIND #define PD3_WPORT PORTD #define PD3_DDR DDRD -#define PD3_PWM NULL +#define PD3_PWM nullptr #undef PD4 #define PD4_PIN PIND4 #define PD4_RPORT PIND #define PD4_WPORT PORTD #define PD4_DDR DDRD -#define PD4_PWM NULL +#define PD4_PWM nullptr #undef PD5 #define PD5_PIN PIND5 #define PD5_RPORT PIND #define PD5_WPORT PORTD #define PD5_DDR DDRD -#define PD5_PWM NULL +#define PD5_PWM nullptr #undef PD6 #define PD6_PIN PIND6 #define PD6_RPORT PIND #define PD6_WPORT PORTD #define PD6_DDR DDRD -#define PD6_PWM NULL +#define PD6_PWM nullptr #undef PD7 #define PD7_PIN PIND7 #define PD7_RPORT PIND #define PD7_WPORT PORTD #define PD7_DDR DDRD -#define PD7_PWM NULL +#define PD7_PWM nullptr #undef PE0 #define PE0_PIN PINE0 #define PE0_RPORT PINE #define PE0_WPORT PORTE #define PE0_DDR DDRE -#define PE0_PWM NULL +#define PE0_PWM nullptr #undef PE1 #define PE1_PIN PINE1 #define PE1_RPORT PINE #define PE1_WPORT PORTE #define PE1_DDR DDRE -#define PE1_PWM NULL +#define PE1_PWM nullptr #undef PE2 #define PE2_PIN PINE2 #define PE2_RPORT PINE #define PE2_WPORT PORTE #define PE2_DDR DDRE -#define PE2_PWM NULL +#define PE2_PWM nullptr #undef PE3 #define PE3_PIN PINE3 #define PE3_RPORT PINE @@ -620,93 +620,93 @@ #define PE6_RPORT PINE #define PE6_WPORT PORTE #define PE6_DDR DDRE -#define PE6_PWM NULL +#define PE6_PWM nullptr #undef PE7 #define PE7_PIN PINE7 #define PE7_RPORT PINE #define PE7_WPORT PORTE #define PE7_DDR DDRE -#define PE7_PWM NULL +#define PE7_PWM nullptr #undef PF0 #define PF0_PIN PINF0 #define PF0_RPORT PINF #define PF0_WPORT PORTF #define PF0_DDR DDRF -#define PF0_PWM NULL +#define PF0_PWM nullptr #undef PF1 #define PF1_PIN PINF1 #define PF1_RPORT PINF #define PF1_WPORT PORTF #define PF1_DDR DDRF -#define PF1_PWM NULL +#define PF1_PWM nullptr #undef PF2 #define PF2_PIN PINF2 #define PF2_RPORT PINF #define PF2_WPORT PORTF #define PF2_DDR DDRF -#define PF2_PWM NULL +#define PF2_PWM nullptr #undef PF3 #define PF3_PIN PINF3 #define PF3_RPORT PINF #define PF3_WPORT PORTF #define PF3_DDR DDRF -#define PF3_PWM NULL +#define PF3_PWM nullptr #undef PF4 #define PF4_PIN PINF4 #define PF4_RPORT PINF #define PF4_WPORT PORTF #define PF4_DDR DDRF -#define PF4_PWM NULL +#define PF4_PWM nullptr #undef PF5 #define PF5_PIN PINF5 #define PF5_RPORT PINF #define PF5_WPORT PORTF #define PF5_DDR DDRF -#define PF5_PWM NULL +#define PF5_PWM nullptr #undef PF6 #define PF6_PIN PINF6 #define PF6_RPORT PINF #define PF6_WPORT PORTF #define PF6_DDR DDRF -#define PF6_PWM NULL +#define PF6_PWM nullptr #undef PF7 #define PF7_PIN PINF7 #define PF7_RPORT PINF #define PF7_WPORT PORTF #define PF7_DDR DDRF -#define PF7_PWM NULL +#define PF7_PWM nullptr #undef PG0 #define PG0_PIN PING0 #define PG0_RPORT PING #define PG0_WPORT PORTG #define PG0_DDR DDRG -#define PG0_PWM NULL +#define PG0_PWM nullptr #undef PG1 #define PG1_PIN PING1 #define PG1_RPORT PING #define PG1_WPORT PORTG #define PG1_DDR DDRG -#define PG1_PWM NULL +#define PG1_PWM nullptr #undef PG2 #define PG2_PIN PING2 #define PG2_RPORT PING #define PG2_WPORT PORTG #define PG2_DDR DDRG -#define PG2_PWM NULL +#define PG2_PWM nullptr #undef PG3 #define PG3_PIN PING3 #define PG3_RPORT PING #define PG3_WPORT PORTG #define PG3_DDR DDRG -#define PG3_PWM NULL +#define PG3_PWM nullptr #undef PG4 #define PG4_PIN PING4 #define PG4_RPORT PING #define PG4_WPORT PORTG #define PG4_DDR DDRG -#define PG4_PWM NULL +#define PG4_PWM nullptr #undef PG5 #define PG5_PIN PING5 #define PG5_RPORT PING diff --git a/Marlin/src/HAL/HAL_AVR/fastio_168.h b/Marlin/src/HAL/HAL_AVR/fastio_168.h index 2964ef5a0b..d981287086 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_168.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_168.h @@ -60,19 +60,19 @@ #define DIO0_RPORT PIND #define DIO0_WPORT PORTD #define DIO0_DDR DDRD -#define DIO0_PWM NULL +#define DIO0_PWM nullptr #define DIO1_PIN PIND1 #define DIO1_RPORT PIND #define DIO1_WPORT PORTD #define DIO1_DDR DDRD -#define DIO1_PWM NULL +#define DIO1_PWM nullptr #define DIO2_PIN PIND2 #define DIO2_RPORT PIND #define DIO2_WPORT PORTD #define DIO2_DDR DDRD -#define DIO2_PWM NULL +#define DIO2_PWM nullptr #define DIO3_PIN PIND3 #define DIO3_RPORT PIND @@ -84,7 +84,7 @@ #define DIO4_RPORT PIND #define DIO4_WPORT PORTD #define DIO4_DDR DDRD -#define DIO4_PWM NULL +#define DIO4_PWM nullptr #define DIO5_PIN PIND5 #define DIO5_RPORT PIND @@ -102,25 +102,25 @@ #define DIO7_RPORT PIND #define DIO7_WPORT PORTD #define DIO7_DDR DDRD -#define DIO7_PWM NULL +#define DIO7_PWM nullptr #define DIO8_PIN PINB0 #define DIO8_RPORT PINB #define DIO8_WPORT PORTB #define DIO8_DDR DDRB -#define DIO8_PWM NULL +#define DIO8_PWM nullptr #define DIO9_PIN PINB1 #define DIO9_RPORT PINB #define DIO9_WPORT PORTB #define DIO9_DDR DDRB -#define DIO9_PWM NULL +#define DIO9_PWM nullptr #define DIO10_PIN PINB2 #define DIO10_RPORT PINB #define DIO10_WPORT PORTB #define DIO10_DDR DDRB -#define DIO10_PWM NULL +#define DIO10_PWM nullptr #define DIO11_PIN PINB3 #define DIO11_RPORT PINB @@ -132,82 +132,82 @@ #define DIO12_RPORT PINB #define DIO12_WPORT PORTB #define DIO12_DDR DDRB -#define DIO12_PWM NULL +#define DIO12_PWM nullptr #define DIO13_PIN PINB5 #define DIO13_RPORT PINB #define DIO13_WPORT PORTB #define DIO13_DDR DDRB -#define DIO13_PWM NULL +#define DIO13_PWM nullptr #define DIO14_PIN PINC0 #define DIO14_RPORT PINC #define DIO14_WPORT PORTC #define DIO14_DDR DDRC -#define DIO14_PWM NULL +#define DIO14_PWM nullptr #define DIO15_PIN PINC1 #define DIO15_RPORT PINC #define DIO15_WPORT PORTC #define DIO15_DDR DDRC -#define DIO15_PWM NULL +#define DIO15_PWM nullptr #define DIO16_PIN PINC2 #define DIO16_RPORT PINC #define DIO16_WPORT PORTC #define DIO16_DDR DDRC -#define DIO16_PWM NULL +#define DIO16_PWM nullptr #define DIO17_PIN PINC3 #define DIO17_RPORT PINC #define DIO17_WPORT PORTC #define DIO17_DDR DDRC -#define DIO17_PWM NULL +#define DIO17_PWM nullptr #define DIO18_PIN PINC4 #define DIO18_RPORT PINC #define DIO18_WPORT PORTC #define DIO18_DDR DDRC -#define DIO18_PWM NULL +#define DIO18_PWM nullptr #define DIO19_PIN PINC5 #define DIO19_RPORT PINC #define DIO19_WPORT PORTC #define DIO19_DDR DDRC -#define DIO19_PWM NULL +#define DIO19_PWM nullptr #define DIO20_PIN PINC6 #define DIO20_RPORT PINC #define DIO20_WPORT PORTC #define DIO20_DDR DDRC -#define DIO20_PWM NULL +#define DIO20_PWM nullptr #define DIO21_PIN PINC7 #define DIO21_RPORT PINC #define DIO21_WPORT PORTC #define DIO21_DDR DDRC -#define DIO21_PWM NULL +#define DIO21_PWM nullptr #undef PB0 #define PB0_PIN PINB0 #define PB0_RPORT PINB #define PB0_WPORT PORTB #define PB0_DDR DDRB -#define PB0_PWM NULL +#define PB0_PWM nullptr #undef PB1 #define PB1_PIN PINB1 #define PB1_RPORT PINB #define PB1_WPORT PORTB #define PB1_DDR DDRB -#define PB1_PWM NULL +#define PB1_PWM nullptr #undef PB2 #define PB2_PIN PINB2 #define PB2_RPORT PINB #define PB2_WPORT PORTB #define PB2_DDR DDRB -#define PB2_PWM NULL +#define PB2_PWM nullptr #undef PB3 #define PB3_PIN PINB3 @@ -221,105 +221,105 @@ #define PB4_RPORT PINB #define PB4_WPORT PORTB #define PB4_DDR DDRB -#define PB4_PWM NULL +#define PB4_PWM nullptr #undef PB5 #define PB5_PIN PINB5 #define PB5_RPORT PINB #define PB5_WPORT PORTB #define PB5_DDR DDRB -#define PB5_PWM NULL +#define PB5_PWM nullptr #undef PB6 #define PB6_PIN PINB6 #define PB6_RPORT PINB #define PB6_WPORT PORTB #define PB6_DDR DDRB -#define PB6_PWM NULL +#define PB6_PWM nullptr #undef PB7 #define PB7_PIN PINB7 #define PB7_RPORT PINB #define PB7_WPORT PORTB #define PB7_DDR DDRB -#define PB7_PWM NULL +#define PB7_PWM nullptr #undef PC0 #define PC0_PIN PINC0 #define PC0_RPORT PINC #define PC0_WPORT PORTC #define PC0_DDR DDRC -#define PC0_PWM NULL +#define PC0_PWM nullptr #undef PC1 #define PC1_PIN PINC1 #define PC1_RPORT PINC #define PC1_WPORT PORTC #define PC1_DDR DDRC -#define PC1_PWM NULL +#define PC1_PWM nullptr #undef PC2 #define PC2_PIN PINC2 #define PC2_RPORT PINC #define PC2_WPORT PORTC #define PC2_DDR DDRC -#define PC2_PWM NULL +#define PC2_PWM nullptr #undef PC3 #define PC3_PIN PINC3 #define PC3_RPORT PINC #define PC3_WPORT PORTC #define PC3_DDR DDRC -#define PC3_PWM NULL +#define PC3_PWM nullptr #undef PC4 #define PC4_PIN PINC4 #define PC4_RPORT PINC #define PC4_WPORT PORTC #define PC4_DDR DDRC -#define PC4_PWM NULL +#define PC4_PWM nullptr #undef PC5 #define PC5_PIN PINC5 #define PC5_RPORT PINC #define PC5_WPORT PORTC #define PC5_DDR DDRC -#define PC5_PWM NULL +#define PC5_PWM nullptr #undef PC6 #define PC6_PIN PINC6 #define PC6_RPORT PINC #define PC6_WPORT PORTC #define PC6_DDR DDRC -#define PC6_PWM NULL +#define PC6_PWM nullptr #undef PC7 #define PC7_PIN PINC7 #define PC7_RPORT PINC #define PC7_WPORT PORTC #define PC7_DDR DDRC -#define PC7_PWM NULL +#define PC7_PWM nullptr #undef PD0 #define PD0_PIN PIND0 #define PD0_RPORT PIND #define PD0_WPORT PORTD #define PD0_DDR DDRD -#define PD0_PWM NULL +#define PD0_PWM nullptr #undef PD1 #define PD1_PIN PIND1 #define PD1_RPORT PIND #define PD1_WPORT PORTD #define PD1_DDR DDRD -#define PD1_PWM NULL +#define PD1_PWM nullptr #undef PD2 #define PD2_PIN PIND2 #define PD2_RPORT PIND #define PD2_WPORT PORTD #define PD2_DDR DDRD -#define PD2_PWM NULL +#define PD2_PWM nullptr #undef PD3 #define PD3_PIN PIND3 @@ -333,7 +333,7 @@ #define PD4_RPORT PIND #define PD4_WPORT PORTD #define PD4_DDR DDRD -#define PD4_PWM NULL +#define PD4_PWM nullptr #undef PD5 #define PD5_PIN PIND5 @@ -354,4 +354,4 @@ #define PD7_RPORT PIND #define PD7_WPORT PORTD #define PD7_DDR DDRD -#define PD7_PWM NULL +#define PD7_PWM nullptr diff --git a/Marlin/src/HAL/HAL_AVR/fastio_644.h b/Marlin/src/HAL/HAL_AVR/fastio_644.h index bcd825d24c..0ce458be58 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_644.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_644.h @@ -91,462 +91,462 @@ #define DIO0_RPORT PINB #define DIO0_WPORT PORTB #define DIO0_DDR DDRB -#define DIO0_PWM NULL +#define DIO0_PWM nullptr #define DIO1_PIN PINB1 #define DIO1_RPORT PINB #define DIO1_WPORT PORTB #define DIO1_DDR DDRB -#define DIO1_PWM NULL +#define DIO1_PWM nullptr #define DIO2_PIN PINB2 #define DIO2_RPORT PINB #define DIO2_WPORT PORTB #define DIO2_DDR DDRB -#define DIO2_PWM NULL +#define DIO2_PWM nullptr #define DIO3_PIN PINB3 #define DIO3_RPORT PINB #define DIO3_WPORT PORTB #define DIO3_DDR DDRB -#define DIO3_PWM OCR0A +#define DIO3_PWM &OCR0A #define DIO4_PIN PINB4 #define DIO4_RPORT PINB #define DIO4_WPORT PORTB #define DIO4_DDR DDRB -#define DIO4_PWM OCR0B +#define DIO4_PWM &OCR0B #define DIO5_PIN PINB5 #define DIO5_RPORT PINB #define DIO5_WPORT PORTB #define DIO5_DDR DDRB -#define DIO5_PWM NULL +#define DIO5_PWM nullptr #define DIO6_PIN PINB6 #define DIO6_RPORT PINB #define DIO6_WPORT PORTB #define DIO6_DDR DDRB -#define DIO6_PWM NULL +#define DIO6_PWM nullptr #define DIO7_PIN PINB7 #define DIO7_RPORT PINB #define DIO7_WPORT PORTB #define DIO7_DDR DDRB -#define DIO7_PWM NULL +#define DIO7_PWM nullptr #define DIO8_PIN PIND0 #define DIO8_RPORT PIND #define DIO8_WPORT PORTD #define DIO8_DDR DDRD -#define DIO8_PWM NULL +#define DIO8_PWM nullptr #define DIO9_PIN PIND1 #define DIO9_RPORT PIND #define DIO9_WPORT PORTD #define DIO9_DDR DDRD -#define DIO9_PWM NULL +#define DIO9_PWM nullptr #define DIO10_PIN PIND2 #define DIO10_RPORT PIND #define DIO10_WPORT PORTD #define DIO10_DDR DDRD -#define DIO10_PWM NULL +#define DIO10_PWM nullptr #define DIO11_PIN PIND3 #define DIO11_RPORT PIND #define DIO11_WPORT PORTD #define DIO11_DDR DDRD -#define DIO11_PWM NULL +#define DIO11_PWM nullptr #define DIO12_PIN PIND4 #define DIO12_RPORT PIND #define DIO12_WPORT PORTD #define DIO12_DDR DDRD -#define DIO12_PWM OCR1B +#define DIO12_PWM &OCR1B #define DIO13_PIN PIND5 #define DIO13_RPORT PIND #define DIO13_WPORT PORTD #define DIO13_DDR DDRD -#define DIO13_PWM OCR1A +#define DIO13_PWM &OCR1A #define DIO14_PIN PIND6 #define DIO14_RPORT PIND #define DIO14_WPORT PORTD #define DIO14_DDR DDRD -#define DIO14_PWM OCR2B +#define DIO14_PWM &OCR2B #define DIO15_PIN PIND7 #define DIO15_RPORT PIND #define DIO15_WPORT PORTD #define DIO15_DDR DDRD -#define DIO15_PWM OCR2A +#define DIO15_PWM &OCR2A #define DIO16_PIN PINC0 #define DIO16_RPORT PINC #define DIO16_WPORT PORTC #define DIO16_DDR DDRC -#define DIO16_PWM NULL +#define DIO16_PWM nullptr #define DIO17_PIN PINC1 #define DIO17_RPORT PINC #define DIO17_WPORT PORTC #define DIO17_DDR DDRC -#define DIO17_PWM NULL +#define DIO17_PWM nullptr #define DIO18_PIN PINC2 #define DIO18_RPORT PINC #define DIO18_WPORT PORTC #define DIO18_DDR DDRC -#define DIO18_PWM NULL +#define DIO18_PWM nullptr #define DIO19_PIN PINC3 #define DIO19_RPORT PINC #define DIO19_WPORT PORTC #define DIO19_DDR DDRC -#define DIO19_PWM NULL +#define DIO19_PWM nullptr #define DIO20_PIN PINC4 #define DIO20_RPORT PINC #define DIO20_WPORT PORTC #define DIO20_DDR DDRC -#define DIO20_PWM NULL +#define DIO20_PWM nullptr #define DIO21_PIN PINC5 #define DIO21_RPORT PINC #define DIO21_WPORT PORTC #define DIO21_DDR DDRC -#define DIO21_PWM NULL +#define DIO21_PWM nullptr #define DIO22_PIN PINC6 #define DIO22_RPORT PINC #define DIO22_WPORT PORTC #define DIO22_DDR DDRC -#define DIO22_PWM NULL +#define DIO22_PWM nullptr #define DIO23_PIN PINC7 #define DIO23_RPORT PINC #define DIO23_WPORT PORTC #define DIO23_DDR DDRC -#define DIO23_PWM NULL +#define DIO23_PWM nullptr #define DIO24_PIN PINA7 #define DIO24_RPORT PINA #define DIO24_WPORT PORTA #define DIO24_DDR DDRA -#define DIO24_PWM NULL +#define DIO24_PWM nullptr #define DIO25_PIN PINA6 #define DIO25_RPORT PINA #define DIO25_WPORT PORTA #define DIO25_DDR DDRA -#define DIO25_PWM NULL +#define DIO25_PWM nullptr #define DIO26_PIN PINA5 #define DIO26_RPORT PINA #define DIO26_WPORT PORTA #define DIO26_DDR DDRA -#define DIO26_PWM NULL +#define DIO26_PWM nullptr #define DIO27_PIN PINA4 #define DIO27_RPORT PINA #define DIO27_WPORT PORTA #define DIO27_DDR DDRA -#define DIO27_PWM NULL +#define DIO27_PWM nullptr #define DIO28_PIN PINA3 #define DIO28_RPORT PINA #define DIO28_WPORT PORTA #define DIO28_DDR DDRA -#define DIO28_PWM NULL +#define DIO28_PWM nullptr #define DIO29_PIN PINA2 #define DIO29_RPORT PINA #define DIO29_WPORT PORTA #define DIO29_DDR DDRA -#define DIO29_PWM NULL +#define DIO29_PWM nullptr #define DIO30_PIN PINA1 #define DIO30_RPORT PINA #define DIO30_WPORT PORTA #define DIO30_DDR DDRA -#define DIO30_PWM NULL +#define DIO30_PWM nullptr #define DIO31_PIN PINA0 #define DIO31_RPORT PINA #define DIO31_WPORT PORTA #define DIO31_DDR DDRA -#define DIO31_PWM NULL +#define DIO31_PWM nullptr #define AIO0_PIN PINA0 #define AIO0_RPORT PINA #define AIO0_WPORT PORTA #define AIO0_DDR DDRA -#define AIO0_PWM NULL +#define AIO0_PWM nullptr #define AIO1_PIN PINA1 #define AIO1_RPORT PINA #define AIO1_WPORT PORTA #define AIO1_DDR DDRA -#define AIO1_PWM NULL +#define AIO1_PWM nullptr #define AIO2_PIN PINA2 #define AIO2_RPORT PINA #define AIO2_WPORT PORTA #define AIO2_DDR DDRA -#define AIO2_PWM NULL +#define AIO2_PWM nullptr #define AIO3_PIN PINA3 #define AIO3_RPORT PINA #define AIO3_WPORT PORTA #define AIO3_DDR DDRA -#define AIO3_PWM NULL +#define AIO3_PWM nullptr #define AIO4_PIN PINA4 #define AIO4_RPORT PINA #define AIO4_WPORT PORTA #define AIO4_DDR DDRA -#define AIO4_PWM NULL +#define AIO4_PWM nullptr #define AIO5_PIN PINA5 #define AIO5_RPORT PINA #define AIO5_WPORT PORTA #define AIO5_DDR DDRA -#define AIO5_PWM NULL +#define AIO5_PWM nullptr #define AIO6_PIN PINA6 #define AIO6_RPORT PINA #define AIO6_WPORT PORTA #define AIO6_DDR DDRA -#define AIO6_PWM NULL +#define AIO6_PWM nullptr #define AIO7_PIN PINA7 #define AIO7_RPORT PINA #define AIO7_WPORT PORTA #define AIO7_DDR DDRA -#define AIO7_PWM NULL +#define AIO7_PWM nullptr #undef PA0 #define PA0_PIN PINA0 #define PA0_RPORT PINA #define PA0_WPORT PORTA #define PA0_DDR DDRA -#define PA0_PWM NULL +#define PA0_PWM nullptr #undef PA1 #define PA1_PIN PINA1 #define PA1_RPORT PINA #define PA1_WPORT PORTA #define PA1_DDR DDRA -#define PA1_PWM NULL +#define PA1_PWM nullptr #undef PA2 #define PA2_PIN PINA2 #define PA2_RPORT PINA #define PA2_WPORT PORTA #define PA2_DDR DDRA -#define PA2_PWM NULL +#define PA2_PWM nullptr #undef PA3 #define PA3_PIN PINA3 #define PA3_RPORT PINA #define PA3_WPORT PORTA #define PA3_DDR DDRA -#define PA3_PWM NULL +#define PA3_PWM nullptr #undef PA4 #define PA4_PIN PINA4 #define PA4_RPORT PINA #define PA4_WPORT PORTA #define PA4_DDR DDRA -#define PA4_PWM NULL +#define PA4_PWM nullptr #undef PA5 #define PA5_PIN PINA5 #define PA5_RPORT PINA #define PA5_WPORT PORTA #define PA5_DDR DDRA -#define PA5_PWM NULL +#define PA5_PWM nullptr #undef PA6 #define PA6_PIN PINA6 #define PA6_RPORT PINA #define PA6_WPORT PORTA #define PA6_DDR DDRA -#define PA6_PWM NULL +#define PA6_PWM nullptr #undef PA7 #define PA7_PIN PINA7 #define PA7_RPORT PINA #define PA7_WPORT PORTA #define PA7_DDR DDRA -#define PA7_PWM NULL +#define PA7_PWM nullptr #undef PB0 #define PB0_PIN PINB0 #define PB0_RPORT PINB #define PB0_WPORT PORTB #define PB0_DDR DDRB -#define PB0_PWM NULL +#define PB0_PWM nullptr #undef PB1 #define PB1_PIN PINB1 #define PB1_RPORT PINB #define PB1_WPORT PORTB #define PB1_DDR DDRB -#define PB1_PWM NULL +#define PB1_PWM nullptr #undef PB2 #define PB2_PIN PINB2 #define PB2_RPORT PINB #define PB2_WPORT PORTB #define PB2_DDR DDRB -#define PB2_PWM NULL +#define PB2_PWM nullptr #undef PB3 #define PB3_PIN PINB3 #define PB3_RPORT PINB #define PB3_WPORT PORTB #define PB3_DDR DDRB -#define PB3_PWM OCR0A +#define PB3_PWM &OCR0A #undef PB4 #define PB4_PIN PINB4 #define PB4_RPORT PINB #define PB4_WPORT PORTB #define PB4_DDR DDRB -#define PB4_PWM OCR0B +#define PB4_PWM &OCR0B #undef PB5 #define PB5_PIN PINB5 #define PB5_RPORT PINB #define PB5_WPORT PORTB #define PB5_DDR DDRB -#define PB5_PWM NULL +#define PB5_PWM nullptr #undef PB6 #define PB6_PIN PINB6 #define PB6_RPORT PINB #define PB6_WPORT PORTB #define PB6_DDR DDRB -#define PB6_PWM NULL +#define PB6_PWM nullptr #undef PB7 #define PB7_PIN PINB7 #define PB7_RPORT PINB #define PB7_WPORT PORTB #define PB7_DDR DDRB -#define PB7_PWM NULL +#define PB7_PWM nullptr #undef PC0 #define PC0_PIN PINC0 #define PC0_RPORT PINC #define PC0_WPORT PORTC #define PC0_DDR DDRC -#define PC0_PWM NULL +#define PC0_PWM nullptr #undef PC1 #define PC1_PIN PINC1 #define PC1_RPORT PINC #define PC1_WPORT PORTC #define PC1_DDR DDRC -#define PC1_PWM NULL +#define PC1_PWM nullptr #undef PC2 #define PC2_PIN PINC2 #define PC2_RPORT PINC #define PC2_WPORT PORTC #define PC2_DDR DDRC -#define PC2_PWM NULL +#define PC2_PWM nullptr #undef PC3 #define PC3_PIN PINC3 #define PC3_RPORT PINC #define PC3_WPORT PORTC #define PC3_DDR DDRC -#define PC3_PWM NULL +#define PC3_PWM nullptr #undef PC4 #define PC4_PIN PINC4 #define PC4_RPORT PINC #define PC4_WPORT PORTC #define PC4_DDR DDRC -#define PC4_PWM NULL +#define PC4_PWM nullptr #undef PC5 #define PC5_PIN PINC5 #define PC5_RPORT PINC #define PC5_WPORT PORTC #define PC5_DDR DDRC -#define PC5_PWM NULL +#define PC5_PWM nullptr #undef PC6 #define PC6_PIN PINC6 #define PC6_RPORT PINC #define PC6_WPORT PORTC #define PC6_DDR DDRC -#define PC6_PWM NULL +#define PC6_PWM nullptr #undef PC7 #define PC7_PIN PINC7 #define PC7_RPORT PINC #define PC7_WPORT PORTC #define PC7_DDR DDRC -#define PC7_PWM NULL +#define PC7_PWM nullptr #undef PD0 #define PD0_PIN PIND0 #define PD0_RPORT PIND #define PD0_WPORT PORTD #define PD0_DDR DDRD -#define PD0_PWM NULL +#define PD0_PWM nullptr #undef PD1 #define PD1_PIN PIND1 #define PD1_RPORT PIND #define PD1_WPORT PORTD #define PD1_DDR DDRD -#define PD1_PWM NULL +#define PD1_PWM nullptr #undef PD2 #define PD2_PIN PIND2 #define PD2_RPORT PIND #define PD2_WPORT PORTD #define PD2_DDR DDRD -#define PD2_PWM NULL +#define PD2_PWM nullptr #undef PD3 #define PD3_PIN PIND3 #define PD3_RPORT PIND #define PD3_WPORT PORTD #define PD3_DDR DDRD -#define PD3_PWM NULL +#define PD3_PWM nullptr #undef PD4 #define PD4_PIN PIND4 #define PD4_RPORT PIND #define PD4_WPORT PORTD #define PD4_DDR DDRD -#define PD4_PWM NULL +#define PD4_PWM nullptr #undef PD5 #define PD5_PIN PIND5 #define PD5_RPORT PIND #define PD5_WPORT PORTD #define PD5_DDR DDRD -#define PD5_PWM NULL +#define PD5_PWM nullptr #undef PD6 #define PD6_PIN PIND6 #define PD6_RPORT PIND #define PD6_WPORT PORTD #define PD6_DDR DDRD -#define PD6_PWM OCR2B +#define PD6_PWM &OCR2B #undef PD7 #define PD7_PIN PIND7 #define PD7_RPORT PIND #define PD7_WPORT PORTD #define PD7_DDR DDRD -#define PD7_PWM OCR2A +#define PD7_PWM &OCR2A diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h b/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h index 805c0daf73..f744c65132 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h @@ -45,325 +45,325 @@ #define DIO0_PIN PIND0 #define DIO0_RPORT PIND #define DIO0_WPORT PORTD -#define DIO0_PWM NULL +#define DIO0_PWM 0 #define DIO0_DDR DDRD #define DIO1_PIN PIND1 #define DIO1_RPORT PIND #define DIO1_WPORT PORTD -#define DIO1_PWM NULL +#define DIO1_PWM 0 #define DIO1_DDR DDRD #define DIO2_PIN PIND2 #define DIO2_RPORT PIND #define DIO2_WPORT PORTD -#define DIO2_PWM NULL +#define DIO2_PWM 0 #define DIO2_DDR DDRD #define DIO3_PIN PIND3 #define DIO3_RPORT PIND #define DIO3_WPORT PORTD -#define DIO3_PWM NULL +#define DIO3_PWM 0 #define DIO3_DDR DDRD #define DIO4_PIN PIND4 #define DIO4_RPORT PIND #define DIO4_WPORT PORTD -#define DIO4_PWM NULL +#define DIO4_PWM 0 #define DIO4_DDR DDRD #define DIO5_PIN PIND5 #define DIO5_RPORT PIND #define DIO5_WPORT PORTD -#define DIO5_PWM NULL +#define DIO5_PWM 0 #define DIO5_DDR DDRD #define DIO6_PIN PIND6 #define DIO6_RPORT PIND #define DIO6_WPORT PORTD -#define DIO6_PWM NULL +#define DIO6_PWM 0 #define DIO6_DDR DDRD #define DIO7_PIN PIND7 #define DIO7_RPORT PIND #define DIO7_WPORT PORTD -#define DIO7_PWM NULL +#define DIO7_PWM 0 #define DIO7_DDR DDRD #define DIO8_PIN PINE0 #define DIO8_RPORT PINE #define DIO8_WPORT PORTE -#define DIO8_PWM NULL +#define DIO8_PWM 0 #define DIO8_DDR DDRE #define DIO9_PIN PINE1 #define DIO9_RPORT PINE #define DIO9_WPORT PORTE -#define DIO9_PWM NULL +#define DIO9_PWM 0 #define DIO9_DDR DDRE #define DIO10_PIN PINC0 #define DIO10_RPORT PINC #define DIO10_WPORT PORTC -#define DIO10_PWM NULL +#define DIO10_PWM 0 #define DIO10_DDR DDRC #define DIO11_PIN PINC1 #define DIO11_RPORT PINC #define DIO11_WPORT PORTC -#define DIO11_PWM NULL +#define DIO11_PWM 0 #define DIO11_DDR DDRC #define DIO12_PIN PINC2 #define DIO12_RPORT PINC #define DIO12_WPORT PORTC -#define DIO12_PWM NULL +#define DIO12_PWM 0 #define DIO12_DDR DDRC #define DIO13_PIN PINC3 #define DIO13_RPORT PINC #define DIO13_WPORT PORTC -#define DIO13_PWM NULL +#define DIO13_PWM 0 #define DIO13_DDR DDRC #define DIO14_PIN PINC4 #define DIO14_RPORT PINC #define DIO14_WPORT PORTC -#define DIO14_PWM NULL +#define DIO14_PWM 0 // OC3C #define DIO14_DDR DDRC #define DIO15_PIN PINC5 #define DIO15_RPORT PINC #define DIO15_WPORT PORTC -#define DIO15_PWM NULL +#define DIO15_PWM 0 // OC3B #define DIO15_DDR DDRC #define DIO16_PIN PINC6 #define DIO16_RPORT PINC #define DIO16_WPORT PORTC -#define DIO16_PWM NULL +#define DIO16_PWM 0 // OC3A #define DIO16_DDR DDRC #define DIO17_PIN PINC7 #define DIO17_RPORT PINC #define DIO17_WPORT PORTC -#define DIO17_PWM NULL +#define DIO17_PWM 0 #define DIO17_DDR DDRC #define DIO18_PIN PINE6 #define DIO18_RPORT PINE #define DIO18_WPORT PORTE -#define DIO18_PWM NULL +#define DIO18_PWM 0 #define DIO18_DDR DDRE #define DIO19_PIN PINE7 #define DIO19_RPORT PINE #define DIO19_WPORT PORTE -#define DIO19_PWM NULL +#define DIO19_PWM 0 #define DIO19_DDR DDRE #define DIO20_PIN PINB0 #define DIO20_RPORT PINB #define DIO20_WPORT PORTB -#define DIO20_PWM NULL +#define DIO20_PWM 0 #define DIO20_DDR DDRB #define DIO21_PIN PINB1 #define DIO21_RPORT PINB #define DIO21_WPORT PORTB -#define DIO21_PWM NULL +#define DIO21_PWM 0 #define DIO21_DDR DDRB #define DIO22_PIN PINB2 #define DIO22_RPORT PINB #define DIO22_WPORT PORTB -#define DIO22_PWM NULL +#define DIO22_PWM 0 #define DIO22_DDR DDRB #define DIO23_PIN PINB3 #define DIO23_RPORT PINB #define DIO23_WPORT PORTB -#define DIO23_PWM NULL +#define DIO23_PWM 0 #define DIO23_DDR DDRB #define DIO24_PIN PINB4 #define DIO24_RPORT PINB #define DIO24_WPORT PORTB -#define DIO24_PWM NULL +#define DIO24_PWM 0 // OC2A #define DIO24_DDR DDRB #define DIO25_PIN PINB5 #define DIO25_RPORT PINB #define DIO25_WPORT PORTB -#define DIO25_PWM NULL +#define DIO25_PWM 0 // OC1A #define DIO25_DDR DDRB #define DIO26_PIN PINB6 #define DIO26_RPORT PINB #define DIO26_WPORT PORTB -#define DIO26_PWM NULL +#define DIO26_PWM 0 // OC1B #define DIO26_DDR DDRB #define DIO27_PIN PINB7 #define DIO27_RPORT PINB #define DIO27_WPORT PORTB -#define DIO27_PWM NULL +#define DIO27_PWM 0 // OC1C #define DIO27_DDR DDRB #define DIO28_PIN PINA0 #define DIO28_RPORT PINA #define DIO28_WPORT PORTA -#define DIO28_PWM NULL +#define DIO28_PWM 0 #define DIO28_DDR DDRA #define DIO29_PIN PINA1 #define DIO29_RPORT PINA #define DIO29_WPORT PORTA -#define DIO29_PWM NULL +#define DIO29_PWM 0 #define DIO29_DDR DDRA #define DIO30_PIN PINA2 #define DIO30_RPORT PINA #define DIO30_WPORT PORTA -#define DIO30_PWM NULL +#define DIO30_PWM 0 #define DIO30_DDR DDRA #define DIO31_PIN PINA3 #define DIO31_RPORT PINA #define DIO31_WPORT PORTA -#define DIO31_PWM NULL +#define DIO31_PWM 0 #define DIO31_DDR DDRA #define DIO32_PIN PINA4 #define DIO32_RPORT PINA #define DIO32_WPORT PORTA -#define DIO32_PWM NULL +#define DIO32_PWM 0 #define DIO32_DDR DDRA #define DIO33_PIN PINA5 #define DIO33_RPORT PINA #define DIO33_WPORT PORTA -#define DIO33_PWM NULL +#define DIO33_PWM 0 #define DIO33_DDR DDRA #define DIO34_PIN PINA6 #define DIO34_RPORT PINA #define DIO34_WPORT PORTA -#define DIO34_PWM NULL +#define DIO34_PWM 0 #define DIO34_DDR DDRA #define DIO35_PIN PINA7 #define DIO35_RPORT PINA #define DIO35_WPORT PORTA -#define DIO35_PWM NULL +#define DIO35_PWM 0 #define DIO35_DDR DDRA #define DIO36_PIN PINE4 #define DIO36_RPORT PINE #define DIO36_WPORT PORTE -#define DIO36_PWM NULL +#define DIO36_PWM 0 #define DIO36_DDR DDRE #define DIO37_PIN PINE5 #define DIO37_RPORT PINE #define DIO37_WPORT PORTE -#define DIO37_PWM NULL +#define DIO37_PWM 0 #define DIO37_DDR DDRE #define DIO38_PIN PINF0 #define DIO38_RPORT PINF #define DIO38_WPORT PORTF -#define DIO38_PWM NULL +#define DIO38_PWM 0 #define DIO38_DDR DDRF #define DIO39_PIN PINF1 #define DIO39_RPORT PINF #define DIO39_WPORT PORTF -#define DIO39_PWM NULL +#define DIO39_PWM 0 #define DIO39_DDR DDRF #define DIO40_PIN PINF2 #define DIO40_RPORT PINF #define DIO40_WPORT PORTF -#define DIO40_PWM NULL +#define DIO40_PWM 0 #define DIO40_DDR DDRF #define DIO41_PIN PINF3 #define DIO41_RPORT PINF #define DIO41_WPORT PORTF -#define DIO41_PWM NULL +#define DIO41_PWM 0 #define DIO41_DDR DDRF #define DIO42_PIN PINF4 #define DIO42_RPORT PINF #define DIO42_WPORT PORTF -#define DIO42_PWM NULL +#define DIO42_PWM 0 #define DIO42_DDR DDRF #define DIO43_PIN PINF5 #define DIO43_RPORT PINF #define DIO43_WPORT PORTF -#define DIO43_PWM NULL +#define DIO43_PWM 0 #define DIO43_DDR DDRF #define DIO44_PIN PINF6 #define DIO44_RPORT PINF #define DIO44_WPORT PORTF -#define DIO44_PWM NULL +#define DIO44_PWM 0 #define DIO44_DDR DDRF #define DIO45_PIN PINF7 #define DIO45_RPORT PINF #define DIO45_WPORT PORTF -#define DIO45_PWM NULL +#define DIO45_PWM 0 #define DIO45_DDR DDRF #define AIO0_PIN PINF0 #define AIO0_RPORT PINF #define AIO0_WPORT PORTF -#define AIO0_PWM NULL +#define AIO0_PWM 0 #define AIO0_DDR DDRF #define AIO1_PIN PINF1 #define AIO1_RPORT PINF #define AIO1_WPORT PORTF -#define AIO1_PWM NULL +#define AIO1_PWM 0 #define AIO1_DDR DDRF #define AIO2_PIN PINF2 #define AIO2_RPORT PINF #define AIO2_WPORT PORTF -#define AIO2_PWM NULL +#define AIO2_PWM 0 #define AIO2_DDR DDRF #define AIO3_PIN PINF3 #define AIO3_RPORT PINF #define AIO3_WPORT PORTF -#define AIO3_PWM NULL +#define AIO3_PWM 0 #define AIO3_DDR DDRF #define AIO4_PIN PINF4 #define AIO4_RPORT PINF #define AIO4_WPORT PORTF -#define AIO4_PWM NULL +#define AIO4_PWM 0 #define AIO4_DDR DDRF #define AIO5_PIN PINF5 #define AIO5_RPORT PINF #define AIO5_WPORT PORTF -#define AIO5_PWM NULL +#define AIO5_PWM 0 #define AIO5_DDR DDRF #define AIO6_PIN PINF6 #define AIO6_RPORT PINF #define AIO6_WPORT PORTF -#define AIO6_PWM NULL +#define AIO6_PWM 0 #define AIO6_DDR DDRF #define AIO7_PIN PINF7 #define AIO7_RPORT PINF #define AIO7_WPORT PORTF -#define AIO7_PWM NULL +#define AIO7_PWM 0 #define AIO7_DDR DDRF //-- Begin not supported by Teensyduino @@ -371,13 +371,13 @@ #define DIO46_PIN PINE2 #define DIO46_RPORT PINE #define DIO46_WPORT PORTE -#define DIO46_PWM NULL +#define DIO46_PWM 0 #define DIO46_DDR DDRE #define DIO47_PIN PINE3 #define DIO47_RPORT PINE #define DIO47_WPORT PORTE -#define DIO47_PWM NULL +#define DIO47_PWM 0 #define DIO47_DDR DDRE #define TEENSY_E2 46 @@ -389,300 +389,300 @@ #define PA0_PIN PINA0 #define PA0_RPORT PINA #define PA0_WPORT PORTA -#define PA0_PWM NULL +#define PA0_PWM 0 #define PA0_DDR DDRA #undef PA1 #define PA1_PIN PINA1 #define PA1_RPORT PINA #define PA1_WPORT PORTA -#define PA1_PWM NULL +#define PA1_PWM 0 #define PA1_DDR DDRA #undef PA2 #define PA2_PIN PINA2 #define PA2_RPORT PINA #define PA2_WPORT PORTA -#define PA2_PWM NULL +#define PA2_PWM 0 #define PA2_DDR DDRA #undef PA3 #define PA3_PIN PINA3 #define PA3_RPORT PINA #define PA3_WPORT PORTA -#define PA3_PWM NULL +#define PA3_PWM 0 #define PA3_DDR DDRA #undef PA4 #define PA4_PIN PINA4 #define PA4_RPORT PINA #define PA4_WPORT PORTA -#define PA4_PWM NULL +#define PA4_PWM 0 #define PA4_DDR DDRA #undef PA5 #define PA5_PIN PINA5 #define PA5_RPORT PINA #define PA5_WPORT PORTA -#define PA5_PWM NULL +#define PA5_PWM 0 #define PA5_DDR DDRA #undef PA6 #define PA6_PIN PINA6 #define PA6_RPORT PINA #define PA6_WPORT PORTA -#define PA6_PWM NULL +#define PA6_PWM 0 #define PA6_DDR DDRA #undef PA7 #define PA7_PIN PINA7 #define PA7_RPORT PINA #define PA7_WPORT PORTA -#define PA7_PWM NULL +#define PA7_PWM 0 #define PA7_DDR DDRA #undef PB0 #define PB0_PIN PINB0 #define PB0_RPORT PINB #define PB0_WPORT PORTB -#define PB0_PWM NULL +#define PB0_PWM 0 #define PB0_DDR DDRB #undef PB1 #define PB1_PIN PINB1 #define PB1_RPORT PINB #define PB1_WPORT PORTB -#define PB1_PWM NULL +#define PB1_PWM 0 #define PB1_DDR DDRB #undef PB2 #define PB2_PIN PINB2 #define PB2_RPORT PINB #define PB2_WPORT PORTB -#define PB2_PWM NULL +#define PB2_PWM 0 #define PB2_DDR DDRB #undef PB3 #define PB3_PIN PINB3 #define PB3_RPORT PINB #define PB3_WPORT PORTB -#define PB3_PWM NULL +#define PB3_PWM 0 #define PB3_DDR DDRB #undef PB4 #define PB4_PIN PINB4 #define PB4_RPORT PINB #define PB4_WPORT PORTB -#define PB4_PWM NULL +#define PB4_PWM 0 #define PB4_DDR DDRB #undef PB5 #define PB5_PIN PINB5 #define PB5_RPORT PINB #define PB5_WPORT PORTB -#define PB5_PWM NULL +#define PB5_PWM 0 #define PB5_DDR DDRB #undef PB6 #define PB6_PIN PINB6 #define PB6_RPORT PINB #define PB6_WPORT PORTB -#define PB6_PWM NULL +#define PB6_PWM 0 #define PB6_DDR DDRB #undef PB7 #define PB7_PIN PINB7 #define PB7_RPORT PINB #define PB7_WPORT PORTB -#define PB7_PWM NULL +#define PB7_PWM 0 #define PB7_DDR DDRB #undef PC0 #define PC0_PIN PINC0 #define PC0_RPORT PINC #define PC0_WPORT PORTC -#define PC0_PWM NULL +#define PC0_PWM 0 #define PC0_DDR DDRC #undef PC1 #define PC1_PIN PINC1 #define PC1_RPORT PINC #define PC1_WPORT PORTC -#define PC1_PWM NULL +#define PC1_PWM 0 #define PC1_DDR DDRC #undef PC2 #define PC2_PIN PINC2 #define PC2_RPORT PINC #define PC2_WPORT PORTC -#define PC2_PWM NULL +#define PC2_PWM 0 #define PC2_DDR DDRC #undef PC3 #define PC3_PIN PINC3 #define PC3_RPORT PINC #define PC3_WPORT PORTC -#define PC3_PWM NULL +#define PC3_PWM 0 #define PC3_DDR DDRC #undef PC4 #define PC4_PIN PINC4 #define PC4_RPORT PINC #define PC4_WPORT PORTC -#define PC4_PWM NULL +#define PC4_PWM 0 #define PC4_DDR DDRC #undef PC5 #define PC5_PIN PINC5 #define PC5_RPORT PINC #define PC5_WPORT PORTC -#define PC5_PWM NULL +#define PC5_PWM 0 #define PC5_DDR DDRC #undef PC6 #define PC6_PIN PINC6 #define PC6_RPORT PINC #define PC6_WPORT PORTC -#define PC6_PWM NULL +#define PC6_PWM 0 #define PC6_DDR DDRC #undef PC7 #define PC7_PIN PINC7 #define PC7_RPORT PINC #define PC7_WPORT PORTC -#define PC7_PWM NULL +#define PC7_PWM 0 #define PC7_DDR DDRC #undef PD0 #define PD0_PIN PIND0 #define PD0_RPORT PIND #define PD0_WPORT PORTD -#define PD0_PWM NULL +#define PD0_PWM 0 // OC0B #define PD0_DDR DDRD #undef PD1 #define PD1_PIN PIND1 #define PD1_RPORT PIND #define PD1_WPORT PORTD -#define PD1_PWM NULL +#define PD1_PWM 0 // OC2B #define PD1_DDR DDRD #undef PD2 #define PD2_PIN PIND2 #define PD2_RPORT PIND #define PD2_WPORT PORTD -#define PD2_PWM NULL +#define PD2_PWM 0 #define PD2_DDR DDRD #undef PD3 #define PD3_PIN PIND3 #define PD3_RPORT PIND #define PD3_WPORT PORTD -#define PD3_PWM NULL +#define PD3_PWM 0 #define PD3_DDR DDRD #undef PD4 #define PD4_PIN PIND4 #define PD4_RPORT PIND #define PD4_WPORT PORTD -#define PD4_PWM NULL +#define PD4_PWM 0 #define PD4_DDR DDRD #undef PD5 #define PD5_PIN PIND5 #define PD5_RPORT PIND #define PD5_WPORT PORTD -#define PD5_PWM NULL +#define PD5_PWM 0 #define PD5_DDR DDRD #undef PD6 #define PD6_PIN PIND6 #define PD6_RPORT PIND #define PD6_WPORT PORTD -#define PD6_PWM NULL +#define PD6_PWM 0 #define PD6_DDR DDRD #undef PD7 #define PD7_PIN PIND7 #define PD7_RPORT PIND #define PD7_WPORT PORTD -#define PD7_PWM NULL +#define PD7_PWM 0 #define PD7_DDR DDRD #undef PE0 #define PE0_PIN PINE0 #define PE0_RPORT PINE #define PE0_WPORT PORTE -#define PE0_PWM NULL +#define PE0_PWM 0 #define PE0_DDR DDRE #undef PE1 #define PE1_PIN PINE1 #define PE1_RPORT PINE #define PE1_WPORT PORTE -#define PE1_PWM NULL +#define PE1_PWM 0 #define PE1_DDR DDRE #undef PE2 #define PE2_PIN PINE2 #define PE2_RPORT PINE #define PE2_WPORT PORTE -#define PE2_PWM NULL +#define PE2_PWM 0 #define PE2_DDR DDRE #undef PE3 #define PE3_PIN PINE3 #define PE3_RPORT PINE #define PE3_WPORT PORTE -#define PE3_PWM NULL +#define PE3_PWM 0 #define PE3_DDR DDRE #undef PE4 #define PE4_PIN PINE4 #define PE4_RPORT PINE #define PE4_WPORT PORTE -#define PE4_PWM NULL +#define PE4_PWM 0 #define PE4_DDR DDRE #undef PE5 #define PE5_PIN PINE5 #define PE5_RPORT PINE #define PE5_WPORT PORTE -#define PE5_PWM NULL +#define PE5_PWM 0 #define PE5_DDR DDRE #undef PE6 #define PE6_PIN PINE6 #define PE6_RPORT PINE #define PE6_WPORT PORTE -#define PE6_PWM NULL +#define PE6_PWM 0 #define PE6_DDR DDRE #undef PE7 #define PE7_PIN PINE7 #define PE7_RPORT PINE #define PE7_WPORT PORTE -#define PE7_PWM NULL +#define PE7_PWM 0 #define PE7_DDR DDRE #undef PF0 #define PF0_PIN PINF0 #define PF0_RPORT PINF #define PF0_WPORT PORTF -#define PF0_PWM NULL +#define PF0_PWM 0 #define PF0_DDR DDRF #undef PF1 #define PF1_PIN PINF1 #define PF1_RPORT PINF #define PF1_WPORT PORTF -#define PF1_PWM NULL +#define PF1_PWM 0 #define PF1_DDR DDRF #undef PF2 #define PF2_PIN PINF2 #define PF2_RPORT PINF #define PF2_WPORT PORTF -#define PF2_PWM NULL +#define PF2_PWM 0 #define PF2_DDR DDRF #undef PF3 #define PF3_PIN PINF3 #define PF3_RPORT PINF #define PF3_WPORT PORTF -#define PF3_PWM NULL +#define PF3_PWM 0 #define PF3_DDR DDRF #undef PF4 #define PF4_PIN PINF4 #define PF4_RPORT PINF #define PF4_WPORT PORTF -#define PF4_PWM NULL +#define PF4_PWM 0 #define PF4_DDR DDRF #undef PF5 #define PF5_PIN PINF5 #define PF5_RPORT PINF #define PF5_WPORT PORTF -#define PF5_PWM NULL +#define PF5_PWM 0 #define PF5_DDR DDRF #undef PF6 #define PF6_PIN PINF6 #define PF6_RPORT PINF #define PF6_WPORT PORTF -#define PF6_PWM NULL +#define PF6_PWM 0 #define PF6_DDR DDRF #undef PF7 #define PF7_PIN PINF7 #define PF7_RPORT PINF #define PF7_WPORT PORTF -#define PF7_PWM NULL +#define PF7_PWM 0 #define PF7_DDR DDRF /** - * some of the pin mapping functions of the Teensduino extension to the Arduino IDE - * do not function the same as the other Arduino extensions + * Some of the pin mapping functions of the Teensduino extension to the Arduino IDE + * do not function the same as the other Arduino extensions. */ //digitalPinToTimer(pin) function works like Arduino but Timers are not defined diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AVR.cpp b/Marlin/src/HAL/HAL_AVR/fastio_AVR.cpp index 63fbe4d969..c58f9da41d 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_AVR.cpp +++ b/Marlin/src/HAL/HAL_AVR/fastio_AVR.cpp @@ -30,7 +30,7 @@ #ifdef FASTIO_EXT_START -#include +#include "../shared/Marduino.h" #define _IS_EXT(P) WITHIN(P, FASTIO_EXT_START, FASTIO_EXT_END) diff --git a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h index a843f1ae75..8c1850e8a4 100644 --- a/Marlin/src/HAL/HAL_AVR/fastio_AVR.h +++ b/Marlin/src/HAL/HAL_AVR/fastio_AVR.h @@ -83,7 +83,7 @@ #define _IS_INPUT(IO) !TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN) #define _IS_OUTPUT(IO) TEST(DIO ## IO ## _DDR, DIO ## IO ## _PIN) -#define _HAS_TIMER(IO) DIO ## IO ## _PWM +#define _HAS_TIMER(IO) bool(DIO ## IO ## _PWM) // digitalRead/Write wrappers #ifdef FASTIO_EXT_START diff --git a/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp b/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp index e3d2194bf7..7e8357ed57 100644 --- a/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp +++ b/Marlin/src/HAL/HAL_AVR/servo_AVR.cpp @@ -58,8 +58,8 @@ #if HAS_SERVOS #include -#include +#include "../shared/Marduino.h" #include "../shared/servo.h" #include "../shared/servo_private.h" diff --git a/Marlin/src/HAL/HAL_AVR/u8g_com_HAL_AVR_sw_spi.cpp b/Marlin/src/HAL/HAL_AVR/u8g_com_HAL_AVR_sw_spi.cpp new file mode 100644 index 0000000000..426e1c942c --- /dev/null +++ b/Marlin/src/HAL/HAL_AVR/u8g_com_HAL_AVR_sw_spi.cpp @@ -0,0 +1,193 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on u8g_com_st7920_hw_spi.c + * + * Universal 8bit Graphics Library + * + * Copyright (c) 2011, olikraus@gmail.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#if defined(ARDUINO) && !defined(ARDUINO_ARCH_STM32) && !defined(ARDUINO_ARCH_SAM) + +#include "../../inc/MarlinConfigPre.h" + +#if HAS_GRAPHICAL_LCD + +#include "../shared/Marduino.h" +#include "../shared/Delay.h" + +#include + +uint8_t u8g_bitData, u8g_bitNotData, u8g_bitClock, u8g_bitNotClock; +volatile uint8_t *u8g_outData, *u8g_outClock; + +static void u8g_com_arduino_init_shift_out(uint8_t dataPin, uint8_t clockPin) { + u8g_outData = portOutputRegister(digitalPinToPort(dataPin)); + u8g_outClock = portOutputRegister(digitalPinToPort(clockPin)); + u8g_bitData = digitalPinToBitMask(dataPin); + u8g_bitClock = digitalPinToBitMask(clockPin); + + u8g_bitNotClock = u8g_bitClock; + u8g_bitNotClock ^= 0xFF; + + u8g_bitNotData = u8g_bitData; + u8g_bitNotData ^= 0xFF; +} + +void u8g_spiSend_sw_AVR_mode_0(uint8_t val) { + uint8_t bitData = u8g_bitData, + bitNotData = u8g_bitNotData, + bitClock = u8g_bitClock, + bitNotClock = u8g_bitNotClock; + volatile uint8_t *outData = u8g_outData, + *outClock = u8g_outClock; + U8G_ATOMIC_START(); + for (uint8_t i = 0; i < 8; i++) { + if (val & 0x80) + *outData |= bitData; + else + *outData &= bitNotData; + *outClock |= bitClock; + val <<= 1; + *outClock &= bitNotClock; + } + U8G_ATOMIC_END(); +} + +void u8g_spiSend_sw_AVR_mode_3(uint8_t val) { + uint8_t bitData = u8g_bitData, + bitNotData = u8g_bitNotData, + bitClock = u8g_bitClock, + bitNotClock = u8g_bitNotClock; + volatile uint8_t *outData = u8g_outData, + *outClock = u8g_outClock; + U8G_ATOMIC_START(); + for (uint8_t i = 0; i < 8; i++) { + *outClock &= bitNotClock; + if (val & 0x80) + *outData |= bitData; + else + *outData &= bitNotData; + *outClock |= bitClock; + val <<= 1; + } + U8G_ATOMIC_END(); +} + + +#if ENABLED(FYSETC_MINI_12864) + #define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3 +#else + #define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0 +#endif + +uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { + switch (msg) { + case U8G_COM_MSG_INIT: + u8g_com_arduino_init_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK]); + u8g_com_arduino_assign_pin_output_high(u8g); + u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 0); + u8g_com_arduino_digital_write(u8g, U8G_PI_MOSI, 0); + break; + + case U8G_COM_MSG_STOP: + break; + + case U8G_COM_MSG_RESET: + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_com_arduino_digital_write(u8g, U8G_PI_RESET, arg_val); + break; + + case U8G_COM_MSG_CHIP_SELECT: + #if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 + if (arg_val) { // SCK idle state needs to be set to the proper idle state before + // the next chip select goes active + u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active + u8g_com_arduino_digital_write(u8g, U8G_PI_CS, LOW); + } + else { + u8g_com_arduino_digital_write(u8g, U8G_PI_CS, HIGH); + u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive + } + #else + u8g_com_arduino_digital_write(u8g, U8G_PI_CS, !arg_val); + #endif + break; + + case U8G_COM_MSG_WRITE_BYTE: + SPISEND_SW_AVR(arg_val); + break; + + case U8G_COM_MSG_WRITE_SEQ: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + SPISEND_SW_AVR(*ptr++); + arg_val--; + } + } + break; + + case U8G_COM_MSG_WRITE_SEQ_P: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + SPISEND_SW_AVR(u8g_pgm_read(ptr)); + ptr++; + arg_val--; + } + } + break; + + case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ + u8g_com_arduino_digital_write(u8g, U8G_PI_A0, arg_val); + break; + } + return 1; +} + +#endif // HAS_GRAPHICAL_LCD +#endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp index 7c65a904f4..0d3cc81886 100644 --- a/Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp +++ b/Marlin/src/HAL/HAL_AVR/watchdog_AVR.cpp @@ -38,7 +38,7 @@ void watchdog_init() { #define WDTO_NS WDTO_4S #endif #if ENABLED(WATCHDOG_RESET_MANUAL) - // We enable the watchdog timer, but only for the interrupt. + // Enable the watchdog timer, but only for the interrupt. // Take care, as this requires the correct order of operation, with interrupts disabled. // See the datasheet of any AVR chip for details. wdt_reset(); @@ -65,7 +65,7 @@ void watchdog_init() { SERIAL_ERROR_MSG(MSG_WATCHDOG_FIRED); minkill(); // interrupt-safe final kill and infinite loop } -#endif // WATCHDOG_RESET_MANUAL +#endif #endif // USE_WATCHDOG #endif // __AVR__ diff --git a/Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp b/Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp index 21f1a8c9d4..07f746a17d 100644 --- a/Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp +++ b/Marlin/src/HAL/HAL_DUE/EepromEmulation_Due.cpp @@ -36,7 +36,7 @@ #if ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM, SPI_EEPROM) -#include +#include "../shared/Marduino.h" #define EEPROMSize 4096 #define PagesPerGroup 128 diff --git a/Marlin/src/HAL/HAL_DUE/G2_pins.h b/Marlin/src/HAL/HAL_DUE/G2_pins.h index a7f432846e..49849a67d5 100644 --- a/Marlin/src/HAL/HAL_DUE/G2_pins.h +++ b/Marlin/src/HAL/HAL_DUE/G2_pins.h @@ -248,7 +248,7 @@ const G2_PinDescription G2_g_APinDescription[] = { { PIOB, PIO_PB15A_CANRX1|PIO_PB14A_CANTX1, ID_PIOB, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // END - { NULL, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER } + { nullptr, 0, 0, PIO_NOT_A_PIN, PIO_DEFAULT, 0, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER } }; // This section replaces the FASTIO definitions of pins 34-41 diff --git a/Marlin/src/HAL/HAL_DUE/HAL.h b/Marlin/src/HAL/HAL_DUE/HAL.h index d430e6b649..2fd9a0b0dd 100644 --- a/Marlin/src/HAL/HAL_DUE/HAL.h +++ b/Marlin/src/HAL/HAL_DUE/HAL.h @@ -29,16 +29,15 @@ #define CPU_32_BIT -#include - -#include - +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" #include "fastio_Due.h" #include "watchdog_Due.h" #include "HAL_timers_Due.h" +#include + // Serial ports #if !WITHIN(SERIAL_PORT, -1, 3) #error "SERIAL_PORT must be from -1 to 3" diff --git a/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp b/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp index 446eb2884d..6fbeb3a1f8 100644 --- a/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp +++ b/Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.cpp @@ -41,7 +41,7 @@ practice, we need alignment to 256 bytes to make this work in all cases */ __attribute__ ((aligned(256))) -static DeviceVectors ram_tab = { NULL }; +static DeviceVectors ram_tab = { nullptr }; /** * This function checks if the exception/interrupt table is already in SRAM or not. diff --git a/Marlin/src/HAL/HAL_DUE/Servo_Due.cpp b/Marlin/src/HAL/HAL_DUE/Servo_Due.cpp index 848d263b70..d9e41f9541 100644 --- a/Marlin/src/HAL/HAL_DUE/Servo_Due.cpp +++ b/Marlin/src/HAL/HAL_DUE/Servo_Due.cpp @@ -44,7 +44,7 @@ #if HAS_SERVOS -#include +#include "../shared/Marduino.h" #include "../shared/servo.h" #include "../shared/servo_private.h" diff --git a/Marlin/src/HAL/HAL_DUE/pinsDebug.h b/Marlin/src/HAL/HAL_DUE/pinsDebug.h index 9d86577052..9b6cbe1cc4 100644 --- a/Marlin/src/HAL/HAL_DUE/pinsDebug.h +++ b/Marlin/src/HAL/HAL_DUE/pinsDebug.h @@ -28,7 +28,7 @@ * Translation of routines & variables used by pinsDebug.h */ -#include +#include "../shared/Marduino.h" /** * Due/Marlin quirks diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp index ba7700150f..9e92519ef6 100644 --- a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp +++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_shared_hw_spi.cpp @@ -66,20 +66,20 @@ #include "../../Marlin.h" -#define SPI_FULL_SPEED 0 -#define SPI_HALF_SPEED 1 -#define SPI_QUARTER_SPEED 2 -#define SPI_EIGHTH_SPEED 3 +#define SPI_FULL_SPEED 0 +#define SPI_HALF_SPEED 1 +#define SPI_QUARTER_SPEED 2 +#define SPI_EIGHTH_SPEED 3 #define SPI_SIXTEENTH_SPEED 4 -#define SPI_SPEED_5 5 -#define SPI_SPEED_6 6 +#define SPI_SPEED_5 5 +#define SPI_SPEED_6 6 void spiBegin(); void spiInit(uint8_t spiRate); void spiSend(uint8_t b); void spiSend(const uint8_t* buf, size_t n); -#include +#include "../shared/Marduino.h" #include "fastio_Due.h" void u8g_SetPIOutput_DUE_hw_spi(u8g_t *u8g, uint8_t pin_index) { diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp index 3cef880bca..45cb08ce32 100644 --- a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_st7920_sw_spi.cpp @@ -57,50 +57,26 @@ #include "../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_LCD +#if ENABLED(U8GLIB_ST7920) + +#include "u8g_com_HAL_DUE_sw_spi_shared.h" -#include -#include #include "../shared/Delay.h" -void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index) { - PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1, - g_APinDescription[u8g->pin_list[pin_index]].ulPin, g_APinDescription[u8g->pin_list[pin_index]].ulPinConfiguration); // OUTPUT -} +#include -void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level) { - volatile Pio* port = g_APinDescription[u8g->pin_list[pin_index]].pPort; - uint32_t mask = g_APinDescription[u8g->pin_list[pin_index]].ulPin; - if (level) port->PIO_SODR = mask; else port->PIO_CODR = mask; -} - -Pio *SCK_pPio, *MOSI_pPio; -uint32_t SCK_dwMask, MOSI_dwMask; - -static void spiSend_sw_DUE(uint8_t val) { // 800KHz - for (uint8_t i = 0; i < 8; i++) { - if (val & 0x80) - MOSI_pPio->PIO_SODR = MOSI_dwMask; - else - MOSI_pPio->PIO_CODR = MOSI_dwMask; - DELAY_NS(48); - SCK_pPio->PIO_SODR = SCK_dwMask; - DELAY_NS(905); // 762 dead, 810 garbage, 858/0 900kHz, 905/1 825k, 953/1 800k, 1000/2 725KHz - val <<= 1; - SCK_pPio->PIO_CODR = SCK_dwMask; - } -} +#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0 static uint8_t rs_last_state = 255; static void u8g_com_DUE_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) { if (rs != rs_last_state) { // time to send a command/data byte rs_last_state = rs; - spiSend_sw_DUE(rs ? 0x0FA : 0x0F8); // Command or Data + SPISEND_SW_DUE(rs ? 0x0FA : 0x0F8); // Command or Data DELAY_US(40); // give the controller some time to process the data: 20 is bad, 30 is OK, 40 is safe } - spiSend_sw_DUE(val & 0xF0); - spiSend_sw_DUE(val << 4); + SPISEND_SW_DUE(val & 0xF0); + SPISEND_SW_DUE(val << 4); } uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { @@ -123,7 +99,7 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va u8g_Delay(5); - u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: command mode */ + u8g->pin_list[U8G_PI_A0_STATE] = 0; /* initial RS state: command mode */ break; case U8G_COM_MSG_STOP: @@ -190,20 +166,20 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va } void ST7920_set_cmd() { - spiSend_sw_DUE(0xF8); + SPISEND_SW_DUE(0xF8); DELAY_US(40); } void ST7920_set_dat() { - spiSend_sw_DUE(0xFA); + SPISEND_SW_DUE(0xFA); DELAY_US(40); } void ST7920_write_byte(const uint8_t val) { - spiSend_sw_DUE(val & 0xF0); - spiSend_sw_DUE(val << 4); + SPISEND_SW_DUE(val & 0xF0); + SPISEND_SW_DUE(val << 4); } #endif // LIGHTWEIGHT_UI -#endif // HAS_GRAPHICAL_LCD +#endif // U8GLIB_ST7920 #endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi.cpp new file mode 100644 index 0000000000..802e11757f --- /dev/null +++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi.cpp @@ -0,0 +1,148 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on u8g_com_std_sw_spi.c + * + * Universal 8bit Graphics Library + * + * Copyright (c) 2015, olikraus@gmail.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef ARDUINO_ARCH_SAM + +#include "../../inc/MarlinConfigPre.h" + +#if HAS_GRAPHICAL_LCD && !ENABLED(U8GLIB_ST7920) + +#undef SPI_SPEED +#define SPI_SPEED 2 // About 2 MHz + +#include "u8g_com_HAL_DUE_sw_spi_shared.h" + +#include "../shared/Marduino.h" +#include "../shared/Delay.h" + +#include + +#if ENABLED(FYSETC_MINI_12864) + #define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3 +#else + #define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0 +#endif + +uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { + switch (msg) { + case U8G_COM_MSG_INIT: + SCK_pPio = g_APinDescription[u8g->pin_list[U8G_PI_SCK]].pPort; + SCK_dwMask = g_APinDescription[u8g->pin_list[U8G_PI_SCK]].ulPin; + MOSI_pPio = g_APinDescription[u8g->pin_list[U8G_PI_MOSI]].pPort; + MOSI_dwMask = g_APinDescription[u8g->pin_list[U8G_PI_MOSI]].ulPin; + u8g_SetPIOutput_DUE(u8g, U8G_PI_SCK); + u8g_SetPIOutput_DUE(u8g, U8G_PI_MOSI); + u8g_SetPIOutput_DUE(u8g, U8G_PI_CS); + u8g_SetPIOutput_DUE(u8g, U8G_PI_A0); + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPIOutput_DUE(u8g, U8G_PI_RESET); + u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); + u8g_SetPILevel_DUE(u8g, U8G_PI_MOSI, 0); + break; + + case U8G_COM_MSG_STOP: + break; + + case U8G_COM_MSG_RESET: + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel_DUE(u8g, U8G_PI_RESET, arg_val); + break; + + case U8G_COM_MSG_CHIP_SELECT: + #if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 + if (arg_val) { // SCK idle state needs to be set to the proper idle state before + // the next chip select goes active + u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); //set SCK to mode 3 idle state before CS goes active + u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW); + } + else { + u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH); + u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); //set SCK to mode 0 idle state after CS goes inactive + } + #else + u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val); + #endif + break; + + case U8G_COM_MSG_WRITE_BYTE: + SPISEND_SW_DUE(arg_val); + break; + + case U8G_COM_MSG_WRITE_SEQ: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + SPISEND_SW_DUE(*ptr++); + arg_val--; + } + } + break; + + case U8G_COM_MSG_WRITE_SEQ_P: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + SPISEND_SW_DUE(u8g_pgm_read(ptr)); + ptr++; + arg_val--; + } + } + break; + + case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ + u8g_SetPILevel_DUE(u8g, U8G_PI_A0, arg_val); + break; + } + return 1; +} + +#endif // HAS_GRAPHICAL_LCD +#endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.cpp b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.cpp new file mode 100644 index 0000000000..cbd08c7499 --- /dev/null +++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.cpp @@ -0,0 +1,112 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on u8g_com_st7920_hw_spi.c + * + * Universal 8bit Graphics Library + * + * Copyright (c) 2011, olikraus@gmail.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef ARDUINO_ARCH_SAM + +#include "../../inc/MarlinConfigPre.h" + +#if HAS_GRAPHICAL_LCD + +#include "u8g_com_HAL_DUE_sw_spi_shared.h" + +#include "../shared/Delay.h" + +#include + +void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index) { + PIO_Configure(g_APinDescription[u8g->pin_list[pin_index]].pPort, PIO_OUTPUT_1, + g_APinDescription[u8g->pin_list[pin_index]].ulPin, g_APinDescription[u8g->pin_list[pin_index]].ulPinConfiguration); // OUTPUT +} + +void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level) { + volatile Pio* port = g_APinDescription[u8g->pin_list[pin_index]].pPort; + uint32_t mask = g_APinDescription[u8g->pin_list[pin_index]].ulPin; + if (level) port->PIO_SODR = mask; else port->PIO_CODR = mask; +} + +Pio *SCK_pPio, *MOSI_pPio; +uint32_t SCK_dwMask, MOSI_dwMask; + +void u8g_spiSend_sw_DUE_mode_0(uint8_t val) { // 3MHz + for (uint8_t i = 0; i < 8; i++) { + if (val & 0x80) + MOSI_pPio->PIO_SODR = MOSI_dwMask; + else + MOSI_pPio->PIO_CODR = MOSI_dwMask; + DELAY_NS(48); + SCK_pPio->PIO_SODR = SCK_dwMask; + DELAY_NS(125); + val <<= 1; + SCK_pPio->PIO_CODR = SCK_dwMask; + } +} + +void u8g_spiSend_sw_DUE_mode_3(uint8_t val) { // 3.5MHz + for (uint8_t i = 0; i < 8; i++) { + SCK_pPio->PIO_CODR = SCK_dwMask; + DELAY_NS(50); + if (val & 0x80) + MOSI_pPio->PIO_SODR = MOSI_dwMask; + else + MOSI_pPio->PIO_CODR = MOSI_dwMask; + val <<= 1; + DELAY_NS(10); + SCK_pPio->PIO_SODR = SCK_dwMask; + DELAY_NS(70); + } +} + +#endif // HAS_GRAPHICAL_LCD +#endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.h b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.h new file mode 100644 index 0000000000..aa75cf9fa1 --- /dev/null +++ b/Marlin/src/HAL/HAL_DUE/u8g_com_HAL_DUE_sw_spi_shared.h @@ -0,0 +1,34 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../inc/MarlinConfigPre.h" +#include "../shared/Marduino.h" + +void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index); +void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level); + +void u8g_spiSend_sw_DUE_mode_0(uint8_t val); +void u8g_spiSend_sw_DUE_mode_3(uint8_t val); + +extern Pio *SCK_pPio, *MOSI_pPio; +extern uint32_t SCK_dwMask, MOSI_dwMask; diff --git a/Marlin/src/HAL/HAL_ESP32/HAL.h b/Marlin/src/HAL/HAL_ESP32/HAL.h index 16859263b2..556a484677 100644 --- a/Marlin/src/HAL/HAL_ESP32/HAL.h +++ b/Marlin/src/HAL/HAL_ESP32/HAL.h @@ -30,19 +30,7 @@ #include -// these are going to be re-defined in Arduino.h -#undef DISABLED -#undef M_PI -#undef _BV - -#include - -// revert back to the correct (old) definition -#undef DISABLED -#define DISABLED(V...) DO(DIS,&&,V) -// re-define in case Arduino.h has been skipped due to earlier inclusion (i.e. in Marlin\src\HAL\HAL_ESP32\i2s.cpp) -#define _BV(b) (1UL << (b)) - +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" diff --git a/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp index 39ca18fcea..1568cc5081 100644 --- a/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp +++ b/Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.cpp @@ -64,8 +64,8 @@ static timg_dev_t *TG[2] = {&TIMERG0, &TIMERG1}; const tTimerConfig TimerConfig [NUM_HARDWARE_TIMERS] = { { TIMER_GROUP_0, TIMER_0, STEPPER_TIMER_PRESCALE, stepTC_Handler }, // 0 - Stepper { TIMER_GROUP_0, TIMER_1, TEMP_TIMER_PRESCALE, tempTC_Handler }, // 1 - Temperature - { TIMER_GROUP_1, TIMER_0, 1, NULL }, // 2 - { TIMER_GROUP_1, TIMER_1, 1, NULL }, // 3 + { TIMER_GROUP_1, TIMER_0, 1, nullptr }, // 2 + { TIMER_GROUP_1, TIMER_1, 1, nullptr }, // 3 }; // -------------------------------------------------------------------------- @@ -132,7 +132,7 @@ void HAL_timer_start(const uint8_t timer_num, uint32_t frequency) { timer_enable_intr(timer.group, timer.idx); // TODO need to deal with timer_group1_isr - timer_isr_register(timer.group, timer.idx, timer_group0_isr, (void*)timer.idx, NULL, NULL); + timer_isr_register(timer.group, timer.idx, timer_group0_isr, (void*)timer.idx, ESP_INTR_FLAG_INTRDISABLED, nullptr); timer_start(timer.group, timer.idx); } diff --git a/Marlin/src/HAL/HAL_ESP32/i2s.cpp b/Marlin/src/HAL/HAL_ESP32/i2s.cpp index 0345889e07..87c3959e7c 100644 --- a/Marlin/src/HAL/HAL_ESP32/i2s.cpp +++ b/Marlin/src/HAL/HAL_ESP32/i2s.cpp @@ -21,13 +21,9 @@ */ #ifdef ARDUINO_ARCH_ESP32 -// replace that with the proper imports, then cleanup workarounds in Marlin\src\HAL\HAL_ESP32\HAL.h -#include -// revert back to the correct definition -#undef DISABLED -#define DISABLED(V...) DO(DIS,&&,V) - #include "i2s.h" + +#include "../shared/Marduino.h" #include "../../core/macros.h" #include "driver/periph_ctrl.h" #include "rom/lldesc.h" @@ -187,22 +183,22 @@ int i2s_init() { // Allocate the array of pointers to the buffers dma.buffers = (uint32_t **)malloc(sizeof(uint32_t*) * DMA_BUF_COUNT); - if (dma.buffers == NULL) return -1; + if (dma.buffers == nullptr) return -1; // Allocate each buffer that can be used by the DMA controller for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) { dma.buffers[buf_idx] = (uint32_t*) heap_caps_calloc(1, DMA_BUF_LEN, MALLOC_CAP_DMA); - if (dma.buffers[buf_idx] == NULL) return -1; + if (dma.buffers[buf_idx] == nullptr) return -1; } // Allocate the array of DMA descriptors dma.desc = (lldesc_t**) malloc(sizeof(lldesc_t*) * DMA_BUF_COUNT); - if (dma.desc == NULL) return -1; + if (dma.desc == nullptr) return -1; // Allocate each DMA descriptor that will be used by the DMA controller for (int buf_idx = 0; buf_idx < DMA_BUF_COUNT; buf_idx++) { dma.desc[buf_idx] = (lldesc_t*) heap_caps_malloc(sizeof(lldesc_t), MALLOC_CAP_DMA); - if (dma.desc[buf_idx] == NULL) return -1; + if (dma.desc[buf_idx] == nullptr) return -1; } // Initialize @@ -301,11 +297,11 @@ int i2s_init() { // Allocate and Enable the I2S interrupt intr_handle_t i2s_isr_handle; - esp_intr_alloc(ETS_I2S0_INTR_SOURCE, 0, i2s_intr_handler_default, NULL, &i2s_isr_handle); + esp_intr_alloc(ETS_I2S0_INTR_SOURCE, 0, i2s_intr_handler_default, nullptr, &i2s_isr_handle); esp_intr_enable(i2s_isr_handle); // Create the task that will feed the buffer - xTaskCreate(stepperTask, "StepperTask", 10000, NULL, 1, NULL); + xTaskCreate(stepperTask, "StepperTask", 10000, nullptr, 1, nullptr); // Route the i2s pins to the appropriate GPIO gpio_matrix_out_check(I2S_DATA, I2S0O_DATA_OUT23_IDX, 0, 0); diff --git a/Marlin/src/HAL/HAL_ESP32/i2s.h b/Marlin/src/HAL/HAL_ESP32/i2s.h index fbe7b2419a..42c35aa12d 100644 --- a/Marlin/src/HAL/HAL_ESP32/i2s.h +++ b/Marlin/src/HAL/HAL_ESP32/i2s.h @@ -21,6 +21,8 @@ */ #pragma once +#include + // current value of the outputs provided over i2s extern uint32_t i2s_port_data; diff --git a/Marlin/src/HAL/HAL_LINUX/HAL.h b/Marlin/src/HAL/HAL_LINUX/HAL.h index 1057fae995..b3cabdfe6f 100644 --- a/Marlin/src/HAL/HAL_LINUX/HAL.h +++ b/Marlin/src/HAL/HAL_LINUX/HAL.h @@ -47,16 +47,15 @@ uint8_t _getc(); //arduino: Print.h #define DEC 10 #define HEX 16 -#define OCT 8 -#define BIN 2 +#define OCT 8 +#define BIN 2 //arduino: binary.h (weird defines) #define B01 1 #define B10 2 #include "hardware/Clock.h" -#include - +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" #include "fastio.h" diff --git a/Marlin/src/HAL/HAL_LINUX/fastio.h b/Marlin/src/HAL/HAL_LINUX/fastio.h index 8eae771a4f..d304c4b2a2 100644 --- a/Marlin/src/HAL/HAL_LINUX/fastio.h +++ b/Marlin/src/HAL/HAL_LINUX/fastio.h @@ -25,7 +25,7 @@ * Fast I/O Routines for X86_64 */ -#include +#include "../shared/Marduino.h" #include #define SET_DIR_INPUT(IO) Gpio::setDir(IO, 1) diff --git a/Marlin/src/HAL/HAL_LINUX/hardware/Timer.cpp b/Marlin/src/HAL/HAL_LINUX/hardware/Timer.cpp index 10f725ae68..2bda5bc8cc 100644 --- a/Marlin/src/HAL/HAL_LINUX/hardware/Timer.cpp +++ b/Marlin/src/HAL/HAL_LINUX/hardware/Timer.cpp @@ -51,7 +51,7 @@ void Timer::init(uint32_t sig_id, uint32_t sim_freq, callback_fn* fn) { sa.sa_flags = SA_SIGINFO; sa.sa_sigaction = Timer::handler; sigemptyset(&sa.sa_mask); - if (sigaction(SIGRTMIN, &sa, NULL) == -1) { + if (sigaction(SIGRTMIN, &sa, nullptr) == -1) { return; // todo: handle error } @@ -74,7 +74,7 @@ void Timer::start(uint32_t frequency) { } void Timer::enable() { - if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == -1) { + if (sigprocmask(SIG_UNBLOCK, &mask, nullptr) == -1) { return; // todo: handle error } active = true; @@ -82,7 +82,7 @@ void Timer::enable() { } void Timer::disable() { - if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1) { + if (sigprocmask(SIG_SETMASK, &mask, nullptr) == -1) { return; // todo: handle error } active = false; @@ -102,7 +102,7 @@ void Timer::setCompare(uint32_t compare) { its.it_interval.tv_sec = its.it_value.tv_sec; its.it_interval.tv_nsec = its.it_value.tv_nsec; - if (timer_settime(timerid, 0, &its, NULL) == -1) { + if (timer_settime(timerid, 0, &its, nullptr) == -1) { printf("timer(%ld) failed, compare: %d(%ld)\n", getID(), compare, its.it_value.tv_nsec); return; // todo: handle error } diff --git a/Marlin/src/HAL/HAL_LINUX/main.cpp b/Marlin/src/HAL/HAL_LINUX/main.cpp index 71aab05b1e..bbaa4b076a 100644 --- a/Marlin/src/HAL/HAL_LINUX/main.cpp +++ b/Marlin/src/HAL/HAL_LINUX/main.cpp @@ -110,7 +110,7 @@ int main(void) { #if NUM_SERIAL > 0 MYSERIAL0.begin(BAUDRATE); - SERIAL_PRINTF("x86_64 Initialised\n"); + SERIAL_ECHOLNPGM("x86_64 Initialized"); SERIAL_FLUSHTX(); #endif diff --git a/Marlin/src/HAL/HAL_LINUX/persistent_store_impl.cpp b/Marlin/src/HAL/HAL_LINUX/persistent_store_impl.cpp index 5e0b4a4f28..f09b64416f 100644 --- a/Marlin/src/HAL/HAL_LINUX/persistent_store_impl.cpp +++ b/Marlin/src/HAL/HAL_LINUX/persistent_store_impl.cpp @@ -35,7 +35,7 @@ char filename[] = "eeprom.dat"; bool PersistentStore::access_start() { const char eeprom_erase_value = 0xFF; FILE * eeprom_file = fopen(filename, "rb"); - if (eeprom_file == NULL) return false; + if (eeprom_file == nullptr) return false; fseek(eeprom_file, 0L, SEEK_END); std::size_t file_size = ftell(eeprom_file); @@ -54,7 +54,7 @@ bool PersistentStore::access_start() { bool PersistentStore::access_finish() { FILE * eeprom_file = fopen(filename, "wb"); - if (eeprom_file == NULL) return false; + if (eeprom_file == nullptr) return false; fwrite(buffer, sizeof(uint8_t), sizeof(buffer), eeprom_file); fclose(eeprom_file); return true; diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.h b/Marlin/src/HAL/HAL_LPC1768/HAL.h index 12d73c6713..5a11dfd671 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL.h +++ b/Marlin/src/HAL/HAL_LPC1768/HAL.h @@ -37,18 +37,18 @@ void HAL_init(); extern "C" volatile millis_t _millis; -#include -#include -#include - +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" #include "fastio.h" -#include #include "watchdog.h" #include "HAL_timers.h" #include "MarlinSerial.h" +#include +#include +#include + // // Default graphical display delays // @@ -147,8 +147,8 @@ using FilteredADC = LPC176x::ADC; #define HAL_READ_ADC() FilteredADC::get_result() #define HAL_ADC_READY() FilteredADC::finished_conversion() -// A grace period for the ADC readings to stabilize before they start causing thermal protection errors. -#define THERMAL_PROTECTION_GRACE_PERIOD 500 +// A grace period to allow ADC readings to stabilize, preventing false alarms +#define THERMAL_PROTECTION_GRACE_PERIOD 1000 // Parse a G-code word into a pin index int16_t PARSED_PIN_INDEX(const char code, const int16_t dval); diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h index e90cdf2488..9c50753a83 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h +++ b/Marlin/src/HAL/HAL_LPC1768/HAL_timers.h @@ -126,15 +126,15 @@ FORCE_INLINE static hal_timer_t HAL_timer_get_count(const uint8_t timer_num) { FORCE_INLINE static void HAL_timer_enable_interrupt(const uint8_t timer_num) { switch (timer_num) { - case 0: NVIC_EnableIRQ(TIMER0_IRQn); // Enable interrupt handler - case 1: NVIC_EnableIRQ(TIMER1_IRQn); // Enable interrupt handler + case 0: NVIC_EnableIRQ(TIMER0_IRQn); break; // Enable interrupt handler + case 1: NVIC_EnableIRQ(TIMER1_IRQn); break; // Enable interrupt handler } } FORCE_INLINE static void HAL_timer_disable_interrupt(const uint8_t timer_num) { switch (timer_num) { - case 0: NVIC_DisableIRQ(TIMER0_IRQn); // Disable interrupt handler - case 1: NVIC_DisableIRQ(TIMER1_IRQn); // Disable interrupt handler + case 0: NVIC_DisableIRQ(TIMER0_IRQn); break; // Disable interrupt handler + case 1: NVIC_DisableIRQ(TIMER1_IRQn); break; // Disable interrupt handler } // We NEED memory barriers to ensure Interrupts are actually disabled! diff --git a/Marlin/src/HAL/HAL_LPC1768/fastio.h b/Marlin/src/HAL/HAL_LPC1768/fastio.h index 49f8ec13c3..22bda795d0 100644 --- a/Marlin/src/HAL/HAL_LPC1768/fastio.h +++ b/Marlin/src/HAL/HAL_LPC1768/fastio.h @@ -33,7 +33,7 @@ * For TARGET LPC1768 */ -#include +#include "../shared/Marduino.h" #define PWM_PIN(P) true // all pins are PWM capable #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P) diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp index 58631a1e17..b47863c68d 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp @@ -109,7 +109,7 @@ uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v case U8G_COM_MSG_INIT: //u8g_com_arduino_digital_write(u8g, U8G_PI_SCL, HIGH); //u8g_com_arduino_digital_write(u8g, U8G_PI_SDA, HIGH); - //u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: unknown mode */ + //u8g->pin_list[U8G_PI_A0_STATE] = 0; /* initial RS state: unknown mode */ u8g_i2c_init(u8g->pin_list[U8G_PI_I2C_OPTION]); u8g_com_ssd_I2C_start_sequence(u8g); diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction index 8b2cab7b0a..08f8ce526e 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction +++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction @@ -178,7 +178,7 @@ uint8_t u8g_com_HAL_LPC1768_ssd_sw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_v //u8g_com_arduino_digital_write(u8g, U8G_PI_SCL, HIGH); //u8g_com_arduino_digital_write(u8g, U8G_PI_SDA, HIGH); - //u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: unknown mode */ + //u8g->pin_list[U8G_PI_A0_STATE] = 0; /* initial RS state: unknown mode */ u8g_i2c_init_sw(u8g->pin_list[U8G_PI_I2C_OPTION]); u8g_com_ssd_I2C_start_sequence_sw(u8g); diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp index 0931f7858a..496c4cb75c 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp @@ -57,7 +57,7 @@ #include "../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_LCD +#if ENABLED(U8GLIB_ST7920) #include #include "SoftwareSPI.h" @@ -98,7 +98,7 @@ uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t ar u8g_SetPILevel(u8g, U8G_PI_SCK, 0); u8g_SetPILevel(u8g, U8G_PI_MOSI, 0); - u8g->pin_list[U8G_PI_A0_STATE] = 0; /* inital RS state: command mode */ + u8g->pin_list[U8G_PI_A0_STATE] = 0; /* initial RS state: command mode */ break; case U8G_COM_MSG_STOP: @@ -141,6 +141,5 @@ uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t ar return 1; } -#endif // HAS_GRAPHICAL_LCD - +#endif // U8GLIB_ST7920 #endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp index e851284ad5..748149bb03 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp @@ -57,19 +57,19 @@ #include "../../../inc/MarlinConfigPre.h" -#if HAS_GRAPHICAL_LCD +#if HAS_GRAPHICAL_LCD && DISABLED(U8GLIB_ST7920) -#include #include "SoftwareSPI.h" #undef SPI_SPEED #define SPI_SPEED 2 // About 2 MHz +#include #include #include #include -#include +#include uint8_t swSpiTransfer_mode_0(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin ) { @@ -158,7 +158,19 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, break; case U8G_COM_MSG_CHIP_SELECT: - u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val); + #if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 + if (arg_val) { // SCK idle state needs to be set to the proper idle state before + // the next chip select goes active + u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active + u8g_SetPILevel(u8g, U8G_PI_CS, LOW); + } + else { + u8g_SetPILevel(u8g, U8G_PI_CS, HIGH); + u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive + } + #else + u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val); + #endif break; case U8G_COM_MSG_WRITE_BYTE: @@ -191,6 +203,5 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, return 1; } -#endif // HAS_GRAPHICAL_LCD - +#endif // HAS_GRAPHICAL_LCD && !U8GLIB_ST7920 #endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py b/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py index 59c5f51436..36242c9605 100644 --- a/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py +++ b/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py @@ -3,6 +3,7 @@ # if target_filename is found then that drive is used # else if target_drive is found then that drive is used # +from __future__ import print_function target_filename = "FIRMWARE.CUR" target_drive = "REARM" @@ -12,11 +13,11 @@ import platform current_OS = platform.system() Import("env") -def detect_error(e): - print '\nUnable to find destination disk (' + e + ')\n' \ +def print_error(e): + print('\nUnable to find destination disk (' + e + ')\n' \ 'Please select it in platformio.ini using the upload_port keyword ' \ - '(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html)\n' \ - 'or copy the firmware (.pioenvs/' + env.get('PIOENV') + '/firmware.bin) manually to the appropriate disk\n' + '(https://docs.platformio.org/en/latest/projectconf/section_env_upload.html) ' \ + 'or copy the firmware (.pioenvs/' + env.get('PIOENV') + '/firmware.bin) manually to the appropriate disk\n') try: if current_OS == 'Windows': @@ -63,9 +64,9 @@ try: env.Replace( UPLOAD_PORT=upload_disk ) - print 'upload disk: ', upload_disk + print('upload disk: ', upload_disk) else: - detect_error('Autodetect Error') + print_error('Autodetect Error') elif current_OS == 'Linux': # @@ -100,9 +101,9 @@ try: UPLOAD_FLAGS="-P$UPLOAD_PORT", UPLOAD_PORT=upload_disk ) - print 'upload disk: ', upload_disk + print('upload disk: ', upload_disk) else: - detect_error('Autodetect Error') + print_error('Autodetect Error') elif current_OS == 'Darwin': # MAC # @@ -133,9 +134,9 @@ try: env.Replace( UPLOAD_PORT=upload_disk ) - print '\nupload disk: ', upload_disk, '\n' + print('\nupload disk: ', upload_disk, '\n') else: - detect_error('Autodetect Error') + print_error('Autodetect Error') except Exception as e: - detect_error(str(e)) + print_error(str(e)) diff --git a/Marlin/src/HAL/HAL_STM32/HAL.h b/Marlin/src/HAL/HAL_STM32/HAL.h index d08a49587f..44cc96957b 100644 --- a/Marlin/src/HAL/HAL_STM32/HAL.h +++ b/Marlin/src/HAL/HAL_STM32/HAL.h @@ -28,20 +28,20 @@ // Includes // -------------------------------------------------------------------------- -#include - -#include "Arduino.h" - -#ifdef USBCON - #include -#endif - -#include "../../inc/MarlinConfigPre.h" +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" #include "fastio_STM32.h" #include "watchdog_STM32.h" +#include "../../inc/MarlinConfigPre.h" + +#include + +#ifdef USBCON + #include +#endif + // -------------------------------------------------------------------------- // Defines // -------------------------------------------------------------------------- diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp index 1534a35756..89bece08bb 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp @@ -270,7 +270,7 @@ void HAL_adc_init(void) { adc.calibrate(); adc.setSampleRate(ADC_SMPR_41_5); // ? adc.setPins(adc_pins, ADC_PIN_COUNT); - adc.setDMA(HAL_adc_results, (uint16_t)ADC_PIN_COUNT, (uint32_t)(DMA_MINC_MODE | DMA_CIRC_MODE), (void (*)())NULL); + adc.setDMA(HAL_adc_results, (uint16_t)ADC_PIN_COUNT, (uint32_t)(DMA_MINC_MODE | DMA_CIRC_MODE), nullptr); adc.setScanMode(); adc.setContinuous(); adc.startConversion(); @@ -279,6 +279,7 @@ void HAL_adc_init(void) { void HAL_adc_start_conversion(const uint8_t adc_pin) { TEMP_PINS pin_index; switch (adc_pin) { + default: return; #if HAS_TEMP_ADC_0 case TEMP_0_PIN: pin_index = TEMP_0; break; #endif @@ -310,8 +311,6 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) { HAL_adc_result = (HAL_adc_results[(int)pin_index] >> 2) & 0x3FF; // shift to get 10 bits only. } -uint16_t HAL_adc_get_result(void) { - return HAL_adc_result; -} +uint16_t HAL_adc_get_result(void) { return HAL_adc_result; } #endif // __STM32F1__ diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.h b/Marlin/src/HAL/HAL_STM32F1/HAL.h index 66c4cba59e..137d213d97 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL.h +++ b/Marlin/src/HAL/HAL_STM32F1/HAL.h @@ -36,14 +36,8 @@ // Includes // -------------------------------------------------------------------------- -#include -#include -#include - -// -------------------------------------------------------------------------- -// Includes -// -------------------------------------------------------------------------- - +#include "../../core/macros.h" +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" @@ -51,6 +45,10 @@ #include "watchdog_STM32F1.h" #include "HAL_timers_STM32F1.h" + +#include +#include + #include "../../inc/MarlinConfigPre.h" // -------------------------------------------------------------------------- @@ -131,7 +129,7 @@ void HAL_init(); #endif #ifndef digitalPinHasPWM - #define digitalPinHasPWM(P) (PIN_MAP[P].timer_device != NULL) + #define digitalPinHasPWM(P) (PIN_MAP[P].timer_device != nullptr) #endif #define CRITICAL_SECTION_START uint32_t primask = __get_primask(); (void)__iCliRetVal() diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h b/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h index 86c1355456..bb48b3beda 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_sdio_STM32F1.h @@ -25,7 +25,8 @@ // Includes // -------------------------------------------------------------------------- -#include "Arduino.h" +#include "../shared/Marduino.h" + #include "libmaple/sdio.h" #include "libmaple/dma.h" diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_STM32F1.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_STM32F1.cpp index 8b235c004a..866f5c2e26 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL_timers_STM32F1.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/HAL_timers_STM32F1.cpp @@ -121,7 +121,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { timer_set_count(STEP_TIMER_DEV, 0); timer_set_prescaler(STEP_TIMER_DEV, (uint16_t)(STEPPER_TIMER_PRESCALE - 1)); timer_set_reload(STEP_TIMER_DEV, 0xFFFF); - timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, MIN(HAL_TIMER_TYPE_MAX, (STEPPER_TIMER_RATE / frequency))); + timer_set_compare(STEP_TIMER_DEV, STEP_TIMER_CHAN, MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), (STEPPER_TIMER_RATE / frequency))); timer_attach_interrupt(STEP_TIMER_DEV, STEP_TIMER_CHAN, stepTC_Handler); nvic_irq_set_priority(irq_num, 1); timer_generate_update(STEP_TIMER_DEV); @@ -132,7 +132,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { timer_set_count(TEMP_TIMER_DEV, 0); timer_set_prescaler(TEMP_TIMER_DEV, (uint16_t)(TEMP_TIMER_PRESCALE - 1)); timer_set_reload(TEMP_TIMER_DEV, 0xFFFF); - timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, MIN(HAL_TIMER_TYPE_MAX, ((F_CPU / TEMP_TIMER_PRESCALE) / frequency))); + timer_set_compare(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, MIN(hal_timer_t(HAL_TIMER_TYPE_MAX), ((F_CPU / TEMP_TIMER_PRESCALE) / frequency))); timer_attach_interrupt(TEMP_TIMER_DEV, TEMP_TIMER_CHAN, tempTC_Handler); nvic_irq_set_priority(irq_num, 2); timer_generate_update(TEMP_TIMER_DEV); @@ -213,6 +213,7 @@ timer_dev* get_timer_dev(int number) { #if STM32_HAVE_TIMER(14) case 14: return &timer14; #endif + default: return nullptr; } } diff --git a/Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h b/Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h index 3994b3268a..3be152d375 100644 --- a/Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h +++ b/Marlin/src/HAL/HAL_STM32F1/fastio_STM32F1.h @@ -47,7 +47,7 @@ #define IS_INPUT(IO) (_GET_MODE(IO) == GPIO_INPUT_FLOATING || _GET_MODE(IO) == GPIO_INPUT_ANALOG || _GET_MODE(IO) == GPIO_INPUT_PU || _GET_MODE(IO) == GPIO_INPUT_PD) #define IS_OUTPUT(IO) (_GET_MODE(IO) == GPIO_OUTPUT_PP) -#define HAS_TIMER(IO) (PIN_MAP[IO].timer_device != NULL) +#define HAS_TIMER(IO) (PIN_MAP[IO].timer_device != nullptr) #define PWM_PIN(P) HAS_TIMER(P) #define USEABLE_HARDWARE_PWM(P) PWM_PIN(P) diff --git a/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp b/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp index 2b184cdc4c..9c9197bac7 100644 --- a/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp @@ -1,10 +1,9 @@ /** * Marlin 3D Printer Firmware - * * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com - * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com - * Copyright (c) 2016 Victor Perez victor_pv@hotmail.com + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,33 +32,51 @@ #include "../shared/persistent_store_api.h" -#include "../../sd/cardreader.h" +#ifndef E2END + #define E2END 4095 +#endif +#define HAL_STM32F1_EEPROM_SIZE (E2END + 1) -#define HAL_STM32F1_EEPROM_SIZE 4096 -char HAL_STM32F1_eeprom_content[HAL_STM32F1_EEPROM_SIZE]; +static char HAL_STM32F1_eeprom_content[HAL_STM32F1_EEPROM_SIZE]; -char eeprom_filename[] = "eeprom.dat"; +#if ENABLED(SDSUPPORT) -bool PersistentStore::access_start() { - if (!card.isDetected()) return false; - int16_t bytes_read = 0; - constexpr char eeprom_zero = 0xFF; - card.openFile(eeprom_filename, true); - bytes_read = card.read(HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE); - if (bytes_read < 0) return false; - for (; bytes_read < HAL_STM32F1_EEPROM_SIZE; bytes_read++) - HAL_STM32F1_eeprom_content[bytes_read] = eeprom_zero; - card.closefile(); - return true; -} + #include "../../sd/cardreader.h" -bool PersistentStore::access_finish() { - if (!card.isDetected()) return false; - card.openFile(eeprom_filename, false); - int16_t bytes_written = card.write(HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE); - card.closefile(); - return (bytes_written == HAL_STM32F1_EEPROM_SIZE); -} + #define EEPROM_FILENAME "eeprom.dat" + + bool PersistentStore::access_start() { + if (!card.isDetected()) return false; + + SdFile file, root = card.getroot(); + if (!file.open(&root, EEPROM_FILENAME, O_RDONLY)) + return false; + + int16_t bytes_read = file.read(HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE); + if (bytes_read < 0) return false; + for (; bytes_read < HAL_STM32F1_EEPROM_SIZE; bytes_read++) + HAL_STM32F1_eeprom_content[bytes_read] = 0xFF; + file.close(); + return true; + } + + bool PersistentStore::access_finish() { + if (!card.isDetected()) return false; + + SdFile file, root = card.getroot(); + if (file.open(&root, EEPROM_FILENAME, O_CREAT | O_WRITE | O_TRUNC)) + return false; + + int16_t bytes_written = file.write(HAL_STM32F1_eeprom_content, HAL_STM32F1_EEPROM_SIZE); + file.close(); + return (bytes_written == HAL_STM32F1_EEPROM_SIZE); + } + +#else // !SDSUPPORT + + #error "Please define SPI_EEPROM (in Configuration.h) or disable EEPROM_SETTINGS." + +#endif // !SDSUPPORT bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) { for (size_t i = 0; i < size; i++) diff --git a/Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp b/Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp index 1d2153d208..5cbf5a2243 100644 --- a/Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp +++ b/Marlin/src/HAL/HAL_STM32F1/u8g_com_stm32duino_fsmc.cpp @@ -67,7 +67,7 @@ uint8_t u8g_com_stm32duino_fsmc_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, voi LCD_IO_Init(u8g->pin_list[U8G_PI_CS], u8g->pin_list[U8G_PI_A0]); u8g_Delay(100); - if (arg_ptr != NULL) + if (arg_ptr != nullptr) *((uint32_t *)arg_ptr) = LCD_IO_ReadData(LCD_READ_ID, 3); isCommand = 0; diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL.h b/Marlin/src/HAL/HAL_STM32F4/HAL.h index c41fe05f60..6f2d22b8dd 100644 --- a/Marlin/src/HAL/HAL_STM32F4/HAL.h +++ b/Marlin/src/HAL/HAL_STM32F4/HAL.h @@ -32,21 +32,21 @@ // Includes // -------------------------------------------------------------------------- -#include - -#include "Arduino.h" - -#ifdef USBCON - #include -#endif - +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" #include "fastio_STM32F4.h" #include "watchdog_STM32F4.h" - #include "HAL_timers_STM32F4.h" +#include "../../inc/MarlinConfigPre.h" + +#include + +#ifdef USBCON + #include +#endif + // -------------------------------------------------------------------------- // Defines // -------------------------------------------------------------------------- diff --git a/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp b/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp index 6c3926db65..8365b8370b 100644 --- a/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp +++ b/Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp @@ -165,7 +165,7 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) { #ifdef STM32GENERIC SPI.dmaSend(const_cast(buf), 512); #else - SPI.transfer((uint8_t*)buf, (uint8_t*)0, 512); + SPI.transfer((uint8_t*)buf, nullptr, 512); #endif SPI.endTransaction(); diff --git a/Marlin/src/HAL/HAL_STM32F7/HAL.h b/Marlin/src/HAL/HAL_STM32F7/HAL.h index db7aa0391a..878d933653 100644 --- a/Marlin/src/HAL/HAL_STM32F7/HAL.h +++ b/Marlin/src/HAL/HAL_STM32F7/HAL.h @@ -34,8 +34,7 @@ #include -#include "Arduino.h" - +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" @@ -44,6 +43,7 @@ #include "HAL_timers_STM32F7.h" +#include "../../inc/MarlinConfigPre.h" // -------------------------------------------------------------------------- // Defines diff --git a/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp b/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp index 33418bb981..0d641cf1d3 100644 --- a/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp +++ b/Marlin/src/HAL/HAL_STM32F7/TMC2660.cpp @@ -222,7 +222,6 @@ void TMC26XStepper::setSpeed(uint16_t whatSpeed) { this->speed = whatSpeed; this->step_delay = 60UL * sq(1000UL) / ((uint32_t)this->number_of_steps * (uint32_t)whatSpeed * (uint32_t)this->microsteps); #ifdef TMC_DEBUG0 // crashes - //SERIAL_PRINTF("Step delay in micros: "); SERIAL_ECHOPAIR("\nStep delay in micros: ", this->step_delay); #endif // Update the next step time @@ -315,10 +314,8 @@ void TMC26XStepper::setCurrent(uint16_t current) { // and recalculate the current setting current_scaling = (byte)((resistor_value * mASetting * 32.0 / (0.165 * sq(1000.0))) - 0.5); //theoretically - 1.0 for better rounding it is 0.5 #ifdef TMC_DEBUG0 // crashes - //SERIAL_PRINTF("CS (Vsense=1): "); SERIAL_ECHOPAIR("\nCS (Vsense=1): ",current_scaling); } else { - //SERIAL_PRINTF("CS: "); SERIAL_ECHOPAIR("\nCS: ", current_scaling); #endif } @@ -405,7 +402,6 @@ void TMC26XStepper::setMicrosteps(const int16_t in_steps) { microsteps = _BV(8 - setting_pattern); #ifdef TMC_DEBUG0 // crashes - //SERIAL_PRINTF("Microstepping: "); SERIAL_ECHOPAIR("\n Microstepping: ", microsteps); #endif @@ -612,7 +608,6 @@ void TMC26XStepper::setCoolStepConfiguration( | (((uint32_t)lower_current_limit) << 15) | COOL_STEP_REGISTER; // Register signature - //SERIAL_PRINTFln(cool_step_register_value,HEX); if (started) send262(cool_step_register_value); } @@ -830,18 +825,14 @@ void TMC26XStepper::debugLastStatus() { uint32_t readout_config = driver_configuration_register_value & READ_SELECTION_PATTERN; const int16_t value = getReadoutValue(); if (readout_config == READ_MICROSTEP_POSTION) { - //SERIAL_PRINTF("Microstep position phase A: "); SERIAL_ECHOPAIR("\n Microstep position phase A: ", value); } else if (readout_config == READ_STALL_GUARD_READING) { - //SERIAL_PRINTF("Stall Guard value:"); SERIAL_ECHOPAIR("\n Stall Guard value:", value); } else if (readout_config == READ_STALL_GUARD_AND_COOL_STEP) { int16_t stallGuard = value & 0xF, current = value & 0x1F0; - //SERIAL_PRINTF("Approx Stall Guard: "); SERIAL_ECHOPAIR("\n Approx Stall Guard: ", stallGuard); - //SERIAL_PRINTF("Current level"); SERIAL_ECHOPAIR("\n Current level", current); } } diff --git a/Marlin/src/HAL/HAL_TEENSY31_32/HAL.h b/Marlin/src/HAL/HAL_TEENSY31_32/HAL.h index 81b011b186..0fb1b551fc 100644 --- a/Marlin/src/HAL/HAL_TEENSY31_32/HAL.h +++ b/Marlin/src/HAL/HAL_TEENSY31_32/HAL.h @@ -28,14 +28,7 @@ #define CPU_32_BIT -// _BV is re-defined in Arduino.h -#undef _BV - -#include - -// Redefine sq macro defined by teensy3/wiring.h -#undef sq -#define sq(x) ((x)*(x)) +#include "../shared/Marduino.h" #include "../math_32bit.h" #include "../HAL_SPI.h" diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h index 99fc31aff5..0cd3ed8de5 100644 --- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h +++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL.h @@ -31,15 +31,7 @@ // Includes // -------------------------------------------------------------------------- -// _BV is re-defined in Arduino.h -#undef _BV - -#include - -// Redefine sq macro defined by teensy3/wiring.h -#undef sq -#define sq(x) ((x)*(x)) - +#include "../shared/Marduino.h" #include "../shared/math_32bit.h" #include "../shared/HAL_SPI.h" diff --git a/Marlin/src/HAL/shared/HAL_ST7920.h b/Marlin/src/HAL/shared/HAL_ST7920.h index 9af1286c7a..bdc2b8cbb2 100644 --- a/Marlin/src/HAL/shared/HAL_ST7920.h +++ b/Marlin/src/HAL/shared/HAL_ST7920.h @@ -33,4 +33,4 @@ void ST7920_set_cmd(); void ST7920_set_dat(); void ST7920_write_byte(const uint8_t data); -#endif \ No newline at end of file +#endif diff --git a/Marlin/src/HAL/shared/Marduino.h b/Marlin/src/HAL/shared/Marduino.h new file mode 100644 index 0000000000..8c840cd02d --- /dev/null +++ b/Marlin/src/HAL/shared/Marduino.h @@ -0,0 +1,57 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * HAL/shared/Marduino.h + */ + +#undef DISABLED // Redefined by ESP32 +#undef M_PI // Redefined by all +#undef _BV // Redefined by some +#undef sq // Redefined by teensy3/wiring.h + +#include // NOTE: If included earlier then this line is a NOOP + +#undef DISABLED +#define DISABLED(V...) DO(DIS,&&,V) + +#undef _BV +#define _BV(b) (1UL << (b)) + +#undef sq +#define sq(x) ((x)*(x)) + +#ifndef SBI + #define SBI(A,B) (A |= (1 << (B))) +#endif + +#ifndef CBI + #define CBI(A,B) (A &= ~(1 << (B))) +#endif + +#ifndef __AVR__ + #ifndef strchr_P // Some platforms define a macro (DUE, teensy35) + inline const char* strchr_P(const char *s, int c) { return strchr(s,c); } + //#define strchr_P(s,c) strchr(s,c) + #endif +#endif diff --git a/Marlin/src/HAL/shared/backtrace/unwarm.cpp b/Marlin/src/HAL/shared/backtrace/unwarm.cpp index e1740fc248..fb4263a272 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarm.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwarm.cpp @@ -93,7 +93,7 @@ bool UnwReportRetAddr(UnwState * const state, uint32_t addr) { UnwReport entry; // We found two acceptable values. - entry.name = NULL; + entry.name = nullptr; entry.address = addr & 0xFFFFFFFE; // Remove Thumb bit entry.function = 0; diff --git a/Marlin/src/HAL/shared/backtrace/unwarm_arm.cpp b/Marlin/src/HAL/shared/backtrace/unwarm_arm.cpp index 3c9c5aaeec..0ec9bd56af 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarm_arm.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwarm_arm.cpp @@ -124,13 +124,11 @@ UnwResult UnwStartArm(UnwState * const state) { /* MRS */ else if ((instr & 0xFFBF0FFF) == 0xE10F0000) { + uint8_t rd = (instr & 0x0000F000) >> 12; #ifdef UNW_DEBUG const bool R = !!(instr & 0x00400000); - #else - constexpr bool R = false; + UnwPrintd4("MRS r%d,%s\t; r%d invalidated", rd, R ? "SPSR" : "CPSR", rd); #endif - uint8_t rd = (instr & 0x0000F000) >> 12; - UnwPrintd4("MRS r%d,%s\t; r%d invalidated", rd, R ? "SPSR" : "CPSR", rd); /* Status registers untracked */ state->regData[rd].o = REG_VAL_INVALID; diff --git a/Marlin/src/HAL/shared/backtrace/unwarmbytab.cpp b/Marlin/src/HAL/shared/backtrace/unwarmbytab.cpp index db49dcad7f..ebd53cc1d9 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarmbytab.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwarmbytab.cpp @@ -47,17 +47,17 @@ static const UnwTabEntry *UnwTabSearchIndex(const UnwTabEntry *start, const UnwT } /* - * Get the function name or NULL if not found + * Get the function name or nullptr if not found */ static const char *UnwTabGetFunctionName(const UnwindCallbacks *cb, uint32_t address) { uint32_t flag_word = 0; if (!cb->readW(address-4,&flag_word)) - return NULL; + return nullptr; if ((flag_word & 0xFF000000) == 0xFF000000) { return (const char *)(address - 4 - (flag_word & 0x00FFFFFF)); } - return NULL; + return nullptr; } /** diff --git a/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp b/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp index 179bc1417b..20f1a7bc0f 100644 --- a/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp @@ -52,8 +52,8 @@ #define END_FLASH_ADDR 0x00020000 #endif -#ifdef __STM32F1__ -// For STM32F103ZET6/STM32F103VET6 +#if defined(__STM32F1__) || defined(STM32F1xx) || defined(STM32F0xx) +// For STM32F103ZET6/STM32F103VET6/STM32F0xx // SRAM (0x20000000 - 0x20010000) (64kb) // FLASH (0x00000000 - 0x00080000) (512kb) // diff --git a/Marlin/src/HAL/shared/servo.cpp b/Marlin/src/HAL/shared/servo.cpp index 0d276c4aa6..ec25569f9d 100644 --- a/Marlin/src/HAL/shared/servo.cpp +++ b/Marlin/src/HAL/shared/servo.cpp @@ -55,7 +55,6 @@ #if HAS_SERVOS && !(IS_32BIT_TEENSY || defined(TARGET_LPC1768) || defined(STM32F1) || defined(STM32F1xx) || defined(STM32F4) || defined(STM32F4xx) || defined(STM32F7xx)) -//#include #include "servo.h" #include "servo_private.h" diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index c6e25b5a5a..6f9e527832 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -728,12 +728,12 @@ void idle( * Kill all activity and lock the machine. * After this the machine will need to be reset. */ -void kill(PGM_P const lcd_msg/*=NULL*/) { +void kill(PGM_P const lcd_msg/*=nullptr*/) { thermalManager.disable_all_heaters(); SERIAL_ERROR_MSG(MSG_ERR_KILLED); - #if HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI) + #if HAS_DISPLAY ui.kill_screen(lcd_msg ? lcd_msg : PSTR(MSG_KILLED)); #else UNUSED(lcd_msg); @@ -939,6 +939,20 @@ void setup() { queue_setup(); + // UI must be initialized before EEPROM + // (because EEPROM code calls the UI). + ui.init(); + ui.reset_status(); + + #if HAS_SPI_LCD && ENABLED(SHOW_BOOTSCREEN) + ui.show_bootscreen(); + #endif + + #if ENABLED(SDIO_SUPPORT) && SD_DETECT_PIN == -1 + // Auto-mount the SD for EEPROM.dat emulation + if (!card.isDetected()) card.initsd(); + #endif + // Load data from EEPROM if available (or use defaults) // This also updates variables in the planner, elsewhere (void)settings.load(); @@ -1039,13 +1053,6 @@ void setup() { fanmux_init(); #endif - ui.init(); - ui.reset_status(); - - #if HAS_SPI_LCD && ENABLED(SHOW_BOOTSCREEN) - ui.show_bootscreen(); - #endif - #if ENABLED(MIXING_EXTRUDER) mixer.init(); #endif diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h index 1252d7f574..0433a50c3c 100644 --- a/Marlin/src/Marlin.h +++ b/Marlin/src/Marlin.h @@ -321,7 +321,7 @@ void disable_e_stepper(const uint8_t e); void disable_e_steppers(); void disable_all_steppers(); -void kill(PGM_P const lcd_msg=NULL); +void kill(PGM_P const lcd_msg=nullptr); void minkill(); void quickstop_stepper(); diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index 14dcf8bd30..a8d214fba2 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -162,6 +162,8 @@ #define MSG_BEGIN_FILE_LIST "Begin file list" #define MSG_END_FILE_LIST "End file list" #define MSG_INVALID_EXTRUDER "Invalid extruder" +#define MSG_INVALID_E_STEPPER "Invalid E stepper" +#define MSG_E_STEPPER_NOT_SPECIFIED "E stepper not specified" #define MSG_INVALID_SOLENOID "Invalid solenoid" #define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" #define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp index aae0d63698..5db5cc4f8e 100644 --- a/Marlin/src/core/serial.cpp +++ b/Marlin/src/core/serial.cpp @@ -50,7 +50,7 @@ void serial_echopair_PGM(PGM_P const s_P, unsigned long v) { serialprintPGM(s_P) void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) SERIAL_CHAR(' '); } -void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post/*=NULL*/) { +void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post/*=nullptr*/) { if (pre) serialprintPGM(pre); serialprintPGM(onoff ? on : off); if (post) serialprintPGM(post); diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index f79856178c..83543cd788 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -174,7 +174,7 @@ inline void serial_echopair_PGM(PGM_P const s_P, void *v) { serial_echopair_PG void serialprintPGM(PGM_P str); void serial_echo_start(); void serial_error_start(); -void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post=NULL); +void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post=nullptr); void serialprint_onoff(const bool onoff); void serialprintln_onoff(const bool onoff); void serialprint_truefalse(const bool tf); @@ -185,4 +185,4 @@ void print_bin(const uint16_t val); void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z); void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]); #define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0) -#define SERIAL_XYZ(PREFIX,...) do { print_xyz(PSTR(PREFIX), NULL, __VA_ARGS__); } while(0) +#define SERIAL_XYZ(PREFIX,...) do { print_xyz(PSTR(PREFIX), nullptr, __VA_ARGS__); } while(0) diff --git a/Marlin/src/feature/backlash.cpp b/Marlin/src/feature/backlash.cpp new file mode 100644 index 0000000000..3254fb3f3c --- /dev/null +++ b/Marlin/src/feature/backlash.cpp @@ -0,0 +1,139 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../Marlin.h" + +#if ENABLED(BACKLASH_COMPENSATION) + +#include "backlash.h" +#include "../module/planner.h" + +#if ENABLED(BACKLASH_GCODE) + uint8_t Backlash::correction = (BACKLASH_CORRECTION) * 0xFF; + #ifdef BACKLASH_DISTANCE_MM + float Backlash::distance_mm[XYZ] = BACKLASH_DISTANCE_MM; + #endif + #ifdef BACKLASH_SMOOTHING_MM + float Backlash::smoothing_mm = BACKLASH_SMOOTHING_MM; + #endif +#endif + +#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + float Backlash::measured_mm[XYZ] = { 0 }; + uint8_t Backlash::measured_count[XYZ] = { 0 }; +#endif + +Backlash backlash; + +/** + * To minimize seams in the printed part, backlash correction only adds + * steps to the current segment (instead of creating a new segment, which + * causes discontinuities and print artifacts). + * + * With a non-zero BACKLASH_SMOOTHING_MM value the backlash correction is + * spread over multiple segments, smoothing out artifacts even more. + */ + +void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const uint8_t dm, block_t * const block) { + static uint8_t last_direction_bits; + uint8_t changed_dir = last_direction_bits ^ dm; + // Ignore direction change if no steps are taken in that direction + if (da == 0) CBI(changed_dir, X_AXIS); + if (db == 0) CBI(changed_dir, Y_AXIS); + if (dc == 0) CBI(changed_dir, Z_AXIS); + last_direction_bits ^= changed_dir; + + if (correction == 0) return; + + #ifdef BACKLASH_SMOOTHING_MM + // The segment proportion is a value greater than 0.0 indicating how much residual_error + // is corrected for in this segment. The contribution is based on segment length and the + // smoothing distance. Since the computation of this proportion involves a floating point + // division, defer computation until needed. + float segment_proportion = 0; + + // Residual error carried forward across multiple segments, so correction can be applied + // to segments where there is no direction change. + static int32_t residual_error[XYZ] = { 0 }; + #else + // No leftover residual error from segment to segment + int32_t residual_error[XYZ] = { 0 }; + // No direction change, no correction. + if (!changed_dir) return; + #endif + + const float f_corr = float(correction) / 255.0f; + + LOOP_XYZ(axis) { + if (distance_mm[axis]) { + const bool reversing = TEST(dm,axis); + + // When an axis changes direction, add axis backlash to the residual error + if (TEST(changed_dir, axis)) + residual_error[axis] += (reversing ? -f_corr : f_corr) * distance_mm[axis] * planner.settings.axis_steps_per_mm[axis]; + + // Decide how much of the residual error to correct in this segment + int32_t error_correction = residual_error[axis]; + #ifdef BACKLASH_SMOOTHING_MM + if (error_correction && smoothing_mm != 0) { + // Take up a portion of the residual_error in this segment, but only when + // the current segment travels in the same direction as the correction + if (reversing == (error_correction < 0)) { + if (segment_proportion == 0) + segment_proportion = MIN(1.0f, block->millimeters / smoothing_mm); + error_correction = ceil(segment_proportion * error_correction); + } + else + error_correction = 0; // Don't take up any backlash in this segment, as it would subtract steps + } + #endif + // Making a correction reduces the residual error and modifies delta_mm + if (error_correction) { + block->steps[axis] += ABS(error_correction); + residual_error[axis] -= error_correction; + } + } + } +} + +#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + #if USES_Z_MIN_PROBE_ENDSTOP + #define TEST_PROBE_PIN (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING) + #else + #define TEST_PROBE_PIN (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING) + #endif + + // Measure Z backlash by raising nozzle in increments until probe deactivates + void Backlash::measure_with_probe() { + if (measured_count[Z_AXIS] == 255) return; + + float start_height = current_position[Z_AXIS]; + while (current_position[Z_AXIS] < (start_height + BACKLASH_MEASUREMENT_LIMIT) && TEST_PROBE_PIN) + do_blocking_move_to_z(current_position[Z_AXIS] + BACKLASH_MEASUREMENT_RESOLUTION, MMM_TO_MMS(BACKLASH_MEASUREMENT_FEEDRATE)); + + // The backlash from all probe points is averaged, so count the number of measurements + measured_mm[Z_AXIS] += current_position[Z_AXIS] - start_height; + measured_count[Z_AXIS]++; + } +#endif + +#endif // BACKLASH_COMPENSATION diff --git a/Marlin/src/feature/backlash.h b/Marlin/src/feature/backlash.h new file mode 100644 index 0000000000..c35675f1b1 --- /dev/null +++ b/Marlin/src/feature/backlash.h @@ -0,0 +1,88 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../inc/MarlinConfigPre.h" +#include "../module/planner.h" + +class Backlash { +public: + #if ENABLED(BACKLASH_GCODE) + static uint8_t correction; + #ifdef BACKLASH_DISTANCE_MM + static float distance_mm[XYZ]; + #endif + #ifdef BACKLASH_SMOOTHING_MM + static float smoothing_mm; + #endif + static inline void set_correction(const float &v) { correction = MAX(0, MIN(1.0, v)) * all_on; } + static inline float get_correction() { return float(ui8_to_percent(correction)) / 100.0f; } + #elif ENABLED(BACKLASH_COMPENSATION) + static constexpr uint8_t correction = (BACKLASH_CORRECTION) * 0xFF; + #ifdef BACKLASH_DISTANCE_MM + static constexpr float distance_mm[XYZ] = BACKLASH_DISTANCE_MM; + #endif + #ifdef BACKLASH_SMOOTHING_MM + static constexpr float smoothing_mm = BACKLASH_SMOOTHING_MM; + #endif + static inline void set_correction(float) { } + static inline float get_correction() { return float(ui8_to_percent(correction)) / 100.0f; } + #else + static constexpr uint8_t correction = 0; + static inline void set_correction(float) { } + static inline float get_correction() { return 0; } + #endif + + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + private: + static float measured_mm[XYZ]; + static uint8_t measured_count[XYZ]; + public: + static void measure_with_probe(); + #endif + + static inline float get_measurement(const uint8_t e) { + // Return the measurement averaged over all readings + return ( + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + measured_count[e] > 0 ? measured_mm[e] / measured_count[e] : + #endif + 0 + ); + } + + static inline bool has_measurement(const uint8_t e) { + return (false + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + || (measured_count[e] > 0) + #endif + ); + } + + static inline bool has_any_measurement() { + return has_measurement(X_AXIS) || has_measurement(Y_AXIS) || has_measurement(Z_AXIS); + } + + void add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const uint8_t dm, block_t * const block); +}; + +extern Backlash backlash; diff --git a/Marlin/src/feature/bedlevel/bedlevel.cpp b/Marlin/src/feature/bedlevel/bedlevel.cpp index f2a0274e06..3cac3d5b46 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.cpp +++ b/Marlin/src/feature/bedlevel/bedlevel.cpp @@ -46,7 +46,6 @@ #include "../../lcd/extensible_ui/ui_api.h" #endif - bool leveling_is_valid() { return #if ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index ba9205b9c3..dfd16014be 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -330,7 +330,7 @@ else { while (g29_repetition_cnt--) { if (cnt > 20) { cnt = 0; idle(); } - const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, NULL); + const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, nullptr); if (location.x_index < 0) { // No more REACHABLE mesh points to invalidate, so we ASSUME the user // meant to invalidate the ENTIRE mesh, which cannot be done with @@ -528,7 +528,7 @@ } else { while (g29_repetition_cnt--) { // this only populates reachable mesh points near - const mesh_index_pair location = find_closest_mesh_point_of_type(INVALID, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, NULL); + const mesh_index_pair location = find_closest_mesh_point_of_type(INVALID, g29_x_pos, g29_y_pos, USE_NOZZLE_AS_REFERENCE, nullptr); if (location.x_index < 0) { // No more REACHABLE INVALID mesh points to populate, so we ASSUME // user meant to populate ALL INVALID mesh points to value @@ -759,7 +759,7 @@ if (do_furthest) location = find_furthest_invalid_mesh_point(); else - location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_PROBE_AS_REFERENCE, NULL); + location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_PROBE_AS_REFERENCE, nullptr); if (location.x_index >= 0) { // mesh point found and is reachable by probe const float rawx = mesh_index_to_xpos(location.x_index), @@ -793,7 +793,7 @@ typedef void (*clickFunc_t)(); - bool click_and_hold(const clickFunc_t func=NULL) { + bool click_and_hold(const clickFunc_t func=nullptr) { if (ui.button_pressed()) { ui.quick_feedback(false); // Preserve button state for click-and-hold const millis_t nxt = millis() + 1500UL; @@ -891,7 +891,7 @@ mesh_index_pair location; do { - location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_NOZZLE_AS_REFERENCE, NULL); + location = find_closest_mesh_point_of_type(INVALID, rx, ry, USE_NOZZLE_AS_REFERENCE, nullptr); // It doesn't matter if the probe can't reach the NAN location. This is a manual probe. if (location.x_index < 0 && location.y_index < 0) continue; diff --git a/Marlin/src/feature/bltouch.cpp b/Marlin/src/feature/bltouch.cpp index 2e68835f39..6166b7d195 100644 --- a/Marlin/src/feature/bltouch.cpp +++ b/Marlin/src/feature/bltouch.cpp @@ -35,15 +35,33 @@ void stop(); #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" -void BLTouch::command(const BLTCommand cmd) { - //SERIAL_ECHOLNPAIR("BLTouch Command :", cmd); +bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) { + if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("BLTouch Command :", cmd); MOVE_SERVO(Z_PROBE_SERVO_NR, cmd); - safe_delay(BLTOUCH_DELAY); + safe_delay(MAX(ms, BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay + return triggered(); } void BLTouch::init() { - reset(); // Clear all BLTouch error conditions - stow(); + // This is called by marlin.cpp on initialization + // SET_5V_MODE (if enabled). OD_MODE is the default on power on. + // This mode will stay active until manual SET_OD_MODE or power cycle + #if ENABLED(BLTOUCH_FORCE_5V_MODE) + _set_5V_mode(); // Set 5V mode if explicitely demanded (V3 upwards) + #endif + _reset(); + _stow(); + // There really should be no alarm outstanding now, and no triggered condition. But if there is, + // there is no need to worry people here on init right at the start of the printer. +} + +void BLTouch::clear() { + _reset(); // RESET or RESET_SW will clear an alarm condition but... + // ...it will not clear a triggered condition in SW mode when the pin is currently up + // ANTClabs <-- CODE ERROR + _stow(); // STOW will pull up the pin and clear any triggered condition unless it fails, don't care + _deploy(); // DEPLOY to test the probe. Could fail, don't care + _stow(); // STOW to be ready for meaningful work. Could fail, don't care } bool BLTouch::triggered() { @@ -56,41 +74,92 @@ bool BLTouch::triggered() { ); } -bool BLTouch::set_deployed(const bool in_deploy) { - if (in_deploy && triggered()) { // If BLTouch says it's triggered - reset(); // try to reset it. - _deploy(); _stow(); // Deploy and stow to clear the "triggered" condition. - safe_delay(1500); // Wait for internal self-test to complete. - // (Measured completion time was 0.65 seconds - // after reset, deploy, and stow sequence) - if (triggered()) { // If it still claims to be triggered... - SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); - stop(); // punt! - return true; +bool BLTouch::deploy_proc() { + // Do a DEPLOY + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch DEPLOY requested"); + + // Attempt to DEPLOY, wait for DEPLOY_DELAY or ALARM + if (_deploy_query_alarm()) { + // The deploy might have failed or the probe is already triggered (nozzle too low?) + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch ALARM or TRIGGER after DEPLOY, recovering"); + + clear(); // Get the probe into start condition + + // Last attempt to DEPLOY + if (_deploy_query_alarm()) { + // The deploy might have failed or the probe is actually triggered (nozzle too low?) again + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch Recovery Failed"); + + SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action + stop(); // but it's not too bad, no need to kill, allow restart + + return true; // Tell our caller we goofed in case he cares to know } } - #if ENABLED(BLTOUCH_V3) - #if EITHER(BLTOUCH_FORCE_5V_MODE, ENDSTOPPULLUPS) \ - || ALL(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, ENDSTOPPULLUP_ZMIN) \ - || (USES_Z_MIN_PROBE_ENDSTOP && ENABLED(ENDSTOPPULLUP_ZMIN_PROBE)) - set_5V_mode(); // Assume 5V DC logic level if endstop pullup resistors are enabled - #elif true || ENABLED(BLTOUCH_FORCE_OPEN_DRAIN_MODE) - set_OD_mode(); - #endif - #endif + // Now the probe is ready to issue a 10ms pulse when the pin goes up. + // The trigger STOW (see motion.cpp for example) will pull up the probes pin as soon as the pulse + // is registered. - if (in_deploy) { - _deploy(); - #if ENABLED(BLTOUCH_V3) - set_SW_mode(); - #endif + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("bltouch.deploy_proc() end"); + + return false; // report success to caller +} + +bool BLTouch::stow_proc() { + // Do a STOW + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch STOW requested"); + + // A STOW will clear a triggered condition in the probe (10ms pulse). + // At the moment that we come in here, we might (pulse) or will (SW mode) see the trigger on the pin. + // So even though we know a STOW will be ignored if an ALARM condition is active, we will STOW. + // Note: If the probe is deployed AND in an ALARM condition, this STOW will not pull up the pin + // and the ALARM condition will still be there. --> ANTClabs should change this behavior maybe + + // Attempt to STOW, wait for STOW_DELAY or ALARM + if (_stow_query_alarm()) { + // The stow might have failed + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch ALARM or TRIGGER after STOW, recovering"); + + _reset(); // This RESET will then also pull up the pin. If it doesn't + // work and the pin is still down, there will no longer be + // an ALARM condition though. + // But one more STOW will catch that + // Last attempt to STOW + if (_stow_query_alarm()) { // so if there is now STILL an ALARM condition: + + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch Recovery Failed"); + + SERIAL_ERROR_MSG(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action + stop(); // but it's not too bad, no need to kill, allow restart + + return true; // Tell our caller we goofed in case he cares to know + } } - else _stow(); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("bltouch.set_deployed(", in_deploy, ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("bltouch.stow_proc() end"); - return false; + return false; // report success to caller +} + +bool BLTouch::status_proc() { + /** + * Return a TRUE for "YES, it is DEPLOYED" + * This function will ensure switch state is reset after execution + * This may change pin position in some scenarios, specifically + * if the pin has been triggered but not yet stowed. + */ + + if (DEBUGGING(LEVELING)) DEBUG_ECHOLN("BLTouch STATUS requested"); + + _set_SW_mode(); + const bool tr = triggered(); // If triggered in SW mode, the pin is up, it is STOWED + + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch is ", (int)tr); + + _reset(); // turn off the SW Mode + if (tr) _stow(); else _deploy(); // and reset any triggered signal, restore state + return !tr; } #endif // BLTOUCH diff --git a/Marlin/src/feature/bltouch.h b/Marlin/src/feature/bltouch.h index 553caa60ad..70fb22f717 100644 --- a/Marlin/src/feature/bltouch.h +++ b/Marlin/src/feature/bltouch.h @@ -26,37 +26,75 @@ // BLTouch commands are sent as servo angles typedef unsigned char BLTCommand; -#define BLTOUCH_DEPLOY 10 -#define BLTOUCH_SW_MODE 60 -#define BLTOUCH_STOW 90 -#define BLTOUCH_SELFTEST 120 -#define BLTOUCH_5V_MODE 140 -#define BLTOUCH_OD_MODE 150 -#define BLTOUCH_RESET 160 +#define BLTOUCH_DEPLOY 10 +#define BLTOUCH_SW_MODE 60 +#define BLTOUCH_STOW 90 +#define BLTOUCH_SELFTEST 120 +#define BLTOUCH_5V_MODE 140 +#define BLTOUCH_OD_MODE 150 +#define BLTOUCH_RESET 160 + +/** + * The following commands may require different delays. + * + * ANTClabs recommends 2000ms for 5V/OD commands. However it is + * not common for other commands to immediately follow these, + * and testing has shown that these complete in 500ms reliably. + * + * AntClabs recommends 750ms for Deploy/Stow, otherwise you will + * not catch an alarm state until the following move command. + */ + +#ifndef BLTOUCH_SET5V_DELAY + #define BLTOUCH_SET5V_DELAY BLTOUCH_DELAY +#endif +#ifndef BLTOUCH_SETOD_DELAY + #define BLTOUCH_SETOD_DELAY BLTOUCH_DELAY +#endif +#ifndef BLTOUCH_DEPLOY_DELAY + #define BLTOUCH_DEPLOY_DELAY 750 +#endif +#ifndef BLTOUCH_STOW_DELAY + #define BLTOUCH_STOW_DELAY 750 +#endif +#ifndef BLTOUCH_RESET_DELAY + #define BLTOUCH_RESET_DELAY BLTOUCH_DELAY +#endif class BLTouch { public: - static void init(); - static void command(const BLTCommand cmd); - static bool triggered(); + static bool triggered(); // used by menu_advanced.cpp + static void init(); // used by main.cpp - FORCE_INLINE static void reset() { command(BLTOUCH_RESET); } - FORCE_INLINE static void selftest() { command(BLTOUCH_SELFTEST); } + // DEPLOY and STOW are wrapped for error handling - these are used by homing and by probing + FORCE_INLINE static bool deploy() { return deploy_proc(); } + FORCE_INLINE static bool stow() { return stow_proc(); } + FORCE_INLINE static bool status() { return status_proc(); } - FORCE_INLINE static void set_5V_mode() { command(BLTOUCH_5V_MODE); } - FORCE_INLINE static void set_OD_mode() { command(BLTOUCH_OD_MODE); } - FORCE_INLINE static void set_SW_mode() { command(BLTOUCH_SW_MODE); } + // Native BLTouch commands ("Underscore"...), used in lcd menus and internally + FORCE_INLINE static void _reset() { command(BLTOUCH_RESET, BLTOUCH_RESET_DELAY); } - FORCE_INLINE static bool deploy() { return set_deployed(true); } - FORCE_INLINE static bool stow() { return set_deployed(false); } + FORCE_INLINE static void _selftest() { command(BLTOUCH_SELFTEST, BLTOUCH_DELAY); } - FORCE_INLINE static void _deploy() { command(BLTOUCH_DEPLOY); } - FORCE_INLINE static void _stow() { command(BLTOUCH_STOW); } + FORCE_INLINE static void _set_SW_mode() { command(BLTOUCH_SW_MODE, BLTOUCH_DELAY); } + FORCE_INLINE static void _set_5V_mode() { command(BLTOUCH_5V_MODE, BLTOUCH_SET5V_DELAY); } + FORCE_INLINE static void _set_OD_mode() { command(BLTOUCH_OD_MODE, BLTOUCH_SETOD_DELAY); } + + FORCE_INLINE static void _deploy() { command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); } + FORCE_INLINE static void _stow() { command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY); } private: - static bool set_deployed(const bool deploy); + FORCE_INLINE static bool _deploy_query_alarm() { return command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); } + FORCE_INLINE static bool _stow_query_alarm() { return command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY); } + + static void clear(); + static bool command(const BLTCommand cmd, const millis_t &ms); + static bool deploy_proc(); + static bool stow_proc(); + static bool status_proc(); }; +// Deploy/stow angles for use by servo.cpp / servo.h #define BLTOUCH_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW } extern BLTouch bltouch; diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp index f5f7cefc45..a194749913 100644 --- a/Marlin/src/feature/fwretract.cpp +++ b/Marlin/src/feature/fwretract.cpp @@ -103,7 +103,7 @@ void FWRetract::retract(const bool retracting // Prevent two swap-retract or recovers in a row #if EXTRUDERS > 1 - // Allow G10 S1 only after G10 + // Allow G10 S1 only after G11 if (swapping && retracted_swap[active_extruder] == retracting) return; // G11 priority to recover the long retract if activated if (!retracting) swapping = retracted_swap[active_extruder]; @@ -114,8 +114,8 @@ void FWRetract::retract(const bool retracting /* // debugging SERIAL_ECHOLNPAIR( "retracting ", retracting, - "swapping ", swapping - "active extruder ", active_extruder + " swapping ", swapping, + " active extruder ", active_extruder ); for (uint8_t i = 0; i < EXTRUDERS; ++i) { SERIAL_ECHOLNPAIR("retracted[", i, "] ", retracted[i]); diff --git a/Marlin/src/feature/host_actions.cpp b/Marlin/src/feature/host_actions.cpp index f15462195e..1154553e27 100644 --- a/Marlin/src/feature/host_actions.cpp +++ b/Marlin/src/feature/host_actions.cpp @@ -84,7 +84,7 @@ void host_action(const char * const pstr, const bool eol) { void host_action_prompt_button(const char * const pstr) { host_action_prompt_plus(PSTR("button"), pstr); } void host_action_prompt_end() { host_action_prompt(PSTR("end")); } void host_action_prompt_show() { host_action_prompt(PSTR("show")); } - void host_prompt_do(const PromptReason reason, const char * const pstr, const char * const pbtn/*=NULL*/) { + void host_prompt_do(const PromptReason reason, const char * const pstr, const char * const pbtn/*=nullptr*/) { host_prompt_reason = reason; host_action_prompt_end(); host_action_prompt_begin(pstr); diff --git a/Marlin/src/feature/host_actions.h b/Marlin/src/feature/host_actions.h index e6f77cb63c..149c47d819 100644 --- a/Marlin/src/feature/host_actions.h +++ b/Marlin/src/feature/host_actions.h @@ -21,7 +21,9 @@ */ #pragma once -#include "../inc/MarlinConfig.h" +#include "../inc/MarlinConfigPre.h" + +#include void host_action(const char * const pstr, const bool eol=true); @@ -62,8 +64,8 @@ void host_action(const char * const pstr, const bool eol=true); void host_action_prompt_button(const char * const pstr); void host_action_prompt_end(); void host_action_prompt_show(); - void host_prompt_do(const PromptReason type, const char * const pstr, const char * const pbtn=NULL); - inline void host_prompt_open(const PromptReason reason, const char * const pstr, const char * const pbtn=NULL) { + void host_prompt_do(const PromptReason type, const char * const pstr, const char * const pbtn=nullptr); + inline void host_prompt_open(const PromptReason reason, const char * const pstr, const char * const pbtn=nullptr) { if (host_prompt_reason == PROMPT_NOT_DEFINED) host_prompt_do(reason, pstr, pbtn); } diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index 98b26e29ce..21d1ee433e 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -132,7 +132,7 @@ void Mixer::init() { #endif } -void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=selected_vtool*/) { +void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*=selected_vtool*/, float (&c)[MIXING_STEPPERS]/*=collector*/) { float csum = 0, cmax = 0; MIXER_STEPPER_LOOP(i) { const float v = color[t][i]; @@ -142,8 +142,8 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*= //SERIAL_ECHOPAIR("Mixer::refresh_collector(", proportion, ", ", int(t), ") cmax=", cmax, " csum=", csum, " color"); const float inv_prop = proportion / csum; MIXER_STEPPER_LOOP(i) { - collector[i] = color[t][i] * inv_prop; - //SERIAL_ECHOPAIR(" [", int(t), "][", int(i), "] = ", int(color[t][i]), " (", collector[i], ") "); + c[i] = color[t][i] * inv_prop; + //SERIAL_ECHOPAIR(" [", int(t), "][", int(i), "] = ", int(color[t][i]), " (", c[i], ") "); } //SERIAL_EOL(); } diff --git a/Marlin/src/feature/mixing.h b/Marlin/src/feature/mixing.h index bb069c97d7..12bf091fd7 100644 --- a/Marlin/src/feature/mixing.h +++ b/Marlin/src/feature/mixing.h @@ -51,19 +51,19 @@ enum MixTool { FIRST_USER_VIRTUAL_TOOL = 0, LAST_USER_VIRTUAL_TOOL = MIXING_VIRTUAL_TOOLS - 1, NR_USER_VIRTUAL_TOOLS, - #ifdef RETRACT_SYNC_MIXING - MIXER_AUTORETRACT_TOOL = NR_USER_VIRTUAL_TOOLS, - NR_MIXING_VIRTUAL_TOOLS - #else - NR_MIXING_VIRTUAL_TOOLS = NR_USER_VIRTUAL_TOOLS + MIXER_DIRECT_SET_TOOL = NR_USER_VIRTUAL_TOOLS, + #if ENABLED(RETRACT_SYNC_MIXING) + MIXER_AUTORETRACT_TOOL, #endif + NR_MIXING_VIRTUAL_TOOLS }; -#ifdef RETRACT_SYNC_MIXING - static_assert(NR_MIXING_VIRTUAL_TOOLS <= 254, "MIXING_VIRTUAL_TOOLS must be <= 254!"); +#if ENABLED(RETRACT_SYNC_MIXING) + #define MAX_VTOOLS 254 #else - static_assert(NR_MIXING_VIRTUAL_TOOLS <= 255, "MIXING_VIRTUAL_TOOLS must be <= 255!"); + #define MAX_VTOOLS 255 #endif +static_assert(NR_MIXING_VIRTUAL_TOOLS <= MAX_VTOOLS, "MIXING_VIRTUAL_TOOLS must be <= " STRINGIFY(MAX_VTOOLS) "!"); #define MIXER_STEPPER_LOOP(VAR) \ for (uint_fast8_t VAR = 0; VAR < MIXING_STEPPERS; VAR++) @@ -100,7 +100,7 @@ class Mixer { static void init(); // Populate colors at boot time static void reset_vtools(); - static void refresh_collector(const float proportion=1.0, const uint8_t t=selected_vtool); + static void refresh_collector(const float proportion=1.0, const uint8_t t=selected_vtool, float (&c)[MIXING_STEPPERS]=collector); // Used up to Planner level FORCE_INLINE static void set_collector(const uint8_t c, const float f) { collector[c] = MAX(f, 0.0f); } diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 99dbb380e5..4ebc41028c 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -49,6 +49,10 @@ #include "host_actions.h" #endif +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extensible_ui/ui_api.h" +#endif + #include "../lcd/ultralcd.h" #include "../libs/buzzer.h" #include "../libs/nozzle.h" @@ -302,16 +306,22 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l */ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, const PauseMode mode/*=PAUSE_MODE_PAUSE_PRINT*/ + #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) + , const float &mix_multiplier/*=1.0*/ + #endif ) { #if !HAS_LCD_MENU UNUSED(show_lcd); #endif + #if !BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) + constexpr float mix_multiplier = 1.0; + #endif + if (!ensure_safe_temperature(mode)) { #if HAS_LCD_MENU if (show_lcd) lcd_pause_show_message(PAUSE_MESSAGE_STATUS); #endif - return false; } @@ -320,13 +330,14 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, #endif // Retract filament - do_pause_e_move(-FILAMENT_UNLOAD_RETRACT_LENGTH, PAUSE_PARK_RETRACT_FEEDRATE); + do_pause_e_move(-(FILAMENT_UNLOAD_RETRACT_LENGTH) * mix_multiplier, (PAUSE_PARK_RETRACT_FEEDRATE) * mix_multiplier); // Wait for filament to cool safe_delay(FILAMENT_UNLOAD_DELAY); // Quickly purge - do_pause_e_move(FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH, planner.settings.max_feedrate_mm_s[E_AXIS]); + do_pause_e_move((FILAMENT_UNLOAD_RETRACT_LENGTH + FILAMENT_UNLOAD_PURGE_LENGTH) * mix_multiplier, + planner.settings.max_feedrate_mm_s[E_AXIS] * mix_multiplier); // Unload filament #if FILAMENT_CHANGE_UNLOAD_ACCEL > 0 @@ -334,7 +345,7 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, planner.settings.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL; #endif - do_pause_e_move(unload_length, FILAMENT_CHANGE_UNLOAD_FEEDRATE); + do_pause_e_move(unload_length * mix_multiplier, (FILAMENT_CHANGE_UNLOAD_FEEDRATE) * mix_multiplier); #if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0 planner.settings.retract_acceleration = saved_acceleration; @@ -417,6 +428,10 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u // Wait for buffered blocks to complete planner.synchronize(); + #if ENABLED(ADVANCED_PAUSE_FANS_PAUSE) && FAN_COUNT > 0 + thermalManager.set_fans_paused(true); + #endif + // Initial retract before move to filament change position if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE); @@ -527,6 +542,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheating")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onStatusChanged(PSTR("Reheating...")); + #endif // Re-enable the heaters if they timed out HOTEND_LOOP() thermalManager.reset_heater_idle_timer(e); @@ -544,6 +562,9 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep #if ENABLED(HOST_PROMPT_SUPPORT) host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), PSTR("Continue")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onUserConfirmRequired("Reheat finished."); + #endif wait_for_user = true; nozzle_timed_out = false; @@ -653,6 +674,10 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le } #endif + #if ENABLED(ADVANCED_PAUSE_FANS_PAUSE) && FAN_COUNT > 0 + thermalManager.set_fans_paused(false); + #endif + // Resume the print job timer if it was running if (print_job_timer.isPaused()) print_job_timer.start(); diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h index 8a0653b2bd..36a2a2cc0c 100644 --- a/Marlin/src/feature/pause.h +++ b/Marlin/src/feature/pause.h @@ -92,6 +92,10 @@ void resume_print(const float &slow_load_length=0, const float &fast_load_length bool load_filament(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, const bool show_lcd=false, const bool pause_for_user=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT DXC_PARAMS); -bool unload_filament(const float &unload_length, const bool show_lcd=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT); +bool unload_filament(const float &unload_length, const bool show_lcd=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT + #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) + , const float &mix_multiplier=1.0 + #endif +); #endif // ADVANCED_PAUSE_FEATURE diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index eed52634f1..2fd62d840f 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -50,6 +50,10 @@ bool Power::is_power_needed() { if (controllerfan_speed) return true; #endif + #if ENABLED(AUTO_POWER_CHAMBER_FAN) + if (thermalManager.chamberfan_speed) return true; + #endif + // If any of the drivers or the bed are enabled... if (X_ENABLE_READ == X_ENABLE_ON || Y_ENABLE_READ == Y_ENABLE_ON || Z_ENABLE_READ == Z_ENABLE_ON #if HAS_HEATED_BED diff --git a/Marlin/src/feature/power_loss_recovery.cpp b/Marlin/src/feature/power_loss_recovery.cpp index 0b9dba43fd..9ef681c639 100644 --- a/Marlin/src/feature/power_loss_recovery.cpp +++ b/Marlin/src/feature/power_loss_recovery.cpp @@ -55,6 +55,13 @@ job_recovery_info_t PrintJobRecovery::info; PrintJobRecovery recovery; +#ifndef POWER_LOSS_PURGE_LEN + #define POWER_LOSS_PURGE_LEN 0 +#endif +#ifndef POWER_LOSS_RETRACT_LEN + #define POWER_LOSS_RETRACT_LEN 0 +#endif + /** * Clear the recovery info */ @@ -126,6 +133,10 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*= millis_t ms = millis(); #endif + #ifndef POWER_LOSS_MIN_Z_CHANGE + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // Vase-mode-friendly out of the box + #endif + // Did Z change since the last call? if (force #if DISABLED(SAVE_EACH_CMD_MODE) // Always save state when enabled @@ -135,8 +146,8 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*= #if SAVE_INFO_INTERVAL_MS > 0 // Save if interval is elapsed || ELAPSED(ms, next_save_ms) #endif - // Save every time Z is higher than the last call - || current_position[Z_AXIS] > info.current_position[Z_AXIS] + // Save if Z is above the last-saved position by some minimum height + || current_position[Z_AXIS] > info.current_position[Z_AXIS] + POWER_LOSS_MIN_Z_CHANGE #endif ) { @@ -228,9 +239,8 @@ void PrintJobRecovery::write() { open(false); file.seekSet(0); const int16_t ret = file.write(&info, sizeof(info)); - close(); - if (ret == -1) DEBUG_ECHOLNPGM("Power-loss file write failed."); + if (!file.close()) DEBUG_ECHOLNPGM("Power-loss file close failed."); } /** @@ -337,8 +347,9 @@ void PrintJobRecovery::resume() { //gcode.process_subcommands_now(cmd); gcode.process_subcommands_now_P(PSTR("G1 E" STRINGIFY(POWER_LOSS_PURGE_LEN) " F200")); #endif + #if POWER_LOSS_RETRACT_LEN - sprintf_P(cmd, PSTR("G1 E%d F3000"), POWER_LOSS_PURGE_LEN - POWER_LOSS_RETRACT_LEN); + sprintf_P(cmd, PSTR("G1 E%d F3000"), POWER_LOSS_PURGE_LEN - (POWER_LOSS_RETRACT_LEN)); gcode.process_subcommands_now(cmd); #endif @@ -392,7 +403,6 @@ void PrintJobRecovery::resume() { // Resume the SD file from the last position char *fn = info.sd_filename; - while (*fn == '/') fn++; sprintf_P(cmd, PSTR("M23 %s"), fn); gcode.process_subcommands_now(cmd); sprintf_P(cmd, PSTR("M24 S%ld T%ld"), info.sdpos, info.print_job_elapsed); diff --git a/Marlin/src/feature/power_loss_recovery.h b/Marlin/src/feature/power_loss_recovery.h index 68554dc602..5e6c7e572b 100644 --- a/Marlin/src/feature/power_loss_recovery.h +++ b/Marlin/src/feature/power_loss_recovery.h @@ -32,11 +32,9 @@ #include "../feature/mixing.h" #endif -#define SAVE_INFO_INTERVAL_MS 0 -//#define SAVE_EACH_CMD_MODE //#define DEBUG_POWER_LOSS_RECOVERY -#define POWER_LOSS_PURGE_LEN 20 -#define POWER_LOSS_RETRACT_LEN 10 +//#define SAVE_EACH_CMD_MODE +//#define SAVE_INFO_INTERVAL_MS 0 typedef struct { uint8_t valid_head; diff --git a/Marlin/src/feature/prusa_MMU2/mmu2.cpp b/Marlin/src/feature/prusa_MMU2/mmu2.cpp index 7d0e6fcfda..b3eb60bf5e 100644 --- a/Marlin/src/feature/prusa_MMU2/mmu2.cpp +++ b/Marlin/src/feature/prusa_MMU2/mmu2.cpp @@ -202,19 +202,19 @@ void MMU2::mmu_loop() { } break; + #if ENABLED(MMU2_MODE_12V) case -5: // response to M1 if (rx_ok()) { DEBUG_ECHOLNPGM("MMU => ok"); - check_version(); - DEBUG_ECHOLNPGM("MMU <= 'P0'"); tx_str_P(PSTR("P0\n")); // read finda state = -4; } break; + #endif case -4: if (rx_ok()) { @@ -302,7 +302,7 @@ void MMU2::mmu_loop() { if (!finda && finda_runout_valid) filament_runout(); } - else if (ELAPSED(millis(), last_request + MMU_P0_TIMEOUT)) // Resend request after timeout (30s) + else if (ELAPSED(millis(), last_request + MMU_P0_TIMEOUT)) // Resend request after timeout (3s) state = 1; break; diff --git a/Marlin/src/feature/runout.cpp b/Marlin/src/feature/runout.cpp index 9395dec5b4..e319a7cc2f 100644 --- a/Marlin/src/feature/runout.cpp +++ b/Marlin/src/feature/runout.cpp @@ -51,7 +51,7 @@ void FilamentSensorBase::filament_present(const uint8_t extruder) { uint8_t FilamentSensorEncoder::motion_detected; #endif -#if FILAMENT_RUNOUT_DISTANCE_MM > 0 +#ifdef FILAMENT_RUNOUT_DISTANCE_MM float RunoutResponseDelayed::runout_distance_mm = FILAMENT_RUNOUT_DISTANCE_MM; volatile float RunoutResponseDelayed::runout_mm_countdown[EXTRUDERS]; #else diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 3f1e5fa018..7e39f90c9e 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -41,6 +41,9 @@ #endif //#define FILAMENT_RUNOUT_SENSOR_DEBUG +#ifndef FILAMENT_RUNOUT_THRESHOLD + #define FILAMENT_RUNOUT_THRESHOLD 5 +#endif class FilamentMonitorBase { public: @@ -78,6 +81,11 @@ class TFilamentMonitor : public FilamentMonitorBase { response.filament_present(extruder); } + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + static inline float& runout_distance() { return response.runout_distance_mm; } + static inline void set_runout_distance(const float &mm) { response.runout_distance_mm = mm; } + #endif + // Handle a block completion. RunoutResponseDelayed uses this to // add up the length of filament moved while the filament is out. static inline void block_completed(const block_t* const b) { @@ -90,13 +98,13 @@ class TFilamentMonitor : public FilamentMonitorBase { // Give the response a chance to update its counter. static inline void run() { if (enabled && !filament_ran_out && (IS_SD_PRINTING() || print_job_timer.isRunning() || did_pause_print)) { - #if FILAMENT_RUNOUT_DISTANCE_MM > 0 + #ifdef FILAMENT_RUNOUT_DISTANCE_MM cli(); // Prevent RunoutResponseDelayed::block_completed from accumulating here #endif response.run(); sensor.run(); const bool ran_out = response.has_run_out(); - #if FILAMENT_RUNOUT_DISTANCE_MM > 0 + #ifdef FILAMENT_RUNOUT_DISTANCE_MM sei(); #endif if (ran_out) { @@ -272,7 +280,7 @@ class FilamentSensorBase { /********************************* RESPONSE TYPE *********************************/ -#if FILAMENT_RUNOUT_DISTANCE_MM > 0 +#ifdef FILAMENT_RUNOUT_DISTANCE_MM // RunoutResponseDelayed triggers a runout event only if the length // of filament specified by FILAMENT_RUNOUT_DISTANCE_MM has been fed @@ -332,11 +340,11 @@ class FilamentSensorBase { class RunoutResponseDebounced { private: - static constexpr int8_t runout_threshold = 5; + static constexpr int8_t runout_threshold = FILAMENT_RUNOUT_THRESHOLD; static int8_t runout_count; public: static inline void reset() { runout_count = runout_threshold; } - static inline void run() { runout_count--; } + static inline void run() { if (runout_count >= 0) runout_count--; } static inline bool has_run_out() { return runout_count < 0; } static inline void block_completed(const block_t* const b) { UNUSED(b); } static inline void filament_present(const uint8_t extruder) { runout_count = runout_threshold; UNUSED(extruder); } @@ -347,11 +355,12 @@ class FilamentSensorBase { /********************************* TEMPLATE SPECIALIZATION *********************************/ typedef TFilamentMonitor< - #if FILAMENT_RUNOUT_DISTANCE_MM > 0 + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + RunoutResponseDelayed, #if ENABLED(FILAMENT_MOTION_SENSOR) - RunoutResponseDelayed, FilamentSensorEncoder + FilamentSensorEncoder #else - RunoutResponseDelayed, FilamentSensorSwitch + FilamentSensorSwitch #endif #else RunoutResponseDebounced, FilamentSensorSwitch diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index ff477818fe..86f9222c58 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -85,12 +85,15 @@ #endif static TMC_driver_data get_driver_data(TMC2130Stepper &st) { - constexpr uint16_t SG_RESULT_bm = 0x3FF; // 0:9 - constexpr uint8_t STEALTH_bp = 14, CS_ACTUAL_sb = 16; - constexpr uint32_t CS_ACTUAL_bm = 0x1F0000; // 16:20 - constexpr uint8_t STALL_GUARD_bp = 24, OT_bp = 25, OTPW_bp = 26; + constexpr uint8_t OT_bp = 25, OTPW_bp = 26; constexpr uint32_t S2G_bm = 0x18000000; - constexpr uint8_t STST_bp = 31; + #if ENABLED(TMC_DEBUG) + constexpr uint16_t SG_RESULT_bm = 0x3FF; // 0:9 + constexpr uint8_t STEALTH_bp = 14; + constexpr uint32_t CS_ACTUAL_bm = 0x1F0000; // 16:20 + constexpr uint8_t STALL_GUARD_bp = 24; + constexpr uint8_t STST_bp = 31; + #endif TMC_driver_data data; data.drv_status = st.DRV_STATUS(); #ifdef __AVR__ @@ -112,13 +115,13 @@ data.is_standstill = !!(spart & _BV(STST_bp - 24)); data.sg_result_reasonable = !data.is_standstill; // sg_result has no reasonable meaning while standstill #endif - UNUSED(CS_ACTUAL_sb); #else // !__AVR__ data.is_ot = !!(data.drv_status & _BV(OT_bp)); data.is_otpw = !!(data.drv_status & _BV(OTPW_bp)); data.is_s2g = !!(data.drv_status & S2G_bm); #if ENABLED(TMC_DEBUG) + constexpr uint8_t CS_ACTUAL_sb = 16; data.sg_result = data.drv_status & SG_RESULT_bm; data.is_stealth = !!(data.drv_status & _BV(STEALTH_bp)); data.cs_actual = (data.drv_status & CS_ACTUAL_bm) >> CS_ACTUAL_sb; @@ -143,15 +146,14 @@ static TMC_driver_data get_driver_data(TMC2208Stepper &st) { constexpr uint8_t OTPW_bp = 0, OT_bp = 1; constexpr uint8_t S2G_bm = 0b11110; // 2..5 - constexpr uint8_t CS_ACTUAL_sb = 16; - constexpr uint32_t CS_ACTUAL_bm = 0x1F0000; // 16:20 - constexpr uint8_t STEALTH_bp = 30, STST_bp = 31; TMC_driver_data data; data.drv_status = st.DRV_STATUS(); data.is_otpw = !!(data.drv_status & _BV(OTPW_bp)); data.is_ot = !!(data.drv_status & _BV(OT_bp)); data.is_s2g = !!(data.drv_status & S2G_bm); #if ENABLED(TMC_DEBUG) + constexpr uint32_t CS_ACTUAL_bm = 0x1F0000; // 16:20 + constexpr uint8_t STEALTH_bp = 30, STST_bp = 31; #ifdef __AVR__ // 8-bit optimization saves up to 12 bytes of PROGMEM per axis uint8_t spart = data.drv_status >> 16; @@ -159,8 +161,8 @@ spart = data.drv_status >> 24; data.is_stealth = !!(spart & _BV(STEALTH_bp - 24)); data.is_standstill = !!(spart & _BV(STST_bp - 24)); - UNUSED(CS_ACTUAL_sb); #else + constexpr uint8_t CS_ACTUAL_sb = 16; data.cs_actual = (data.drv_status & CS_ACTUAL_bm) >> CS_ACTUAL_sb; data.is_stealth = !!(data.drv_status & _BV(STEALTH_bp)); data.is_standstill = !!(data.drv_status & _BV(STST_bp)); @@ -181,11 +183,8 @@ #endif static TMC_driver_data get_driver_data(TMC2660Stepper &st) { - constexpr uint8_t STALL_GUARD_bp = 0; constexpr uint8_t OT_bp = 1, OTPW_bp = 2; constexpr uint8_t S2G_bm = 0b11000; - constexpr uint8_t STST_bp = 7, SG_RESULT_sp = 10; - constexpr uint32_t SG_RESULT_bm = 0xFFC00; // 10:19 TMC_driver_data data; data.drv_status = st.DRVSTATUS(); uint8_t spart = data.drv_status & 0xFF; @@ -193,6 +192,9 @@ data.is_ot = !!(spart & _BV(OT_bp)); data.is_s2g = !!(data.drv_status & S2G_bm); #if ENABLED(TMC_DEBUG) + constexpr uint8_t STALL_GUARD_bp = 0; + constexpr uint8_t STST_bp = 7, SG_RESULT_sp = 10; + constexpr uint32_t SG_RESULT_bm = 0xFFC00; // 10:19 data.is_stall = !!(spart & _BV(STALL_GUARD_bp)); data.is_standstill = !!(spart & _BV(STST_bp)); data.sg_result = (data.drv_status & SG_RESULT_bm) >> SG_RESULT_sp; @@ -793,7 +795,9 @@ #endif TMC_REPORT("CS actual\t", TMC_CS_ACTUAL); TMC_REPORT("PWM scale", TMC_PWM_SCALE); - TMC_REPORT("vsense\t", TMC_VSENSE); + #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC2224) || HAS_DRIVER(TMC2660) || HAS_DRIVER(TMC2208) + TMC_REPORT("vsense\t", TMC_VSENSE); + #endif TMC_REPORT("stealthChop", TMC_STEALTHCHOP); TMC_REPORT("msteps\t", TMC_MICROSTEPS); TMC_REPORT("tstep\t", TMC_TSTEP); diff --git a/Marlin/src/feature/twibus.cpp b/Marlin/src/feature/twibus.cpp index 826b714167..ecd03bcde5 100644 --- a/Marlin/src/feature/twibus.cpp +++ b/Marlin/src/feature/twibus.cpp @@ -162,7 +162,7 @@ void TWIBus::flush() { echodata(bytes, PSTR("i2c-receive"), 0); } - void TWIBus::reply(char str[]/*=NULL*/) { + void TWIBus::reply(char str[]/*=nullptr*/) { #if ENABLED(DEBUG_TWIBUS) debug(PSTR("reply"), str); #endif diff --git a/Marlin/src/feature/twibus.h b/Marlin/src/feature/twibus.h index 9dcc86b7be..a2ff67f5e7 100644 --- a/Marlin/src/feature/twibus.h +++ b/Marlin/src/feature/twibus.h @@ -217,7 +217,7 @@ class TWIBus { * @details Send the buffer and clear it. * If a string is passed, write it into the buffer first. */ - void reply(char str[]=NULL); + void reply(char str[]=nullptr); inline void reply(const char str[]) { this->reply((char*)str); } #endif diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index cdc2b7478e..c847141873 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -87,7 +87,7 @@ * D Disable Disable the Unified Bed Leveling System. In the normal case the user is invoking this * command to see how well a Mesh as been adjusted to match a print surface. In order to do * this the Unified Bed Leveling System is turned on by the G26 command. The D parameter - * alters the command's normal behaviour and disables the Unified Bed Leveling System even if + * alters the command's normal behavior and disables the Unified Bed Leveling System even if * it is on. * * H # Hotend Set the Nozzle Temperature. If not specified, a default of 205 C. will be assumed. @@ -131,7 +131,7 @@ * U # Random Randomize the order that the circles are drawn on the bed. The search for the closest * un-drawn circle is still done. But the distance to the location for each circle has a * random number of the specified size added to it. Specifying S50 will give an interesting - * deviation from the normal behaviour on a 10 x 10 Mesh. + * deviation from the normal behavior on a 10 x 10 Mesh. * * X # X Coord. Specify the starting location of the drawing activity. * diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index 28730f3b4f..3ce43b2fef 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -185,7 +185,6 @@ void GcodeSuite::M420() { ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y)); #endif } - #if ENABLED(ABL_BILINEAR_SUBDIVISION) bed_level_virt_interpolate(); #endif diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index f6caae4c88..22cc0c1754 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -51,6 +51,10 @@ #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../../../core/debug_out.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../../../lcd/extensible_ui/ui_api.h" +#endif + #if ABL_GRID #if ENABLED(PROBE_Y_FIRST) #define PR_OUTER_VAR xCount @@ -71,10 +75,6 @@ #define G29_RETURN(b) return; #endif -#if ENABLED(EXTENSIBLE_UI) - #include "../../../lcd/extensible_ui/ui_api.h" -#endif - /** * G29: Detailed Z probe, probes the bed at 3 or more points. * Will fail if the printer has not been homed with G28. diff --git a/Marlin/src/gcode/bedlevel/ubl/M421.cpp b/Marlin/src/gcode/bedlevel/ubl/M421.cpp index 1bb34eafa2..7b0df675ff 100644 --- a/Marlin/src/gcode/bedlevel/ubl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/ubl/M421.cpp @@ -55,7 +55,7 @@ void GcodeSuite::M421() { hasQ = !hasZ && parser.seen('Q'); if (hasC) { - const mesh_index_pair location = ubl.find_closest_mesh_point_of_type(REAL, current_position[X_AXIS], current_position[Y_AXIS], USE_NOZZLE_AS_REFERENCE, NULL); + const mesh_index_pair location = ubl.find_closest_mesh_point_of_type(REAL, current_position[X_AXIS], current_position[Y_AXIS], USE_NOZZLE_AS_REFERENCE, nullptr); ix = location.x_index; iy = location.y_index; } diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 36550a7bd7..66fa800169 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -112,8 +112,7 @@ void GcodeSuite::G34() { #endif #if ENABLED(BLTOUCH) - bltouch.reset(); - bltouch.stow(); + bltouch.init(); #endif // Always home with tool 0 active diff --git a/Marlin/src/gcode/calibrate/G425.cpp b/Marlin/src/gcode/calibrate/G425.cpp index 1174fc38f8..fd854bf77d 100644 --- a/Marlin/src/gcode/calibrate/G425.cpp +++ b/Marlin/src/gcode/calibrate/G425.cpp @@ -31,6 +31,7 @@ #include "../../module/tool_change.h" #include "../../module/endstops.h" #include "../../feature/bedlevel/bedlevel.h" +#include "../../feature/backlash.h" /** @@ -55,11 +56,6 @@ #define HAS_X_CENTER BOTH(CALIBRATION_MEASURE_LEFT, CALIBRATION_MEASURE_RIGHT) #define HAS_Y_CENTER BOTH(CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK) -#if ENABLED(BACKLASH_GCODE) - extern float backlash_distance_mm[], backlash_smoothing_mm; - extern uint8_t backlash_correction; -#endif - enum side_t : uint8_t { TOP, RIGHT, FRONT, LEFT, BACK, NUM_SIDES }; struct measurements_t { @@ -79,13 +75,13 @@ struct measurements_t { #define TEMPORARY_SOFT_ENDSTOP_STATE(enable) REMEMBER(tes, soft_endstops_enabled, enable); #if ENABLED(BACKLASH_GCODE) - #define TEMPORARY_BACKLASH_CORRECTION(value) REMEMBER(tbst, backlash_correction, value) + #define TEMPORARY_BACKLASH_CORRECTION(value) REMEMBER(tbst, backlash.correction, value) #else #define TEMPORARY_BACKLASH_CORRECTION(value) #endif #if ENABLED(BACKLASH_GCODE) && defined(BACKLASH_SMOOTHING_MM) - #define TEMPORARY_BACKLASH_SMOOTHING(value) REMEMBER(tbsm, backlash_smoothing_mm, value) + #define TEMPORARY_BACKLASH_SMOOTHING(value) REMEMBER(tbsm, backlash.smoothing_mm, value) #else #define TEMPORARY_BACKLASH_SMOOTHING(value) #endif @@ -209,7 +205,7 @@ float measuring_movement(const AxisEnum axis, const int dir, const bool stop_sta * axis in - Axis along which the measurement will take place * dir in - Direction along that axis (-1 or 1) * stop_state in - Move until probe pin becomes this value - * backlash_ptr in/out - When not NULL, measure and record axis backlash + * backlash_ptr in/out - When not nullptr, measure and record axis backlash * uncertainty in - If uncertainty is CALIBRATION_MEASUREMENT_UNKNOWN, do a fast probe. */ inline float measure(const AxisEnum axis, const int dir, const bool stop_state, float * const backlash_ptr, const float uncertainty) { @@ -454,22 +450,22 @@ inline void calibrate_backlash(measurements_t &m, const float uncertainty) { #if ENABLED(BACKLASH_GCODE) #if HAS_X_CENTER - backlash_distance_mm[X_AXIS] = (m.backlash[LEFT] + m.backlash[RIGHT]) / 2; + backlash.distance_mm[X_AXIS] = (m.backlash[LEFT] + m.backlash[RIGHT]) / 2; #elif ENABLED(CALIBRATION_MEASURE_LEFT) - backlash_distance_mm[X_AXIS] = m.backlash[LEFT]; + backlash.distance_mm[X_AXIS] = m.backlash[LEFT]; #elif ENABLED(CALIBRATION_MEASURE_RIGHT) - backlash_distance_mm[X_AXIS] = m.backlash[RIGHT]; + backlash.distance_mm[X_AXIS] = m.backlash[RIGHT]; #endif #if HAS_Y_CENTER - backlash_distance_mm[Y_AXIS] = (m.backlash[FRONT] + m.backlash[BACK]) / 2; + backlash.distance_mm[Y_AXIS] = (m.backlash[FRONT] + m.backlash[BACK]) / 2; #elif ENABLED(CALIBRATION_MEASURE_FRONT) - backlash_distance_mm[Y_AXIS] = m.backlash[FRONT]; + backlash.distance_mm[Y_AXIS] = m.backlash[FRONT]; #elif ENABLED(CALIBRATION_MEASURE_BACK) - backlash_distance_mm[Y_AXIS] = m.backlash[BACK]; + backlash.distance_mm[Y_AXIS] = m.backlash[BACK]; #endif - backlash_distance_mm[Z_AXIS] = m.backlash[TOP]; + backlash.distance_mm[Z_AXIS] = m.backlash[TOP]; #endif } diff --git a/Marlin/src/gcode/calibrate/M100.cpp b/Marlin/src/gcode/calibrate/M100.cpp index 30c5368106..eed7800976 100644 --- a/Marlin/src/gcode/calibrate/M100.cpp +++ b/Marlin/src/gcode/calibrate/M100.cpp @@ -50,7 +50,7 @@ * * Also, there are two support functions that can be called from a developer's C code. * - * uint16_t check_for_free_memory_corruption(PGM_P const ptr); + * uint16_t check_for_free_memory_corruption(PGM_P const free_memory_start); * void M100_dump_routine(PGM_P const title, const char *start, const char *end); * * Initial version by Roxy-3D @@ -60,16 +60,57 @@ #define TEST_BYTE ((char) 0xE5) -extern char* __brkval; -extern size_t __heap_start, __heap_end, __flp; -extern char __bss_end; +#if defined(__AVR__) || IS_32BIT_TEENSY + + extern char __bss_end; + char* end_bss = &__bss_end; + char* free_memory_start = end_bss; + + + char* free_memory_end = 0; + char* stacklimit = 0; + char* heaplimit = 0; + + #define MEMORY_END_CORRECTION 0 + +#elif defined(TARGET_LPC1768) + + extern char __bss_end__; + extern char __StackLimit; + extern char __HeapLimit; + + char* end_bss = &__bss_end__; + char* stacklimit = &__StackLimit; + char* heaplimit = &__HeapLimit ; + + #define MEMORY_END_CORRECTION 0x200 + + char* free_memory_start = heaplimit; + char* free_memory_end = stacklimit - MEMORY_END_CORRECTION; + + +#elif defined(__SAM3X8E__) + + extern char _ebss; + + char* end_bss = &_ebss; + + char* free_memory_start = end_bss; + + char* free_memory_end = 0; + char* stacklimit = 0; + char* heaplimit = 0; + + #define MEMORY_END_CORRECTION 0x10000 // need to stay well below 0x20080000 or M100 F crashes + +#else + #error "M100 - unsupported CPU" +#endif // // Utility functions // -#define END_OF_HEAP() (__brkval ? __brkval : &__bss_end) - // Location of a variable on its stack frame. Returns a value above // the stack (once the function returns to the caller). char* top_of_stack() { @@ -78,9 +119,9 @@ char* top_of_stack() { } // Count the number of test bytes at the specified location. -inline int32_t count_test_bytes(const char * const ptr) { +inline int32_t count_test_bytes(const char * const start_free_memory) { for (uint32_t i = 0; i < 32000; i++) - if (char(ptr[i]) != TEST_BYTE) + if (char(start_free_memory[i]) != TEST_BYTE) return i - 1; return -1; @@ -93,35 +134,35 @@ inline int32_t count_test_bytes(const char * const ptr) { #if ENABLED(M100_FREE_MEMORY_DUMPER) /** * M100 D - * Dump the free memory block from __brkval to the stack pointer. + * Dump the free memory block from brkval to the stack pointer. * malloc() eats memory from the start of the block and the stack grows * up from the bottom of the block. Solid test bytes indicate nothing has * used that memory yet. There should not be anything but test bytes within * the block. If so, it may indicate memory corruption due to a bad pointer. * Unexpected bytes are flagged in the right column. */ - inline void dump_free_memory(const char *ptr, const char *sp) { + inline void dump_free_memory(const char *start_free_memory, const char *end_free_memory) { // // Start and end the dump on a nice 16 byte boundary // (even though the values are not 16-byte aligned). // - ptr = (char*)((ptr_int_t)((uint32_t)ptr & 0xFFFFFFF0)); // Align to 16-byte boundary - sp = (char*)((ptr_int_t)((uint32_t)sp | 0x0000000F)); // Align sp to the 15th byte (at or above sp) + start_free_memory = (char*)((ptr_int_t)((uint32_t)start_free_memory & 0xFFFFFFF0)); // Align to 16-byte boundary + end_free_memory = (char*)((ptr_int_t)((uint32_t)end_free_memory | 0x0000000F)); // Align end_free_memory to the 15th byte (at or above end_free_memory) // Dump command main loop - while (ptr < sp) { - print_hex_address(ptr); // Print the address + while (start_free_memory < end_free_memory) { + print_hex_address(start_free_memory); // Print the address SERIAL_CHAR(':'); for (uint8_t i = 0; i < 16; i++) { // and 16 data bytes if (i == 8) SERIAL_CHAR('-'); - print_hex_byte(ptr[i]); + print_hex_byte(start_free_memory[i]); SERIAL_CHAR(' '); } serial_delay(25); SERIAL_CHAR('|'); // Point out non test bytes for (uint8_t i = 0; i < 16; i++) { - char ccc = (char)ptr[i]; // cast to char before automatically casting to char on assignment, in case the compiler is broken - if (&ptr[i] >= (const char*)command_queue && &ptr[i] < (const char*)(command_queue + sizeof(command_queue))) { // Print out ASCII in the command buffer area + char ccc = (char)start_free_memory[i]; // cast to char before automatically casting to char on assignment, in case the compiler is broken + if (&start_free_memory[i] >= (const char*)command_queue && &start_free_memory[i] < (const char*)(command_queue + sizeof(command_queue))) { // Print out ASCII in the command buffer area if (!WITHIN(ccc, ' ', 0x7E)) ccc = ' '; } else { // If not in the command buffer area, flag bytes that don't match the test byte @@ -130,7 +171,7 @@ inline int32_t count_test_bytes(const char * const ptr) { SERIAL_CHAR(ccc); } SERIAL_EOL(); - ptr += 16; + start_free_memory += 16; serial_delay(25); idle(); } @@ -143,7 +184,7 @@ inline int32_t count_test_bytes(const char * const ptr) { // Round the start and end locations to produce full lines of output // start = (char*)((ptr_int_t)((uint32_t)start & 0xFFFFFFF0)); // Align to 16-byte boundary - end = (char*)((ptr_int_t)((uint32_t)end | 0x0000000F)); // Align sp to the 15th byte (at or above sp) + end = (char*)((ptr_int_t)((uint32_t)end | 0x0000000F)); // Align end_free_memory to the 15th byte (at or above end_free_memory) dump_free_memory(start, end); } @@ -152,17 +193,15 @@ inline int32_t count_test_bytes(const char * const ptr) { inline int check_for_free_memory_corruption(PGM_P const title) { serialprintPGM(title); - char *ptr = END_OF_HEAP(), *sp = top_of_stack(); - int n = sp - ptr; + char *start_free_memory = free_memory_start, *end_free_memory = free_memory_end; + int n = end_free_memory - start_free_memory; SERIAL_ECHOPAIR("\nfmc() n=", n); - SERIAL_ECHOPAIR("\n&__brkval: ", hex_address(&__brkval)); - SERIAL_ECHOPAIR("=", hex_address(__brkval)); - SERIAL_ECHOPAIR("\n__bss_end: ", hex_address(&__bss_end)); - SERIAL_ECHOPAIR(" sp=", hex_address(sp)); + SERIAL_ECHOPAIR("\nfree_memory_start=", hex_address(free_memory_start)); + SERIAL_ECHOLNPAIR(" end_free_memory=", hex_address(end_free_memory)); - if (sp < ptr) { - SERIAL_ECHOPGM(" sp < Heap "); + if (end_free_memory < start_free_memory) { + SERIAL_ECHOPGM(" end_free_memory < Heap "); // SET_INPUT_PULLUP(63); // if the developer has a switch wired up to their controller board // safe_delay(5); // this code can be enabled to pause the display as soon as the // while ( READ(63)) // malfunction is detected. It is currently defaulting to a switch @@ -172,29 +211,29 @@ inline int check_for_free_memory_corruption(PGM_P const title) { // idle(); serial_delay(20); #if ENABLED(M100_FREE_MEMORY_DUMPER) - M100_dump_routine(PSTR(" Memory corruption detected with sp 8) { // SERIAL_ECHOPAIR("Found ", j); - // SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(ptr + i)); + // SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(start_free_memory + i)); i += j; block_cnt++; SERIAL_ECHOPAIR(" (", block_cnt); SERIAL_ECHOPAIR(") found=", j); - SERIAL_ECHOPGM(" "); + SERIAL_ECHOLNPGM(" "); } } } SERIAL_ECHOPAIR(" block_found=", block_cnt); - if (block_cnt != 1 || __brkval != NULL) + if (block_cnt != 1) SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area."); if (block_cnt == 0) // Make sure the special case of no free blocks shows up as an @@ -215,12 +254,12 @@ inline int check_for_free_memory_corruption(PGM_P const title) { * Return the number of free bytes in the memory pool, * with other vital statistics defining the pool. */ -inline void free_memory_pool_report(char * const ptr, const int32_t size) { +inline void free_memory_pool_report(char * const start_free_memory, const int32_t size) { int32_t max_cnt = -1, block_cnt = 0; - char *max_addr = NULL; + char *max_addr = nullptr; // Find the longest block of test bytes in the buffer for (int32_t i = 0; i < size; i++) { - char *addr = ptr + i; + char *addr = start_free_memory + i; if (*addr == TEST_BYTE) { const int32_t j = count_test_bytes(addr); if (j > 8) { @@ -249,14 +288,14 @@ inline void free_memory_pool_report(char * const ptr, const int32_t size) { * Corrupt locations in the free memory pool and report the corrupt addresses. * This is useful to check the correctness of the M100 D and the M100 F commands. */ - inline void corrupt_free_memory(char *ptr, const uint32_t size) { - ptr += 8; - const uint32_t near_top = top_of_stack() - ptr - 250, // -250 to avoid interrupt activity that's altered the stack. + inline void corrupt_free_memory(char *start_free_memory, const uint32_t size) { + start_free_memory += 8; + const uint32_t near_top = top_of_stack() - start_free_memory - 250, // -250 to avoid interrupt activity that's altered the stack. j = near_top / (size + 1); SERIAL_ECHOLNPGM("Corrupting free memory block.\n"); for (uint32_t i = 1; i <= size; i++) { - char * const addr = ptr + i * j; + char * const addr = start_free_memory + i * j; *addr = i; SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr)); } @@ -268,7 +307,7 @@ inline void free_memory_pool_report(char * const ptr, const int32_t size) { * M100 I * Init memory for the M100 tests. (Automatically applied on the first M100.) */ -inline void init_free_memory(char *ptr, int32_t size) { +inline void init_free_memory(char *start_free_memory, int32_t size) { SERIAL_ECHOLNPGM("Initializing free memory block.\n\n"); size -= 250; // -250 to avoid interrupt activity that's altered the stack. @@ -277,17 +316,17 @@ inline void init_free_memory(char *ptr, int32_t size) { return; } - ptr += 8; // move a few bytes away from the heap just because we don't want + start_free_memory += 8; // move a few bytes away from the heap just because we don't want // to be altering memory that close to it. - memset(ptr, TEST_BYTE, size); + memset(start_free_memory, TEST_BYTE, size); SERIAL_ECHO(size); SERIAL_ECHOLNPGM(" bytes of memory initialized.\n"); for (int32_t i = 0; i < size; i++) { - if (ptr[i] != TEST_BYTE) { - SERIAL_ECHOPAIR("? address : ", hex_address(ptr + i)); - SERIAL_ECHOLNPAIR("=", hex_byte(ptr[i])); + if (start_free_memory[i] != TEST_BYTE) { + SERIAL_ECHOPAIR("? address : ", hex_address(start_free_memory + i)); + SERIAL_ECHOLNPAIR("=", hex_byte(start_free_memory[i])); SERIAL_EOL(); } } @@ -297,33 +336,36 @@ inline void init_free_memory(char *ptr, int32_t size) { * M100: Free Memory Check */ void GcodeSuite::M100() { - SERIAL_ECHOPAIR("\n__brkval : ", hex_address(__brkval)); - SERIAL_ECHOPAIR("\n__bss_end : ", hex_address(&__bss_end)); - char *ptr = END_OF_HEAP(), *sp = top_of_stack(); - - SERIAL_ECHOPAIR("\nstart of free space : ", hex_address(ptr)); - SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp)); + char *sp = top_of_stack(); + if (!free_memory_end) free_memory_end = sp - MEMORY_END_CORRECTION; + SERIAL_ECHOPAIR("\nbss_end : ", hex_address(end_bss)); + if (heaplimit) SERIAL_ECHOPAIR("\n__heaplimit : ", hex_address(heaplimit )); + SERIAL_ECHOPAIR("\nfree_memory_start : ", hex_address(free_memory_start)); + if (stacklimit) SERIAL_ECHOPAIR("\n__stacklimit : ", hex_address(stacklimit)); + SERIAL_ECHOPAIR("\nfree_memory_end : ", hex_address(free_memory_end )); + if (MEMORY_END_CORRECTION) SERIAL_ECHOPAIR("\nMEMORY_END_CORRECTION: ", MEMORY_END_CORRECTION ); + SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp)); // Always init on the first invocation of M100 static bool m100_not_initialized = true; if (m100_not_initialized || parser.seen('I')) { m100_not_initialized = false; - init_free_memory(ptr, sp - ptr); + init_free_memory(free_memory_start, free_memory_end - free_memory_start); } #if ENABLED(M100_FREE_MEMORY_DUMPER) if (parser.seen('D')) - return dump_free_memory(ptr, sp); + return dump_free_memory(free_memory_start, free_memory_end); #endif if (parser.seen('F')) - return free_memory_pool_report(ptr, sp - ptr); + return free_memory_pool_report(free_memory_start, free_memory_end - free_memory_start); #if ENABLED(M100_FREE_MEMORY_CORRUPTOR) if (parser.seen('C')) - return corrupt_free_memory(ptr, parser.value_int()); + return corrupt_free_memory(free_memory_start, parser.value_int()); #endif } diff --git a/Marlin/src/gcode/calibrate/M425.cpp b/Marlin/src/gcode/calibrate/M425.cpp index e51c9301cf..74b38f56cc 100644 --- a/Marlin/src/gcode/calibrate/M425.cpp +++ b/Marlin/src/gcode/calibrate/M425.cpp @@ -24,20 +24,9 @@ #if ENABLED(BACKLASH_GCODE) +#include "../../feature/backlash.h" #include "../../module/planner.h" -float backlash_distance_mm[XYZ] = BACKLASH_DISTANCE_MM; -uint8_t backlash_correction = BACKLASH_CORRECTION * all_on; - -#ifdef BACKLASH_SMOOTHING_MM - float backlash_smoothing_mm = BACKLASH_SMOOTHING_MM; -#endif - -#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) - float backlash_measured_mm[XYZ] = { 0 }; - uint8_t backlash_measured_num[XYZ] = { 0 }; -#endif - #include "../gcode.h" /** @@ -60,59 +49,52 @@ void GcodeSuite::M425() { LOOP_XYZ(i) { if (parser.seen(axis_codes[i])) { planner.synchronize(); - const float measured_backlash = ( - #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) - backlash_measured_num[i] > 0 ? backlash_measured_mm[i] / backlash_measured_num[i] : 0 - #else - 0 - #endif - ); - backlash_distance_mm[i] = parser.has_value() ? parser.value_linear_units() : measured_backlash; + backlash.distance_mm[i] = parser.has_value() ? parser.value_linear_units() : backlash.get_measurement(i); noArgs = false; } } if (parser.seen('F')) { planner.synchronize(); - backlash_correction = MAX(0, MIN(1.0, parser.value_float())) * all_on; + backlash.set_correction(parser.value_float()); noArgs = false; } #ifdef BACKLASH_SMOOTHING_MM if (parser.seen('S')) { planner.synchronize(); - backlash_smoothing_mm = parser.value_linear_units(); + backlash.smoothing_mm = parser.value_linear_units(); noArgs = false; } #endif if (noArgs) { - SERIAL_ECHOPGM("Backlash correction is "); - if (!backlash_correction) SERIAL_ECHOPGM("in"); + SERIAL_ECHOPGM("Backlash Correction "); + if (!backlash.correction) SERIAL_ECHOPGM("in"); SERIAL_ECHOLNPGM("active:"); - SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", float(ui8_to_percent(backlash_correction)) / 100, " (F1.0 = full, F0.0 = none)"); + SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)"); SERIAL_ECHOPGM(" Backlash Distance (mm): "); LOOP_XYZ(a) { SERIAL_CHAR(' '); SERIAL_CHAR(axis_codes[a]); - SERIAL_ECHO(backlash_distance_mm[a]); + SERIAL_ECHO(backlash.distance_mm[a]); SERIAL_EOL(); } #ifdef BACKLASH_SMOOTHING_MM - SERIAL_ECHOLNPAIR(" Smoothing (mm): S", backlash_smoothing_mm); + SERIAL_ECHOLNPAIR(" Smoothing (mm): S", backlash.smoothing_mm); #endif #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) SERIAL_ECHOPGM(" Average measured backlash (mm):"); - LOOP_XYZ(a) { - if (backlash_measured_num[a] > 0) { + if (backlash.has_any_measurement()) { + LOOP_XYZ(a) if (backlash.has_measurement(a)) { SERIAL_CHAR(' '); SERIAL_CHAR(axis_codes[a]); - SERIAL_ECHO(backlash_measured_mm[a] / backlash_measured_num[a]); + SERIAL_ECHO(backlash.get_measurement(a)); } } - if (!backlash_measured_num[X_AXIS] && !backlash_measured_num[Y_AXIS] && !backlash_measured_num[Z_AXIS]) + else SERIAL_ECHOPGM(" (Not yet measured)"); SERIAL_EOL(); #endif diff --git a/Marlin/src/gcode/config/M301.cpp b/Marlin/src/gcode/config/M301.cpp index 531aa88db3..f9ebe9b822 100644 --- a/Marlin/src/gcode/config/M301.cpp +++ b/Marlin/src/gcode/config/M301.cpp @@ -42,7 +42,7 @@ void GcodeSuite::M301() { // multi-extruder PID patch: M301 updates or prints a single extruder's PID values - // default behaviour (omitting E parameter) is to update for extruder 0 only + // default behavior (omitting E parameter) is to update for extruder 0 only const uint8_t e = parser.byteval('E'); // extruder being updated if (e < HOTENDS) { // catch bad input value diff --git a/Marlin/src/gcode/config/M305.cpp b/Marlin/src/gcode/config/M305.cpp new file mode 100644 index 0000000000..82863f5692 --- /dev/null +++ b/Marlin/src/gcode/config/M305.cpp @@ -0,0 +1,81 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../inc/MarlinConfig.h" + +#if HAS_USER_THERMISTORS + +#include "../gcode.h" +#include "../../module/temperature.h" + +/** + * M305: Set (or report) custom thermistor parameters + * + * P[index] Thermistor table index + * R[ohms] Pullup resistor value + * T[ohms] Resistance at 25C + * B[beta] Thermistor "beta" value + * C[coeff] Steinhart-Hart Coefficient 'C' + * + * Format: M305 P[tbl_index] R[pullup_resistor_val] T[therm_25C_resistance] B[therm_beta] C[Steinhart_Hart_C_coeff] + * + * Examples: M305 P0 R4700 T100000 B3950 C0.0 + * M305 P0 R4700 + * M305 P0 T100000 + * M305 P0 B3950 + * M305 P0 C0.0 + */ +void GcodeSuite::M305() { + const int8_t t_index = parser.intval('P', -1); + const bool do_set = parser.seen("BCRT"); + + // A valid P index is required + if (t_index >= (USER_THERMISTORS) || (do_set && t_index < 0)) { + SERIAL_ECHO_START(); + SERIAL_ECHOLNPAIR("!Invalid index. (0 <= P <= ", int(USER_THERMISTORS - 1), ")"); + } + else if (do_set) { + if (parser.seen('R')) // Pullup resistor value + if (!thermalManager.set_pull_up_res(t_index, parser.value_float())) + SERIAL_ECHO_MSG("!Invalid series resistance. (0 < R < 1000000)"); + + if (parser.seen('T')) // Resistance at 25C + if (!thermalManager.set_res25(t_index, parser.value_float())) + SERIAL_ECHO_MSG("!Invalid 25C resistance. (0 < T < 10000000)"); + + if (parser.seen('B')) // Beta value + if (!thermalManager.set_beta(t_index, parser.value_float())) + SERIAL_ECHO_MSG("!Invalid beta. (0 < B < 1000000)"); + + if (parser.seen('C')) // Steinhart-Hart C coefficient + if (!thermalManager.set_sh_coeff(t_index, parser.value_float())) + SERIAL_ECHO_MSG("!Invalid Steinhart-Hart C coeff. (-0.01 < C < +0.01)"); + } // If not setting then report parameters + else if (t_index < 0) { // ...all user thermistors + for (uint8_t i = 0; i < USER_THERMISTORS; i++) + thermalManager.log_user_thermistor(i); + } + else // ...one user thermistor + thermalManager.log_user_thermistor(t_index); +} + +#endif // HAS_USER_THERMISTORS diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index d2d90b6518..c2c705f65d 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -97,7 +97,7 @@ void GcodeSuite::M81() { thermalManager.zero_fan_speeds(); #if ENABLED(PROBING_FANS_OFF) thermalManager.fans_paused = false; - ZERO(thermalManager.paused_fan_speed); + ZERO(thermalManager.saved_fan_speed); #endif #endif diff --git a/Marlin/src/gcode/control/M999.cpp b/Marlin/src/gcode/control/M999.cpp index 8ddbf859e7..1d2dfae733 100644 --- a/Marlin/src/gcode/control/M999.cpp +++ b/Marlin/src/gcode/control/M999.cpp @@ -29,7 +29,7 @@ /** * M999: Restart after being stopped * - * Default behaviour is to flush the serial buffer and request + * Default behavior is to flush the serial buffer and request * a resend to the host starting on the last N line received. * * Sending "M999 S1" will resume printing without flushing the diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index 12e323bd7b..e21e125066 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -25,18 +25,11 @@ #include "../../core/serial.h" #include "../../inc/MarlinConfig.h" -#if ENABLED(EXTENSIBLE_UI) - #include "../../lcd/extensible_ui/ui_api.h" -#endif - /** * M500: Store settings in EEPROM */ void GcodeSuite::M500() { (void)settings.save(); - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onStoreSettings(); - #endif } /** @@ -44,9 +37,6 @@ void GcodeSuite::M500() { */ void GcodeSuite::M501() { (void)settings.load(); - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onLoadSettings(); - #endif } /** @@ -54,9 +44,6 @@ void GcodeSuite::M501() { */ void GcodeSuite::M502() { (void)settings.reset(); - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onFactoryReset(); - #endif } #if DISABLED(DISABLE_M503) diff --git a/Marlin/src/gcode/feature/advance/M900.cpp b/Marlin/src/gcode/feature/advance/M900.cpp index ceb95dd54c..0729b91702 100644 --- a/Marlin/src/gcode/feature/advance/M900.cpp +++ b/Marlin/src/gcode/feature/advance/M900.cpp @@ -55,13 +55,13 @@ void GcodeSuite::M900() { #if ENABLED(EXTRA_LIN_ADVANCE_K) - bool ext_slot = bitRead(lin_adv_slot, tmp_extruder); + bool ext_slot = TEST(lin_adv_slot, tmp_extruder); if (parser.seenval('S')) { const bool slot = parser.value_bool(); if (ext_slot != slot) { ext_slot = slot; - bitWrite(lin_adv_slot, tmp_extruder, slot); + SET_BIT_TO(lin_adv_slot, tmp_extruder, slot); planner.synchronize(); const float temp = planner.extruder_advance_K[tmp_extruder]; planner.extruder_advance_K[tmp_extruder] = saved_extruder_advance_K[tmp_extruder]; @@ -103,7 +103,7 @@ void GcodeSuite::M900() { SERIAL_ECHOLNPAIR("(Slot ", 1 - ext_slot, " K", saved_extruder_advance_K[0], ")"); #else LOOP_L_N(i, EXTRUDERS) { - const int slot = (int)bitRead(lin_adv_slot, i); + const int slot = (int)TEST(lin_adv_slot, i); SERIAL_ECHOLNPAIR("Advance T", int(i), " S", slot, " K", planner.extruder_advance_K[i]); SERIAL_ECHOLNPAIR("(Slot ", 1 - slot, " K", saved_extruder_advance_K[i], ")"); SERIAL_EOL(); diff --git a/Marlin/src/gcode/feature/pause/M600.cpp b/Marlin/src/gcode/feature/pause/M600.cpp index 78e7e8e658..147cc9c573 100644 --- a/Marlin/src/gcode/feature/pause/M600.cpp +++ b/Marlin/src/gcode/feature/pause/M600.cpp @@ -41,6 +41,10 @@ #include "../../../lcd/menu/menu_mmu2.h" #endif +#if ENABLED(MIXING_EXTRUDER) + #include "../../../feature/mixing.h" +#endif + /** * M600: Pause for filament change * @@ -58,8 +62,21 @@ void GcodeSuite::M600() { point_t park_point = NOZZLE_PARK_POINT; - const int8_t target_extruder = get_target_extruder_from_command(); - if (target_extruder < 0) return; + #if ENABLED(MIXING_EXTRUDER) + const int8_t target_e_stepper = get_target_e_stepper_from_command(); + if (target_e_stepper < 0) return; + + const uint8_t old_mixing_tool = mixer.get_current_vtool(); + mixer.T(MIXER_DIRECT_SET_TOOL); + + MIXER_STEPPER_LOOP(i) mixer.set_collector(i, i == uint8_t(target_e_stepper) ? 1.0 : 0.0); + mixer.normalize(); + + const int8_t target_extruder = active_extruder; + #else + const int8_t target_extruder = get_target_extruder_from_command(); + if (target_extruder < 0) return; + #endif #if ENABLED(DUAL_X_CARRIAGE) int8_t DXC_ext = target_extruder; @@ -155,6 +172,10 @@ void GcodeSuite::M600() { if (active_extruder_before_filament_change != active_extruder) tool_change(active_extruder_before_filament_change, 0, false); #endif + + #if ENABLED(MIXING_EXTRUDER) + mixer.T(old_mixing_tool); // Restore original mixing tool + #endif } #endif // ADVANCED_PAUSE_FEATURE diff --git a/Marlin/src/gcode/feature/pause/M701_M702.cpp b/Marlin/src/gcode/feature/pause/M701_M702.cpp index a09d8aa710..abd4f1371d 100644 --- a/Marlin/src/gcode/feature/pause/M701_M702.cpp +++ b/Marlin/src/gcode/feature/pause/M701_M702.cpp @@ -42,10 +42,15 @@ #include "../../../feature/prusa_MMU2/mmu2.h" #endif +#if ENABLED(MIXING_EXTRUDER) + #include "../../../feature/mixing.h" +#endif + /** * M701: Load filament * - * T - Optional extruder number. Current extruder if omitted. + * T - Extruder number. Required for mixing extruder. + * For non-mixing, current extruder if omitted. * Z - Move the Z axis by this distance * L - Extrude distance for insertion (positive value) (manual reload) * @@ -59,9 +64,21 @@ void GcodeSuite::M701() { if (axis_unhomed_error()) park_point.z = 0; #endif - const int8_t target_extruder = get_target_extruder_from_command(); - if (target_extruder < 0) return; + #if ENABLED(MIXING_EXTRUDER) + const int8_t target_e_stepper = get_target_e_stepper_from_command(); + if (target_e_stepper < 0) return; + const uint8_t old_mixing_tool = mixer.get_current_vtool(); + mixer.T(MIXER_DIRECT_SET_TOOL); + + MIXER_STEPPER_LOOP(i) mixer.set_collector(i, (i == (uint8_t)target_e_stepper) ? 1.0 : 0.0); + mixer.normalize(); + + const int8_t target_extruder = active_extruder; + #else + const int8_t target_extruder = get_target_extruder_from_command(); + if (target_extruder < 0) return; + #endif // Z axis lift if (parser.seenval('Z')) park_point.z = parser.linearval('Z'); @@ -107,6 +124,10 @@ void GcodeSuite::M701() { tool_change(active_extruder_before_filament_change, 0, false); #endif + #if ENABLED(MIXING_EXTRUDER) + mixer.T(old_mixing_tool); // Restore original mixing tool + #endif + // Show status screen #if HAS_LCD_MENU lcd_pause_show_message(PAUSE_MESSAGE_STATUS); @@ -116,7 +137,8 @@ void GcodeSuite::M701() { /** * M702: Unload filament * - * T - Optional extruder number. If omitted, current extruder + * T - Extruder number. Required for mixing extruder. + * For non-mixing, if omitted, current extruder * (or ALL extruders with FILAMENT_UNLOAD_ALL_EXTRUDERS). * Z - Move the Z axis by this distance * U - Retract distance for removal (manual reload) @@ -131,8 +153,31 @@ void GcodeSuite::M702() { if (axis_unhomed_error()) park_point.z = 0; #endif - const int8_t target_extruder = get_target_extruder_from_command(); - if (target_extruder < 0) return; + #if ENABLED(MIXING_EXTRUDER) + const uint8_t old_mixing_tool = mixer.get_current_vtool(); + + #if ENABLED(FILAMENT_UNLOAD_ALL_EXTRUDERS) + float mix_multiplier = 1.0; + if (!parser.seenval('T')) { + mixer.T(MIXER_AUTORETRACT_TOOL); + mix_multiplier = MIXING_STEPPERS; + } + else + #endif + { + const int8_t target_e_stepper = get_target_e_stepper_from_command(); + if (target_e_stepper < 0) return; + + mixer.T(MIXER_DIRECT_SET_TOOL); + MIXER_STEPPER_LOOP(i) mixer.set_collector(i, (i == (uint8_t)target_e_stepper) ? 1.0 : 0.0); + mixer.normalize(); + } + + const int8_t target_extruder = active_extruder; + #else + const int8_t target_extruder = get_target_extruder_from_command(); + if (target_extruder < 0) return; + #endif // Z axis lift if (parser.seenval('Z')) park_point.z = parser.linearval('Z'); @@ -171,7 +216,11 @@ void GcodeSuite::M702() { const float unload_length = -ABS(parser.seen('U') ? parser.value_axis_units(E_AXIS) : fc_settings[target_extruder].unload_length); - unload_filament(unload_length, true, PAUSE_MODE_UNLOAD_FILAMENT); + unload_filament(unload_length, true, PAUSE_MODE_UNLOAD_FILAMENT + #if ALL(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) + , mix_multiplier + #endif + ); } #endif @@ -185,6 +234,10 @@ void GcodeSuite::M702() { tool_change(active_extruder_before_filament_change, 0, false); #endif + #if ENABLED(MIXING_EXTRUDER) + mixer.T(old_mixing_tool); // Restore original mixing tool + #endif + // Show status screen #if HAS_LCD_MENU lcd_pause_show_message(PAUSE_MESSAGE_STATUS); diff --git a/Marlin/src/gcode/feature/runout/M412.cpp b/Marlin/src/gcode/feature/runout/M412.cpp index 749ce2a3b5..6cf2238dbb 100644 --- a/Marlin/src/gcode/feature/runout/M412.cpp +++ b/Marlin/src/gcode/feature/runout/M412.cpp @@ -32,6 +32,9 @@ */ void GcodeSuite::M412() { if (parser.seen("HS" + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + "D" + #endif #if ENABLED(HOST_ACTION_COMMANDS) "R" #endif @@ -42,11 +45,17 @@ void GcodeSuite::M412() { const bool seenR = parser.seen('R'), seenS = parser.seen('S'); if (seenR || seenS) runout.reset(); if (seenS) runout.enabled = parser.value_bool(); + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + if (parser.seen('D')) runout.set_runout_distance(parser.value_linear_units()); + #endif } else { SERIAL_ECHO_START(); SERIAL_ECHOPGM("Filament runout "); serialprintln_onoff(runout.enabled); + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + SERIAL_ECHOLNPAIR("Filament runout distance (mm): ", runout.runout_distance()); + #endif } } diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 546898433a..734468ff8e 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -72,17 +72,32 @@ bool GcodeSuite::axis_relative_modes[] = AXIS_RELATIVE_MODES; int8_t GcodeSuite::get_target_extruder_from_command() { if (parser.seenval('T')) { const int8_t e = parser.value_byte(); - if (e >= EXTRUDERS) { - SERIAL_ECHO_START(); - SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); - SERIAL_ECHOLNPAIR(" " MSG_INVALID_EXTRUDER " ", int(e)); - return -1; - } - return e; + if (e < EXTRUDERS) return e; + SERIAL_ECHO_START(); + SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); + SERIAL_ECHOLNPAIR(" " MSG_INVALID_EXTRUDER " ", int(e)); + return -1; } return active_extruder; } +/** + * Get the target e stepper from the T parameter + * Return -1 if the T parameter is out of range or unspecified + */ +int8_t GcodeSuite::get_target_e_stepper_from_command() { + const int8_t e = parser.intval('T', -1); + if (WITHIN(e, 0, E_STEPPERS - 1)) return e; + + SERIAL_ECHO_START(); + SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); + if (e == -1) + SERIAL_ECHOLNPGM(" " MSG_E_STEPPER_NOT_SPECIFIED); + else + SERIAL_ECHOLNPAIR(" " MSG_INVALID_E_STEPPER " ", int(e)); + return -1; +} + /** * Set XYZE destination and feedrate from the current GCode command * @@ -278,7 +293,7 @@ void GcodeSuite::process_parsed_command( case 58: G58(); break; case 59: G59(); break; #endif - + #if ENABLED(GCODE_MOTION_MODES) case 80: G80(); break; // G80: Reset the current motion mode #endif @@ -574,6 +589,10 @@ void GcodeSuite::process_parsed_command( case 303: M303(); break; // M303: PID autotune #endif + #if HAS_USER_THERMISTORS + case 305: M305(); break; // M305: Set user thermistor parameters + #endif + #if ENABLED(MORGAN_SCARA) case 360: if (M360()) return; break; // M360: SCARA Theta pos1 case 361: if (M361()) return; break; // M361: SCARA Theta pos2 @@ -790,9 +809,9 @@ void GcodeSuite::process_next_command() { if (DEBUGGING(ECHO)) { SERIAL_ECHO_START(); SERIAL_ECHOLN(current_command); - #if ENABLED(M100_FREE_MEMORY_WATCHER) + #if ENABLED(M100_FREE_MEMORY_DUMPER) SERIAL_ECHOPAIR("slot:", cmd_queue_index_r); - M100_dump_routine(PSTR(" Command Queue:"), (const char*)command_queue, (const char*)(command_queue + sizeof(command_queue))); + M100_dump_routine(PSTR(" Command Queue:"), (const char*)command_queue, (const char*)(command_queue) + sizeof(command_queue)); #endif } diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index af99e4fbed..95f9316a49 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -184,6 +184,7 @@ * M302 - Allow cold extrudes, or set the minimum extrude S. (Requires PREVENT_COLD_EXTRUSION) * M303 - PID relay autotune S sets the target temperature. Default 150C. (Requires PIDTEMP) * M304 - Set bed PID parameters P I and D. (Requires PIDTEMPBED) + * M305 - Set user thermistor parameters R T and P. (Requires TEMP_SENSOR_x 1000) * M350 - Set microstepping mode. (Requires digital microstepping pins.) * M351 - Toggle MS1 MS2 pins directly. (Requires digital microstepping pins.) * M355 - Set Case Light on/off and set brightness. (Requires CASE_LIGHT_PIN) @@ -298,6 +299,7 @@ public: FORCE_INLINE static void reset_stepper_timeout() { previous_move_ms = millis(); } static int8_t get_target_extruder_from_command(); + static int8_t get_target_e_stepper_from_command(); static void get_destination_from_command(); static void process_parsed_command( @@ -685,6 +687,10 @@ private: static void M304(); #endif + #if HAS_USER_THERMISTORS + static void M305(); + #endif + #if HAS_MICROSTEPS static void M350(); static void M351(); diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index c3702ab481..591f5ed7b6 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -152,7 +152,7 @@ void GcodeSuite::M115() { // THERMAL_PROTECTION cap_line(PSTR("THERMAL_PROTECTION") - #if BOTH(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_BED) + #if ENABLED(THERMAL_PROTECTION_HOTENDS) && (ENABLED(THERMAL_PROTECTION_BED) || !HAS_HEATED_BED) && (ENABLED(THERMAL_PROTECTION_CHAMBER) || !HAS_HEATED_CHAMBER) , true #endif ); diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index 8d4c167951..2acf06a172 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -80,7 +80,7 @@ GCodeParser parser; * this may be optimized by commenting out ZERO(param) */ void GCodeParser::reset() { - string_arg = NULL; // No whole line argument + string_arg = nullptr; // No whole line argument command_letter = '?'; // No command letter codenum = 0; // No command code #if USE_GCODE_SUBCODES @@ -142,27 +142,23 @@ void GCodeParser::parse(char *p) { // Skip spaces to get the numeric part while (*p == ' ') p++; - // Bail if there's no command code number - // Prusa MMU2 has T?/Tx/Tc commands - #if DISABLED(PRUSA_MMU2) - if (!NUMERIC(*p)) return; - #endif - - // Save the command letter at this point - // A '?' signifies an unknown command - command_letter = letter; - - #if ENABLED(PRUSA_MMU2) if (letter == 'T') { // check for special MMU2 T?/Tx/Tc commands if (*p == '?' || *p == 'x' || *p == 'c') { + command_letter = letter; string_arg = p; return; } } #endif + // Bail if there's no command code number + if (!NUMERIC(*p)) return; + + // Save the command letter at this point + // A '?' signifies an unknown command + command_letter = letter; // Get the code number - integer digits only codenum = 0; @@ -245,7 +241,7 @@ void GCodeParser::parse(char *p) { * This allows M0/M1 with expire time to work: "M0 S5 You Win!" * For 'M118' you must use 'E1' and 'A1' rather than just 'E' or 'A' */ - string_arg = NULL; + string_arg = nullptr; while (const char code = *p++) { // Get the next parameter. A NUL ends the loop // Special handling for M32 [P] !/path/to/file.g# @@ -289,7 +285,7 @@ void GCodeParser::parse(char *p) { #endif #if ENABLED(FASTER_GCODE_PARSER) - set(code, has_num ? p : NULL); // Set parameter exists and pointer (NULL for no number) + set(code, has_num ? p : nullptr); // Set parameter exists and pointer (nullptr for no number) #endif } else if (!string_arg) { // Not A-Z? First time, keep as the string_arg @@ -315,7 +311,7 @@ void GCodeParser::parse(char *p) { if (next_command) { while (*next_command && *next_command != ' ') ++next_command; while (*next_command == ' ') ++next_command; - if (!*next_command) next_command = NULL; + if (!*next_command) next_command = nullptr; } #else const char *next_command = command_args; diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h index c5a473df6e..ddd9e00809 100644 --- a/Marlin/src/gcode/parser.h +++ b/Marlin/src/gcode/parser.h @@ -135,7 +135,7 @@ public: const bool b = TEST32(codebits, ind); if (b) { char * const ptr = command_ptr + param[ind]; - value_ptr = param[ind] && valid_float(ptr) ? ptr : (char*)NULL; + value_ptr = param[ind] && valid_float(ptr) ? ptr : nullptr; } return b; } @@ -178,7 +178,7 @@ public: static inline bool seen(const char c) { char *p = strchr(command_args, c); const bool b = !!p; - if (b) value_ptr = valid_float(&p[1]) ? &p[1] : (char*)NULL; + if (b) value_ptr = valid_float(&p[1]) ? &p[1] : nullptr; return b; } @@ -210,7 +210,7 @@ public: #endif // The code value pointer was set - FORCE_INLINE static bool has_value() { return value_ptr != NULL; } + FORCE_INLINE static bool has_value() { return value_ptr != nullptr; } // Seen a parameter with a value static inline bool seenval(const char c) { return seen(c) && has_value(); } @@ -224,20 +224,20 @@ public: if (c == '\0' || c == ' ') break; if (c == 'E' || c == 'e') { *e = '\0'; - const float ret = strtof(value_ptr, NULL); + const float ret = strtof(value_ptr, nullptr); *e = c; return ret; } ++e; } - return strtof(value_ptr, NULL); + return strtof(value_ptr, nullptr); } return 0; } // Code value as a long or ulong - static inline int32_t value_long() { return value_ptr ? strtol(value_ptr, NULL, 10) : 0L; } - static inline uint32_t value_ulong() { return value_ptr ? strtoul(value_ptr, NULL, 10) : 0UL; } + static inline int32_t value_long() { return value_ptr ? strtol(value_ptr, nullptr, 10) : 0L; } + static inline uint32_t value_ulong() { return value_ptr ? strtoul(value_ptr, nullptr, 10) : 0UL; } // Code value for use as time static inline millis_t value_millis() { return value_ulong(); } diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 817d6bca18..d8bd91c5f3 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -76,11 +76,11 @@ static int serial_count[NUM_SERIAL] = { 0 }; bool send_ok[BUFSIZE]; /** - * Next Injected Command pointer. NULL if no commands are being injected. + * Next Injected Command pointer. nullptr if no commands are being injected. * Used by Marlin internally to ensure that commands initiated from within * are enqueued ahead of any pending serial or sd card commands. */ -static PGM_P injected_commands_P = NULL; +static PGM_P injected_commands_P = nullptr; void queue_setup() { // Send "ok" after commands by default @@ -157,7 +157,7 @@ bool enqueue_and_echo_command(const char* cmd) { * Return true if any immediate commands remain to inject. */ static bool drain_injected_commands_P() { - if (injected_commands_P != NULL) { + if (injected_commands_P != nullptr) { size_t i = 0; char c, cmd[60]; strncpy_P(cmd, injected_commands_P, sizeof(cmd) - 1); @@ -165,9 +165,9 @@ static bool drain_injected_commands_P() { while ((c = cmd[i]) && c != '\n') i++; // find the end of this gcode command cmd[i] = '\0'; if (enqueue_and_echo_command(cmd)) // success? - injected_commands_P = c ? injected_commands_P + i + 1 : NULL; // next command or done + injected_commands_P = c ? injected_commands_P + i + 1 : nullptr; // next command or done } - return (injected_commands_P != NULL); // return whether any more remain + return (injected_commands_P != nullptr); // return whether any more remain } /** @@ -597,18 +597,18 @@ inline void get_serial_commands() { char* command = serial_line_buffer[i]; while (*command == ' ') command++; // Skip leading spaces - char *npos = (*command == 'N') ? command : NULL; // Require the N parameter to start the line + char *npos = (*command == 'N') ? command : nullptr; // Require the N parameter to start the line if (npos) { - bool M110 = strstr_P(command, PSTR("M110")) != NULL; + bool M110 = strstr_P(command, PSTR("M110")) != nullptr; if (M110) { char* n2pos = strchr(command + 4, 'N'); if (n2pos) npos = n2pos; } - gcode_N = strtol(npos + 1, NULL, 10); + gcode_N = strtol(npos + 1, nullptr, 10); if (gcode_N != gcode_LastN + 1 && !M110) return gcode_line_error(PSTR(MSG_ERR_LINE_NO), i); @@ -617,7 +617,7 @@ inline void get_serial_commands() { if (apos) { uint8_t checksum = 0, count = uint8_t(apos - command); while (count) checksum ^= command[--count]; - if (strtol(apos + 1, NULL, 10) != checksum) + if (strtol(apos + 1, nullptr, 10) != checksum) return gcode_line_error(PSTR(MSG_ERR_CHECKSUM_MISMATCH), i); } else @@ -635,7 +635,7 @@ inline void get_serial_commands() { if (IsStopped()) { char* gpos = strchr(command, 'G'); if (gpos) { - switch (strtol(gpos + 1, NULL, 10)) { + switch (strtol(gpos + 1, nullptr, 10)) { case 0: case 1: #if ENABLED(ARC_SUPPORT) diff --git a/Marlin/src/gcode/sdcard/M23.cpp b/Marlin/src/gcode/sdcard/M23.cpp index 7cdc976690..18d18aaf28 100644 --- a/Marlin/src/gcode/sdcard/M23.cpp +++ b/Marlin/src/gcode/sdcard/M23.cpp @@ -29,6 +29,8 @@ /** * M23: Open a file + * + * The path is relative to the root directory */ void GcodeSuite::M23() { // Simplify3D includes the size, so zero out all spaces (#7227) diff --git a/Marlin/src/gcode/temperature/M141_M191.cpp b/Marlin/src/gcode/temperature/M141_M191.cpp index d65dc7c62f..9b5b2f8f12 100644 --- a/Marlin/src/gcode/temperature/M141_M191.cpp +++ b/Marlin/src/gcode/temperature/M141_M191.cpp @@ -60,7 +60,7 @@ void GcodeSuite::M191() { const bool no_wait_for_cooling = parser.seenval('S'); if (no_wait_for_cooling || parser.seenval('R')) { - thermalManager.setTargetBed(parser.value_celsius()); + thermalManager.setTargetChamber(parser.value_celsius()); #if ENABLED(PRINTJOB_TIMER_AUTOSTART) if (parser.value_celsius() > BED_MINTEMP) print_job_timer.start(); @@ -68,9 +68,9 @@ void GcodeSuite::M191() { } else return; - lcd_setstatusPGM(thermalManager.isHeatingBed() ? PSTR(MSG_BED_HEATING) : PSTR(MSG_BED_COOLING)); + lcd_setstatusPGM(thermalManager.isHeatingChamber() ? PSTR(MSG_CHAMBER_HEATING) : PSTR(MSG_CHAMBER_COOLING)); - thermalManager.wait_for_bed(no_wait_for_cooling); + thermalManager.wait_for_chamber(no_wait_for_cooling); } */ diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 81c0678e3f..a1b922bed6 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -141,8 +141,9 @@ #define DEFAULT_LCD_CONTRAST 150 #define LCD_CONTRAST_MAX 255 -#elif ENABLED(FYSETC_MINI_12864) +#elif ANY(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) + #define FYSETC_MINI_12864 #define DOGLCD #define ULTIPANEL #define LCD_CONTRAST_MIN 0 @@ -150,6 +151,21 @@ #define DEFAULT_LCD_CONTRAST 255 #define LED_COLORS_REDUCE_GREEN + // Require LED backlighting enabled + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #define RGB_LED + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_LED + #undef NEOPIXEL_TYPE + #define NEOPIXEL_TYPE NEO_RGB + #undef NEOPIXEL_PIXELS + #define NEOPIXEL_PIXELS 3 + #ifndef NEOPIXEL_BRIGHTNESS + #define NEOPIXEL_BRIGHTNESS 127 + #endif + #define NEOPIXEL_STARTUP_TEST + #endif + #endif #if EITHER(MAKRPANEL, MINIPANEL) @@ -318,8 +334,14 @@ #define ULTRA_LCD #endif +// Extensible UI serial touch screens. (See src/lcd/extensible_ui) +#if ENABLED(MALYAN_LCD) + #define EXTENSIBLE_UI +#endif + // Aliases for LCD features #define HAS_SPI_LCD ENABLED(ULTRA_LCD) +#define HAS_DISPLAY (HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI)) #define HAS_GRAPHICAL_LCD ENABLED(DOGLCD) #define HAS_CHARACTER_LCD (HAS_SPI_LCD && !HAS_GRAPHICAL_LCD) #define HAS_LCD_MENU (ENABLED(ULTIPANEL) && DISABLED(NO_LCD_MENUS)) @@ -454,9 +476,6 @@ #undef SERVO_DELAY #define SERVO_DELAY { 50 } #endif - #ifndef BLTOUCH_DELAY - #define BLTOUCH_DELAY 375 - #endif // Always disable probe pin inverting for BLTouch #undef Z_MIN_PROBE_ENDSTOP_INVERTING diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index 909e2aefc4..0e2295cbaa 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -79,3 +79,21 @@ #endif #endif #endif + +#if ENABLED(FYSETC_MINI_12864_2_1) + #define LED_CONTROL_MENU + #define LED_USER_PRESET_STARTUP + #define LED_COLOR_PRESETS + #ifndef LED_USER_PRESET_RED + #define LED_USER_PRESET_RED 255 + #endif + #ifndef LED_USER_PRESET_GREEN + #define LED_USER_PRESET_GREEN 128 + #endif + #ifndef LED_USER_PRESET_BLUE + #define LED_USER_PRESET_BLUE 0 + #endif + #ifndef LED_USER_PRESET_BRIGHTNESS + #define LED_USER_PRESET_BRIGHTNESS 255 + #endif +#endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index a4789f7d97..47b86dae92 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -286,6 +286,11 @@ /** * Temp Sensor defines */ + +#define ANY_TEMP_SENSOR_IS(n) (TEMP_SENSOR_0 == (n) || TEMP_SENSOR_1 == (n) || TEMP_SENSOR_2 == (n) || TEMP_SENSOR_3 == (n) || TEMP_SENSOR_4 == (n) || TEMP_SENSOR_5 == (n) || TEMP_SENSOR_BED == (n) || TEMP_SENSOR_CHAMBER == (n)) + +#define HAS_USER_THERMISTORS ANY_TEMP_SENSOR_IS(1000) + #if TEMP_SENSOR_0 == -4 #define HEATER_0_USES_AD8495 #elif TEMP_SENSOR_0 == -3 @@ -299,12 +304,14 @@ #define HEATER_0_MAX6675_TMAX 1024 #elif TEMP_SENSOR_0 == -1 #define HEATER_0_USES_AD595 -#elif TEMP_SENSOR_0 == 0 +#elif TEMP_SENSOR_0 == 1000 + #define HEATER_0_USER_THERMISTOR +#elif TEMP_SENSOR_0 > 0 + #define THERMISTOR_HEATER_0 TEMP_SENSOR_0 + #define HEATER_0_USES_THERMISTOR +#else #undef HEATER_0_MINTEMP #undef HEATER_0_MAXTEMP -#elif TEMP_SENSOR_0 > 0 - #define THERMISTORHEATER_0 TEMP_SENSOR_0 - #define HEATER_0_USES_THERMISTOR #endif #if TEMP_SENSOR_1 == -4 @@ -325,12 +332,14 @@ #define HEATER_1_MAX6675_TMAX 1024 #elif TEMP_SENSOR_1 == -1 #define HEATER_1_USES_AD595 -#elif TEMP_SENSOR_1 == 0 +#elif TEMP_SENSOR_1 == 1000 + #define HEATER_1_USER_THERMISTOR +#elif TEMP_SENSOR_1 > 0 + #define THERMISTOR_HEATER_1 TEMP_SENSOR_1 + #define HEATER_1_USES_THERMISTOR +#else #undef HEATER_1_MINTEMP #undef HEATER_1_MAXTEMP -#elif TEMP_SENSOR_1 > 0 - #define THERMISTORHEATER_1 TEMP_SENSOR_1 - #define HEATER_1_USES_THERMISTOR #endif #if TEMP_SENSOR_2 == -4 @@ -341,12 +350,14 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_2." #elif TEMP_SENSOR_2 == -1 #define HEATER_2_USES_AD595 -#elif TEMP_SENSOR_2 == 0 +#elif TEMP_SENSOR_2 == 1000 + #define HEATER_2_USER_THERMISTOR +#elif TEMP_SENSOR_2 > 0 + #define THERMISTOR_HEATER_2 TEMP_SENSOR_2 + #define HEATER_2_USES_THERMISTOR +#else #undef HEATER_2_MINTEMP #undef HEATER_2_MAXTEMP -#elif TEMP_SENSOR_2 > 0 - #define THERMISTORHEATER_2 TEMP_SENSOR_2 - #define HEATER_2_USES_THERMISTOR #endif #if TEMP_SENSOR_3 == -4 @@ -357,12 +368,14 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_3." #elif TEMP_SENSOR_3 == -1 #define HEATER_3_USES_AD595 -#elif TEMP_SENSOR_3 == 0 +#elif TEMP_SENSOR_3 == 1000 + #define HEATER_3_USER_THERMISTOR +#elif TEMP_SENSOR_3 > 0 + #define THERMISTOR_HEATER_3 TEMP_SENSOR_3 + #define HEATER_3_USES_THERMISTOR +#else #undef HEATER_3_MINTEMP #undef HEATER_3_MAXTEMP -#elif TEMP_SENSOR_3 > 0 - #define THERMISTORHEATER_3 TEMP_SENSOR_3 - #define HEATER_3_USES_THERMISTOR #endif #if TEMP_SENSOR_4 == -4 @@ -373,12 +386,14 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_4." #elif TEMP_SENSOR_4 == -1 #define HEATER_4_USES_AD595 -#elif TEMP_SENSOR_4 == 0 +#elif TEMP_SENSOR_4 == 1000 + #define HEATER_4_USER_THERMISTOR +#elif TEMP_SENSOR_4 > 0 + #define THERMISTOR_HEATER_4 TEMP_SENSOR_4 + #define HEATER_4_USES_THERMISTOR +#else #undef HEATER_4_MINTEMP #undef HEATER_4_MAXTEMP -#elif TEMP_SENSOR_4 > 0 - #define THERMISTORHEATER_4 TEMP_SENSOR_4 - #define HEATER_4_USES_THERMISTOR #endif #if TEMP_SENSOR_5 == -4 @@ -389,12 +404,14 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_5." #elif TEMP_SENSOR_5 == -1 #define HEATER_5_USES_AD595 -#elif TEMP_SENSOR_5 == 0 +#elif TEMP_SENSOR_5 == 1000 + #define HEATER_5_USER_THERMISTOR +#elif TEMP_SENSOR_5 > 0 + #define THERMISTOR_HEATER_5 TEMP_SENSOR_5 + #define HEATER_5_USES_THERMISTOR +#else #undef HEATER_5_MINTEMP #undef HEATER_5_MAXTEMP -#elif TEMP_SENSOR_5 > 0 - #define THERMISTORHEATER_5 TEMP_SENSOR_5 - #define HEATER_5_USES_THERMISTOR #endif #if TEMP_SENSOR_BED == -4 @@ -405,12 +422,14 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BED." #elif TEMP_SENSOR_BED == -1 #define HEATER_BED_USES_AD595 -#elif TEMP_SENSOR_BED == 0 - #undef BED_MINTEMP - #undef BED_MAXTEMP +#elif TEMP_SENSOR_BED == 1000 + #define BED_USER_THERMISTOR #elif TEMP_SENSOR_BED > 0 #define THERMISTORBED TEMP_SENSOR_BED #define HEATER_BED_USES_THERMISTOR +#else + #undef BED_MINTEMP + #undef BED_MAXTEMP #endif #if TEMP_SENSOR_CHAMBER == -4 @@ -421,9 +440,14 @@ #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_CHAMBER." #elif TEMP_SENSOR_CHAMBER == -1 #define HEATER_CHAMBER_USES_AD595 +#elif TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_USER_THERMISTOR #elif TEMP_SENSOR_CHAMBER > 0 #define THERMISTORCHAMBER TEMP_SENSOR_CHAMBER #define HEATER_CHAMBER_USES_THERMISTOR +#else + #undef CHAMBER_MINTEMP + #undef CHAMBER_MAXTEMP #endif #define HOTEND_USES_THERMISTOR ANY(HEATER_0_USES_THERMISTOR, HEATER_1_USES_THERMISTOR, HEATER_2_USES_THERMISTOR, HEATER_3_USES_THERMISTOR, HEATER_4_USES_THERMISTOR) @@ -490,8 +514,10 @@ #define MINIMUM_STEPPER_PULSE 3 #elif HAS_DRIVER(DRV8825) #define MINIMUM_STEPPER_PULSE 2 - #elif HAS_DRIVER(A4988) || HAS_DRIVER(LV8729) || HAS_DRIVER(A5984) + #elif HAS_DRIVER(A4988) || HAS_DRIVER(A5984) #define MINIMUM_STEPPER_PULSE 1 + #elif HAS_DRIVER(LV8729) + #define MINIMUM_STEPPER_PULSE 0 #elif TRINAMICS #define MINIMUM_STEPPER_PULSE 0 #else @@ -502,10 +528,10 @@ #ifndef MAXIMUM_STEPPER_RATE #if HAS_DRIVER(TB6560) #define MAXIMUM_STEPPER_RATE 15000 - #elif HAS_DRIVER(LV8729) - #define MAXIMUM_STEPPER_RATE 130000 #elif HAS_DRIVER(TB6600) #define MAXIMUM_STEPPER_RATE 150000 + #elif HAS_DRIVER(LV8729) + #define MAXIMUM_STEPPER_RATE 200000 #elif HAS_DRIVER(DRV8825) #define MAXIMUM_STEPPER_RATE 250000 #elif TRINAMICS @@ -953,7 +979,7 @@ #define HAS_AUTO_FAN_3 (HOTENDS > 3 && PIN_EXISTS(E3_AUTO_FAN)) #define HAS_AUTO_FAN_4 (HOTENDS > 4 && PIN_EXISTS(E4_AUTO_FAN)) #define HAS_AUTO_FAN_5 (HOTENDS > 5 && PIN_EXISTS(E5_AUTO_FAN)) -#define HAS_AUTO_CHAMBER_FAN (PIN_EXISTS(CHAMBER_AUTO_FAN)) +#define HAS_AUTO_CHAMBER_FAN (HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_AUTO_FAN)) #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3 || HAS_AUTO_FAN_4 || HAS_AUTO_FAN_5 || HAS_AUTO_CHAMBER_FAN) // Other fans @@ -1554,6 +1580,9 @@ #ifndef Z_CLEARANCE_MULTI_PROBE #define Z_CLEARANCE_MULTI_PROBE Z_CLEARANCE_BETWEEN_PROBES #endif + #if ENABLED(BLTOUCH) && !defined(BLTOUCH_DELAY) + #define BLTOUCH_DELAY 500 + #endif #endif #ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index d76c28bbf2..e7ea421a23 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -210,6 +210,10 @@ #error "UBL_MESH_EDITING is now G26_MESH_VALIDATION. Please update your configuration." #elif defined(BLTOUCH_HEATERS_OFF) #error "BLTOUCH_HEATERS_OFF is now PROBING_HEATERS_OFF. Please update your configuration." +#elif defined(BLTOUCH_V3) + #error "BLTOUCH_V3 is obsolete. Please update your configuration." +#elif defined(BLTOUCH_FORCE_OPEN_DRAIN_MODE) + #error "BLTOUCH_FORCE_OPEN_DRAIN_MODE is obsolete. Please update your configuration." #elif defined(BEEPER) #error "BEEPER is now BEEPER_PIN. Please update your pins definitions." #elif defined(SDCARDDETECT) @@ -556,7 +560,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #if defined(EVENT_GCODE_SD_STOP) && DISABLED(NOZZLE_PARK_FEATURE) - static_assert(NULL == strstr(EVENT_GCODE_SD_STOP, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_STOP."); + static_assert(nullptr == strstr(EVENT_GCODE_SD_STOP, "G27"), "NOZZLE_PARK_FEATURE is required to use G27 in EVENT_GCODE_SD_STOP."); #endif /** @@ -613,8 +617,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "FILAMENT_RUNOUT_SENSOR with NUM_RUNOUT_SENSORS > 5 requires FIL_RUNOUT6_PIN." #elif DISABLED(SDSUPPORT, PRINTJOB_TIMER_AUTOSTART) #error "FILAMENT_RUNOUT_SENSOR requires SDSUPPORT or PRINTJOB_TIMER_AUTOSTART." + #elif FILAMENT_RUNOUT_DISTANCE_MM < 0 + #error "FILAMENT_RUNOUT_DISTANCE_MM must be greater than or equal to zero." #elif DISABLED(ADVANCED_PAUSE_FEATURE) - static_assert(NULL == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR."); + static_assert(nullptr == strstr(FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with FILAMENT_RUNOUT_SENSOR."); #endif #endif @@ -1016,6 +1022,14 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #endif + #if ENABLED(BLTOUCH) + #if BLTOUCH_DELAY < 200 + #error "BLTOUCH_DELAY less than 200 is unsafe and is not supported." + #elif DISABLED(BLTOUCH_FORCE_5V_MODE) && NONE(ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN, ENDSTOPPULLUP_ZMIN_PROBE) + #error "BLTOUCH without BLTOUCH_FORCE_5V_MODE requires ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN or ENDSTOPPULLUP_ZMIN_PROBE." + #endif + #endif + #if ENABLED(RACK_AND_PINION_PROBE) && !(defined(Z_PROBE_DEPLOY_X) && defined(Z_PROBE_RETRACT_X)) #error "RACK_AND_PINION_PROBE requires Z_PROBE_DEPLOY_X and Z_PROBE_RETRACT_X." #endif @@ -1337,6 +1351,27 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "You cannot set CASE_LIGHT_PIN equal to FAN_PIN." #endif +/** + * Required custom thermistor settings + */ +#if ENABLED(HEATER_0_USER_THERMISTOR) && !(defined(HOTEND0_PULLUP_RESISTOR_OHMS) && defined(HOTEND0_RESISTANCE_25C_OHMS) && defined(HOTEND0_BETA)) + #error "TEMP_SENSOR_0 1000 requires HOTEND0_PULLUP_RESISTOR_OHMS, HOTEND0_RESISTANCE_25C_OHMS and HOTEND0_BETA in Configuration_adv.h." +#elif ENABLED(HEATER_1_USER_THERMISTOR) && !(defined(HOTEND1_PULLUP_RESISTOR_OHMS) && defined(HOTEND1_RESISTANCE_25C_OHMS) && defined(HOTEND1_BETA)) + #error "TEMP_SENSOR_1 1000 requires HOTEND1_PULLUP_RESISTOR_OHMS, HOTEND1_RESISTANCE_25C_OHMS and HOTEND1_BETA in Configuration_adv.h." +#elif ENABLED(HEATER_2_USER_THERMISTOR) && !(defined(HOTEND2_PULLUP_RESISTOR_OHMS) && defined(HOTEND2_RESISTANCE_25C_OHMS) && defined(HOTEND2_BETA)) + #error "TEMP_SENSOR_2 1000 requires HOTEND2_PULLUP_RESISTOR_OHMS, HOTEND2_RESISTANCE_25C_OHMS and HOTEND2_BETA in Configuration_adv.h." +#elif ENABLED(HEATER_3_USER_THERMISTOR) && !(defined(HOTEND3_PULLUP_RESISTOR_OHMS) && defined(HOTEND3_RESISTANCE_25C_OHMS) && defined(HOTEND3_BETA)) + #error "TEMP_SENSOR_3 1000 requires HOTEND3_PULLUP_RESISTOR_OHMS, HOTEND3_RESISTANCE_25C_OHMS and HOTEND3_BETA in Configuration_adv.h." +#elif ENABLED(HEATER_4_USER_THERMISTOR) && !(defined(HOTEND4_PULLUP_RESISTOR_OHMS) && defined(HOTEND4_RESISTANCE_25C_OHMS) && defined(HOTEND4_BETA)) + #error "TEMP_SENSOR_4 1000 requires HOTEND4_PULLUP_RESISTOR_OHMS, HOTEND4_RESISTANCE_25C_OHMS and HOTEND4_BETA in Configuration_adv.h." +#elif ENABLED(HEATER_5_USER_THERMISTOR) && !(defined(HOTEND5_PULLUP_RESISTOR_OHMS) && defined(HOTEND5_RESISTANCE_25C_OHMS) && defined(HOTEND5_BETA)) + #error "TEMP_SENSOR_5 1000 requires HOTEND5_PULLUP_RESISTOR_OHMS, HOTEND5_RESISTANCE_25C_OHMS and HOTEND5_BETA in Configuration_adv.h." +#elif ENABLED(BED_USER_THERMISTOR) && !(defined(BED_PULLUP_RESISTOR_OHMS) && defined(BED_RESISTANCE_25C_OHMS) && defined(BED_BETA)) + #error "TEMP_SENSOR_BED 1000 requires BED_PULLUP_RESISTOR_OHMS, BED_RESISTANCE_25C_OHMS and BED_BETA in Configuration_adv.h." +#elif ENABLED(CHAMBER_USER_THERMISTOR) && !(defined(CHAMBER_PULLUP_RESISTOR_OHMS) && defined(CHAMBER_RESISTANCE_25C_OHMS) && defined(CHAMBER_BETA)) + #error "TEMP_SENSOR_CHAMBER 1000 requires CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS and CHAMBER_BETA in Configuration_adv.h." +#endif + /** * Test Heater, Temp Sensor, and Extruder Pins; Sensor Type must also be set. */ @@ -1766,7 +1801,9 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS + ENABLED(G3D_PANEL) \ + (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864)) \ + ENABLED(MKS_MINI_12864) \ - + ENABLED(FYSETC_MINI_12864) \ + + ENABLED(FYSETC_MINI_12864_1_2) \ + + ENABLED(FYSETC_MINI_12864_2_0) \ + + ENABLED(FYSETC_MINI_12864_2_1) \ + (ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(CARTESIO_UI, ZONESTAR_LCD)) \ + ENABLED(RIGIDBOT_PANEL) \ + ENABLED(RA_CONTROL_PANEL) \ @@ -1782,10 +1819,19 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS + ENABLED(OLED_PANEL_TINYBOY2) \ + ENABLED(ZONESTAR_LCD) \ + ENABLED(ULTI_CONTROLLER) \ - + ENABLED(EXTENSIBLE_UI) + + (ENABLED(EXTENSIBLE_UI) && DISABLED(MALYAN_LCD)) #error "Please select no more than one LCD controller option." #endif +/** + * FYSETC Mini 12864 RGB backlighting required + */ +#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) && DISABLED(RGB_LED) + #error "RGB_LED is required for FYSETC_MINI_12864 1.2 and 2.0." +#elif EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && DISABLED(LED_USER_PRESET_STARTUP) + #error "LED_USER_PRESET_STARTUP is required for FYSETC_MINI_12864 2.x displays." +#endif + /** * Check existing CS pins against enabled TMC SPI drivers. */ @@ -2110,7 +2156,7 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #elif EXTRUDERS != 5 #error "PRUSA_MMU2 requires EXTRUDERS = 5." #elif DISABLED(ADVANCED_PAUSE_FEATURE) - static_assert(NULL == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2."); + static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2."); #endif #endif diff --git a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp index b0d480073b..08cc468d20 100644 --- a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp +++ b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp @@ -889,7 +889,7 @@ int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) { int ret; size_t idx = 0; hd44780_charmap_t pinval; - hd44780_charmap_t *copy_address = NULL; + hd44780_charmap_t *copy_address = nullptr; pinval.uchar = c; pinval.idx = -1; @@ -900,7 +900,7 @@ int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) { lcd.write((uint8_t)c); return 1; } - copy_address = NULL; + copy_address = nullptr; ret = pf_bsearch_r((void *)g_hd44780_charmap_device, COUNT(g_hd44780_charmap_device), pf_bsearch_cb_comp_hd4map_pgm, (void *)&pinval, &idx); if (ret >= 0) { copy_address = (hd44780_charmap_t *)(g_hd44780_charmap_device + idx); diff --git a/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp b/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp index c8927725c5..4d205be300 100644 --- a/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp @@ -992,7 +992,7 @@ void MarlinUI::draw_status_screen() { #endif // ADVANCED_PAUSE_FEATURE - void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char *valstr/*=NULL*/) { + void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char *valstr/*=nullptr*/) { UNUSED(invert); int8_t n = LCD_WIDTH; lcd_moveto(0, row); @@ -1024,10 +1024,10 @@ void MarlinUI::draw_status_screen() { if (pgm) lcd_put_u8str_P(data); else lcd_put_u8str(data); } - void draw_edit_screen(PGM_P const pstr, const char* const value/*=NULL*/) { + void draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { lcd_moveto(0, 1); lcd_put_u8str_P(pstr); - if (value != NULL) { + if (value != nullptr) { lcd_put_wchar(':'); int len = utf8_strlen(value); const uint8_t valrow = (utf8_strlen_P(pstr) + 1 + len + 1) > (LCD_WIDTH - 2) ? 2 : 1; // Value on the next row if it won't fit @@ -1038,9 +1038,7 @@ void MarlinUI::draw_status_screen() { } void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff) { - SETCURSOR(0, 0); lcd_put_u8str_P(pref); - if (string) wrap_string(1, string); - if (suff) lcd_put_u8str_P(suff); + ui.draw_select_screen_prompt(pref, string, suff); SETCURSOR(0, LCD_HEIGHT - 1); lcd_put_wchar(yesno ? ' ' : '['); lcd_put_u8str_P(no); lcd_put_wchar(yesno ? ' ' : ']'); SETCURSOR_RJ(utf8_strlen_P(yes) + 2, LCD_HEIGHT - 1); diff --git a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h index 79f7f2f358..f0d795b840 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h @@ -24,16 +24,20 @@ #ifndef U8G_HAL_LINKS - uint8_t u8g_com_arduino_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); - #define U8G_COM_HAL_SW_SPI_FN u8g_com_arduino_sw_spi_fn #ifdef __SAM3X8E__ + uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_DUE_sw_spi_fn + uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_DUE_shared_hw_spi_fn uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_DUE_ST7920_sw_spi_fn #else + uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn + uint8_t u8g_com_arduino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); #define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn diff --git a/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp b/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp index 59ec0f2b28..d05d35e515 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp @@ -87,28 +87,48 @@ static const uint8_t u8g_dev_sh1106_128x64_data_start_2_wire[] PROGMEM = { U8G_ESC_END // end of sequence }; +#define SH1106_PAGE_ADR(N) (0x20), (N) +#define SH1106_COLUMN_RANGE(N) (0x21), (((N) >> 8) & 0xFF), ((N) & 0xFF) +#define SH1106_PAGE_RANGE(N,O) (0x22), (N), (O) +#define SH1106_SCROLL(N) ((N) ? 0x2F : 0x2E) +#define SH1106_START_LINE(N) (0x40 | (N)) +#define SH1106_CONTRAST(N) (0x81), (N) +#define SH1106_CHARGE_PUMP(N) (0x8D), ((N) ? 0x14 : 0x10) +#define SH1106_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0) +#define SH1106_ALL_PIX(N) ((N) ? 0xA5 : 0xA4) +#define SH1106_INVERTED(N) ((N) ? 0xA7 : 0xA6) +#define SH1106_MUX_RATIO(N) (0xA8), (N) +#define SH1106_ON(N) ((N) ? 0xAF : 0xAE) +#define SH1106_OUT_MODE(N) ((N) ? 0xC8 : 0xC0) +#define SH1106_DISP_OFFS(N) (0xD3), (N) +#define SH1106_OSC_FREQ(R,F) (0xD5), ((F) << 4 | (R)) +#define SH1106_CHARGE_PER(P,D) (0xD9), ((D) << 4 | (P)) +#define SH1106_COM_CONFIG(N) (0xDA), ((N) ? 0x12 : 0x02) +#define SH1106_VCOM_DESEL(N) (0xDB), (N) +#define SH1106_NOOP() (0xE3) + static const uint8_t u8g_dev_sh1106_128x64_init_seq_2_wire[] PROGMEM = { - U8G_ESC_ADR(0), // initiate command mode - 0x0AE, // display off, sleep mode - 0x0A8, 0x03F, // mux ratio - 0x0D3, 0x00, // display offset - 0x040, // start line - 0x0A1, // segment remap a0/a1 - 0x0C8, // c0: scan dir normal, c8: reverse - 0x0DA, 0x012, // com pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5) - 0x081, 0x0CF, // [2] set contrast control - 0x020, 0x002, // 2012-05-27: page addressing mode - 0x21, 2, 0x81, // set column range from 0 through 131 - 0x22, 0, 7, // set page range from 0 through 7 - 0x0D9, 0x0F1, // [2] pre-charge period 0x022/f1 - 0x0DB, 0x040, // vcomh deselect level - 0x0A4, // output ram to display - 0x0A6, // none inverted normal display mode - 0x0D5, 0x080, // clock divide ratio (0x00=1) and oscillator frequency (0x8) - 0x08D, 0x014, // [2] charge pump setting (p62): 0x014 enable, 0x010 disable - 0x02E, // 2012-05-27: Deactivate scroll - 0x0AF, // display on - U8G_ESC_END // end of sequence + U8G_ESC_ADR(0), // Initiate command mode + SH1106_ON(0), // Display off, sleep mode + SH1106_MUX_RATIO(0x3F), // Mux ratio + SH1106_DISP_OFFS(0), // Display offset + SH1106_START_LINE(0), // Start line + SH1106_ADC_REVERSE(1), // Segment remap A0/A1 + SH1106_OUT_MODE(1), // C0: scan dir normal, C8: reverse + SH1106_COM_CONFIG(1), // Com pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5) + SH1106_CONTRAST(0xCF), // [2] set contrast control + SH1106_PAGE_ADR(0x02), // 2012-05-27: page addressing mode + SH1106_COLUMN_RANGE(0x281), // Set column range from 0 through 131 + SH1106_PAGE_RANGE(0, 7), // Set page range from 0 through 7 + SH1106_CHARGE_PER(0x1, 0xF), // [2] pre-charge period 0x22/F1 + SH1106_VCOM_DESEL(0x40), // Vcomh deselect level + SH1106_ALL_PIX(0), // Output ram to display + SH1106_INVERTED(0), // Normal display mode + SH1106_OSC_FREQ(0, 8), // Clock divide ratio (0:1) and oscillator frequency (8) + SH1106_CHARGE_PUMP(1), // [2] charge pump setting (P62): 0x14 enable, 0x10 disable + SH1106_SCROLL(0), // 2012-05-27: Deactivate scroll + SH1106_ON(1), // Display on + U8G_ESC_END // End of sequence }; uint8_t u8g_dev_sh1106_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) { diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp index 089a268f19..32568fb09f 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp @@ -65,20 +65,21 @@ #define HEIGHT 64 #define PAGE_HEIGHT 8 -#define ST7565_ADC_REVERSE(N) (0xA0 | ((N) & 0x1)) -#define ST7565_BIAS_MODE(N) (0xA2 | ((N) & 0x1)) -#define ST7565_ALL_PIX(N) (0xA4 | ((N) & 0x1)) -#define ST7565_INVERTED(N) (0xA6 | ((N) & 0x1)) -#define ST7565_ON(N) (0xAE | ((N) & 0x1)) -#define ST7565_OUT_MODE(N) (0xC0 | ((N) & 0x1) << 3) +#define ST7565_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0) +#define ST7565_BIAS_MODE(N) ((N) ? 0xA3 : 0xA2) +#define ST7565_ALL_PIX(N) ((N) ? 0xA5 : 0xA4) +#define ST7565_INVERTED(N) ((N) ? 0xA7 : 0xA6) +#define ST7565_ON(N) ((N) ? 0xAF : 0xAE) +#define ST7565_OUT_MODE(N) ((N) ? 0xC8 : 0xC0) #define ST7565_POWER_CONTROL(N) (0x28 | (N)) -#define ST7565_V0_RATIO(N) (0x10 | ((N) & 0x7)) // Specific to Displaytech 64128N? (ST7565 is 0x20 | N) +#define ST7565_V0_RATIO(N) (0x10 | ((N) & 0x7)) +#define ST7565_V5_RATIO(N) (0x20 | ((N) & 0x7)) #define ST7565_CONTRAST(N) (0x81), (N) #define ST7565_COLUMN_ADR(N) (0x10 | (((N) >> 4) & 0xF)), ((N) & 0xF) #define ST7565_PAGE_ADR(N) (0xB0 | (N)) #define ST7565_START_LINE(N) (0x40 | (N)) -#define ST7565_SLEEP_MODE() (0xAC) +#define ST7565_SLEEP_MODE() (0xAC) // ,(N) needed? #define ST7565_NOOP() (0xE3) /* init sequence from https://github.com/adafruit/ST7565-LCD/blob/master/ST7565/ST7565.cpp */ @@ -91,7 +92,7 @@ static const uint8_t u8g_dev_st7565_64128n_HAL_init_seq[] PROGMEM = { ST7565_BIAS_MODE(0), // 0xA2: LCD bias 1/9 (according to Displaytech 64128N datasheet) ST7565_ADC_REVERSE(0), // Normal ADC Select (according to Displaytech 64128N datasheet) - ST7565_OUT_MODE(1), // common output mode: set scan direction normal operation/SHL Select, 0xC0 --> SHL = 0, normal, 0xC8 --> SHL = 1 + ST7565_OUT_MODE(1), // common output mode: set scan direction ST7565_START_LINE(0), // Display start line for Displaytech 64128N ST7565_POWER_CONTROL(0x4), // power control: turn on voltage converter diff --git a/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp index 4dd8759e7a..8f957042e4 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp @@ -65,38 +65,53 @@ #define HEIGHT 64 #define PAGE_HEIGHT 8 +#define UC1701_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0) +#define UC1701_BIAS_MODE(N) ((N) ? 0xA3 : 0xA2) +#define UC1701_ALL_PIX(N) ((N) ? 0xA5 : 0xA4) +#define UC1701_INVERTED(N) ((N) ? 0xA7 : 0xA6) +#define UC1701_ON(N) ((N) ? 0xAF : 0xAE) +#define UC1701_OUT_MODE(N) ((N) ? 0xC8 : 0xC0) +#define UC1701_POWER_CONTROL(N) (0x28 | (N)) +#define UC1701_V5_RATIO(N) (0x20 | ((N) & 0x7)) +#define UC1701_CONTRAST(N) (0x81), (N) + +#define UC1701_COLUMN_ADR(N) (0x10 | (((N) >> 4) & 0xF)), ((N) & 0xF) +#define UC1701_PAGE_ADR(N) (0xB0 | (N)) +#define UC1701_START_LINE(N) (0x40 | (N)) +#define UC1701_INDICATOR(N) (0xAC), (N) +#define UC1701_RESET() (0xE2) +#define UC1701_NOOP() (0xE3) +#define UC1701_BOOST_RATIO(N) (0xF8), (N) + static const uint8_t u8g_dev_uc1701_mini12864_HAL_init_seq[] PROGMEM = { U8G_ESC_CS(0), /* disable chip */ U8G_ESC_ADR(0), /* instruction mode */ U8G_ESC_RST(1), /* do reset low pulse with (1*16)+2 milliseconds */ U8G_ESC_CS(1), /* enable chip */ - 0x0E2, /* soft reset */ - 0x040, /* set display start line to 0 */ - 0x0A0, /* ADC set to reverse */ - 0x0C8, /* common output mode */ - 0x0A6, /* display normal, bit val 0: LCD pixel off. */ - 0x0A2, /* LCD bias 1/9 */ - 0x02F, /* all power control circuits on */ - 0x0F8, /* set booster ratio to */ - 0x000, /* 4x */ - 0x023, /* set V0 voltage resistor ratio to large */ - 0x081, /* set contrast */ - 0x027, /* contrast value */ - 0x0AC, /* indicator */ - 0x000, /* disable */ - 0x0AF, /* display on */ + UC1701_RESET(), /* soft reset */ + UC1701_START_LINE(0), /* set display start line to 0 */ + UC1701_ADC_REVERSE(0), /* ADC set to reverse */ + UC1701_OUT_MODE(1), /* common output mode */ + UC1701_INVERTED(0), /* display normal, bit val 0: LCD pixel off. */ + UC1701_BIAS_MODE(0), /* LCD bias 1/9 */ + UC1701_POWER_CONTROL(0x7), /* all power control circuits on */ + UC1701_BOOST_RATIO(0x0), /* set booster ratio to 4x */ + UC1701_V5_RATIO(3), /* set V0 voltage resistor ratio to large */ + UC1701_CONTRAST(0x27), /* set contrast */ + UC1701_INDICATOR(0), /* indicator */ + UC1701_ON(1), /* display on */ U8G_ESC_CS(0), /* disable chip */ U8G_ESC_DLY(100), /* delay 100 ms */ U8G_ESC_CS(1), /* enable chip */ - 0x0A5, /* display all points, ST7565 */ + UC1701_ALL_PIX(1), /* display all points, ST7565 */ U8G_ESC_CS(0), /* disable chip */ U8G_ESC_DLY(100), /* delay 100 ms */ U8G_ESC_DLY(100), /* delay 100 ms */ U8G_ESC_CS(1), /* enable chip */ - 0x0A4, /* normal display */ + UC1701_ALL_PIX(0), /* normal display */ U8G_ESC_CS(0), /* disable chip */ U8G_ESC_END /* end of sequence */ }; @@ -104,8 +119,7 @@ static const uint8_t u8g_dev_uc1701_mini12864_HAL_init_seq[] PROGMEM = { static const uint8_t u8g_dev_uc1701_mini12864_HAL_data_start[] PROGMEM = { U8G_ESC_ADR(0), /* instruction mode */ U8G_ESC_CS(1), /* enable chip */ - 0x010, /* set upper 4 bit of the col adr to 0 */ - 0x000, /* set lower 4 bit of the col adr to 4 */ + UC1701_COLUMN_ADR(0), /* address 0 */ U8G_ESC_END /* end of sequence */ }; diff --git a/Marlin/src/lcd/dogm/u8g_fontutf8.cpp b/Marlin/src/lcd/dogm/u8g_fontutf8.cpp index 115919954f..fe6cf9266c 100644 --- a/Marlin/src/lcd/dogm/u8g_fontutf8.cpp +++ b/Marlin/src/lcd/dogm/u8g_fontutf8.cpp @@ -64,10 +64,10 @@ static const font_t* fontgroup_find(font_group_t * root, wchar_t val) { uxg_fontinfo_t vcmp = {(uint16_t)(val / 128), (uint8_t)(val % 128 + 128), (uint8_t)(val % 128 + 128), 0, 0}; size_t idx = 0; - if (val < 256) return NULL; + if (val < 256) return nullptr; if (pf_bsearch_r((void*)root->m_fntifo, root->m_fntinfo_num, pf_bsearch_cb_comp_fntifo_pgm, (void*)&vcmp, &idx) < 0) - return NULL; + return nullptr; memcpy_P(&vcmp, root->m_fntifo + idx, sizeof(vcmp)); return vcmp.fntdata; @@ -114,7 +114,7 @@ static void fontgroup_drawstring(font_group_t *group, const font_t *fnt_default, } static bool flag_fontgroup_was_inited = false; -static font_group_t g_fontgroup_root = {NULL, 0}; +static font_group_t g_fontgroup_root = { nullptr, 0 }; /** * @brief check if font is loaded @@ -176,7 +176,7 @@ unsigned int uxg_DrawWchar(u8g_t *pu8g, unsigned int x, unsigned int y, wchar_t data.y = y; data.adv = 0; data.max_width = max_width; - data.fnt_prev = NULL; + data.fnt_prev = nullptr; fontgroup_drawwchar(group, fnt_default, ch, (void*)&data, fontgroup_cb_draw_u8g); u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default); @@ -210,7 +210,7 @@ unsigned int uxg_DrawUtf8Str(u8g_t *pu8g, unsigned int x, unsigned int y, const data.y = y; data.adv = 0; data.max_width = max_width; - data.fnt_prev = NULL; + data.fnt_prev = nullptr; fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_ram, (void*)&data, fontgroup_cb_draw_u8g); u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default); @@ -244,7 +244,7 @@ unsigned int uxg_DrawUtf8StrP(u8g_t *pu8g, unsigned int x, unsigned int y, PGM_P data.y = y; data.adv = 0; data.max_width = max_width; - data.fnt_prev = NULL; + data.fnt_prev = nullptr; fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_rom, (void*)&data, fontgroup_cb_draw_u8g); u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default); diff --git a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp index 1ab6b18cf2..a337668db7 100644 --- a/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_DOGM.cpp @@ -233,7 +233,7 @@ void MarlinUI::init_lcd() { OUT_WRITE(LCD_RESET_PIN, LOW); // perform a clean hardware reset _delay_ms(5); OUT_WRITE(LCD_RESET_PIN, HIGH); - _delay_ms(5); // delay to allow the display to initalize + _delay_ms(5); // delay to allow the display to initialize #endif #if PIN_EXISTS(LCD_RESET) @@ -330,7 +330,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop } // Draw a static line of text in the same idiom as a menu item - void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char* valstr/*=NULL*/) { + void draw_menu_item_static(const uint8_t row, PGM_P pstr, const bool center/*=true*/, const bool invert/*=false*/, const char* valstr/*=nullptr*/) { if (mark_as_selected(row, invert)) { @@ -373,7 +373,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop } } - void draw_edit_screen(PGM_P const pstr, const char* const value/*=NULL*/) { + void draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { const uint8_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value); bool extra_row = labellen > LCD_WIDTH - 2 - vallen; @@ -410,7 +410,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop } // If a value is included, print a colon, then print the value right-justified - if (value != NULL) { + if (value != nullptr) { lcd_put_wchar(':'); if (extra_row) { // Assume that value is numeric (with no descender) @@ -439,9 +439,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop } void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff) { - SETCURSOR(0, 0); lcd_put_u8str_P(pref); - if (string) wrap_string(1, string); - if (suff) lcd_put_u8str_P(suff); + ui.draw_select_screen_prompt(pref, string, suff); draw_boxed_string(1, LCD_HEIGHT - 1, no, !yesno); draw_boxed_string(LCD_WIDTH - (utf8_strlen_P(yes) + 1), LCD_HEIGHT - 1, yes, yesno); } diff --git a/Marlin/src/lcd/dogm/ultralcd_DOGM.h b/Marlin/src/lcd/dogm/ultralcd_DOGM.h index 8ce25d0e77..0e97b4c8ff 100644 --- a/Marlin/src/lcd/dogm/ultralcd_DOGM.h +++ b/Marlin/src/lcd/dogm/ultralcd_DOGM.h @@ -107,12 +107,16 @@ // Generic support for SSD1309 OLED I2C LCDs #define U8G_CLASS U8GLIB_SSD1309_128X64 #define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST) -#elif EITHER(MINIPANEL, FYSETC_MINI_12864) - // The MINIPanel display +#elif ENABLED(MINIPANEL) + // MINIPanel display //#define U8G_CLASS U8GLIB_MINI12864 //#define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 8 stripes + #define U8G_CLASS U8GLIB_MINI12864_2X + #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 8 stripes +#elif ENABLED(FYSETC_MINI_12864) + // The FYSETC_MINI_12864 display #define U8G_CLASS U8GLIB_MINI12864_2X_HAL - #if BOTH(FYSETC_MINI_12864, FORCE_SOFT_SPI) + #if ENABLED(FORCE_SOFT_SPI) #define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0 // 4 stripes SW-SPI #else #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 4 stripes HW-SPI diff --git a/Marlin/src/lcd/extensible_ui/lib/Creality_DWIN.cpp b/Marlin/src/lcd/extensible_ui/lib/Creality_DWIN.cpp index 8dff184d00..28a78c4118 100644 --- a/Marlin/src/lcd/extensible_ui/lib/Creality_DWIN.cpp +++ b/Marlin/src/lcd/extensible_ui/lib/Creality_DWIN.cpp @@ -1746,4 +1746,34 @@ void onPrinterKilled(PGM_P const msg) {} rtscheck.RTS_SndData(15-(xpos*ypos),AutolevelIcon); }; + void onStoreSettings(char *buff) { + // This is called when saving to EEPROM (i.e. M500). If the ExtUI needs + // permanent data to be stored, it can write up to eeprom_data_size bytes + // into buff. + + // Example: + // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // memcpy(buff, &myDataStruct, sizeof(myDataStruct)); + } + + void onLoadSettings(const char *buff) { + // This is called while loading settings from EEPROM. If the ExtUI + // needs to retrieve data, it should copy up to eeprom_data_size bytes + // from buff + + // Example: + // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // memcpy(&myDataStruct, buff, sizeof(myDataStruct)); + } + + void onConfigurationStoreWritten(bool success) { + // This is called after the entire EEPROM has been written, + // whether successful or not. + } + + void onConfigurationStoreRead(bool success) { + // This is called after the entire EEPROM has been read, + // whether successful or not. +} + } // NAMESPACE EXT_UI \ No newline at end of file diff --git a/Marlin/src/lcd/extensible_ui/ui_api.cpp b/Marlin/src/lcd/extensible_ui/ui_api.cpp index 54b9f06358..017b652a0c 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.cpp +++ b/Marlin/src/lcd/extensible_ui/ui_api.cpp @@ -82,11 +82,7 @@ #include "ui_api.h" #if ENABLED(BACKLASH_GCODE) - extern float backlash_distance_mm[XYZ]; - extern uint8_t backlash_correction; - #ifdef BACKLASH_SMOOTHING_MM - extern float backlash_smoothing_mm; - #endif + #include "../../feature/backlash.h" #endif #if HAS_LEVELING @@ -111,7 +107,6 @@ static struct { } flags; namespace ExtUI { - #ifdef __SAM3X8E__ /** * Implement a special millis() to allow time measurement @@ -153,9 +148,7 @@ namespace ExtUI { } #endif // __SAM3X8E__ - void delay_us(unsigned long us) { - DELAY_US(us); - } + void delay_us(unsigned long us) { DELAY_US(us); } void delay_ms(unsigned long ms) { if (flags.printer_killed) @@ -169,14 +162,49 @@ namespace ExtUI { thermalManager.manage_heater(); } - float getActualTemp_celsius(const heater_t heater) { - return heater == BED ? + void enableHeater(const extruder_t extruder) { + #if HEATER_IDLE_HANDLER + thermalManager.reset_heater_idle_timer(extruder - E0); + #endif + } + + void enableHeater(const heater_t heater) { + #if HEATER_IDLE_HANDLER #if HAS_HEATED_BED - thermalManager.degBed() - #else - 0 + if (heater == BED) + thermalManager.reset_bed_idle_timer(); + else #endif - : thermalManager.degHotend(heater - H0); + thermalManager.reset_heater_idle_timer(heater - H0); + #endif + } + + bool isHeaterIdle(const extruder_t extruder) { + return false + #if HEATER_IDLE_HANDLER + || thermalManager.hotend_idle[extruder - E0].timed_out + #endif + ; + } + + bool isHeaterIdle(const heater_t heater) { + return (false + #if HEATER_IDLE_HANDLER + || (heater == BED ? (false + #if HAS_HEATED_BED + || thermalManager.bed_idle.timed_out + #endif + ) : thermalManager.hotend_idle[heater - H0].timed_out) + #endif + ); + } + + float getActualTemp_celsius(const heater_t heater) { + return heater == BED ? (0 + #if HAS_HEATED_BED + + thermalManager.degBed() + #endif + ) : thermalManager.degHotend(heater - H0); } float getActualTemp_celsius(const extruder_t extruder) { @@ -184,13 +212,11 @@ namespace ExtUI { } float getTargetTemp_celsius(const heater_t heater) { - return heater == BED ? + return heater == BED ? (0 #if HAS_HEATED_BED - thermalManager.degTargetBed() - #else - 0 + + thermalManager.degTargetBed() #endif - : thermalManager.degTargetHotend(heater - H0); + ) : thermalManager.degTargetHotend(heater - H0); } float getTargetTemp_celsius(const extruder_t extruder) { @@ -257,8 +283,7 @@ namespace ExtUI { } #endif - if (!flags.manual_motion) - set_destination_from_current(); + if (!flags.manual_motion) set_destination_from_current(); destination[axis] = clamp(position, min, max); flags.manual_motion = true; } @@ -266,8 +291,7 @@ namespace ExtUI { void setAxisPosition_mm(const float position, const extruder_t extruder) { setActiveTool(extruder, true); - if (!flags.manual_motion) - set_destination_from_current(); + if (!flags.manual_motion) set_destination_from_current(); destination[E_AXIS] = position; flags.manual_motion = true; } @@ -308,8 +332,7 @@ namespace ExtUI { #if EXTRUDERS > 1 const uint8_t e = extruder - E0; #if DO_SWITCH_EXTRUDER || EITHER(SWITCHING_NOZZLE, PARKING_EXTRUDER) - if (e != active_extruder) - tool_change(e, 0, no_move); + if (e != active_extruder) tool_change(e, 0, no_move); #endif active_extruder = e; #endif @@ -346,13 +369,8 @@ namespace ExtUI { } #if HAS_SOFTWARE_ENDSTOPS - bool getSoftEndstopState() { - return soft_endstops_enabled; - } - - void setSoftEndstopState(const bool value) { - soft_endstops_enabled = value; - } + bool getSoftEndstopState() { return soft_endstops_enabled; } + void setSoftEndstopState(const bool value) { soft_endstops_enabled = value; } #endif #if HAS_TRINAMIC @@ -517,14 +535,9 @@ namespace ExtUI { bool getFilamentRunoutEnabled() { return runout.enabled; } void setFilamentRunoutEnabled(const bool value) { runout.enabled = value; } - #if FILAMENT_RUNOUT_DISTANCE_MM > 0 - float getFilamentRunoutDistance_mm() { - return RunoutResponseDelayed::runout_distance_mm; - } - - void setFilamentRunoutDistance_mm(const float value) { - RunoutResponseDelayed::runout_distance_mm = clamp(value, 0, 999); - } + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + float getFilamentRunoutDistance_mm() { return runout.runout_distance(); } + void setFilamentRunoutDistance_mm(const float value) { runout.set_runout_distance(clamp(value, 0, 999)); } #endif #endif @@ -687,16 +700,16 @@ namespace ExtUI { #endif // HAS_HOTEND_OFFSET #if ENABLED(BACKLASH_GCODE) - float getAxisBacklash_mm(const axis_t axis) { return backlash_distance_mm[axis]; } + float getAxisBacklash_mm(const axis_t axis) { return backlash.distance_mm[axis]; } void setAxisBacklash_mm(const float value, const axis_t axis) - { backlash_distance_mm[axis] = clamp(value,0,5); } + { backlash.distance_mm[axis] = clamp(value,0,5); } - float getBacklashCorrection_percent() { return ui8_to_percent(backlash_correction); } - void setBacklashCorrection_percent(const float value) { backlash_correction = map(clamp(value, 0, 100), 0, 100, 0, 255); } + float getBacklashCorrection_percent() { return ui8_to_percent(backlash.correction); } + void setBacklashCorrection_percent(const float value) { backlash.correction = map(clamp(value, 0, 100), 0, 100, 0, 255); } #ifdef BACKLASH_SMOOTHING_MM - float getBacklashSmoothing_mm() { return backlash_smoothing_mm; } - void setBacklashSmoothing_mm(const float value) { backlash_smoothing_mm = clamp(value, 0, 999); } + float getBacklashSmoothing_mm() { return backlash.smoothing_mm; } + void setBacklashSmoothing_mm(const float value) { backlash.smoothing_mm = clamp(value, 0, 999); } #endif #endif @@ -712,10 +725,10 @@ namespace ExtUI { #if HAS_LEVELING bool getLevelingActive() { return planner.leveling_active; } void setLevelingActive(const bool state) { set_bed_leveling_enabled(state); } + bool getMeshValid() { return leveling_is_valid(); } #if HAS_MESH - bool getMeshValid() { return leveling_is_valid(); } - //bed_mesh_t getMeshArray = Z_VALUES_ARR; - float getMeshPoint(const uint8_t xpos, const uint8_t ypos) { return Z_VALUES(xpos,ypos);} + bed_mesh_t getMeshArray() { return Z_VALUES_ARR; } + float getMeshPoint(const uint8_t xpos, const uint8_t ypos) { return Z_VALUES(xpos,ypos); } void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zoff) { if (WITHIN(xpos, 0, GRID_MAX_POINTS_X) && WITHIN(ypos, 0, GRID_MAX_POINTS_Y)) { Z_VALUES(xpos, ypos) = zoff; @@ -766,6 +779,7 @@ namespace ExtUI { void setTargetTemp_celsius(float value, const heater_t heater) { constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP); const int16_t e = heater - H0; + enableHeater(heater); #if HAS_HEATED_BED if (heater == BED) thermalManager.setTargetBed(clamp(value, 0, BED_MAXTEMP - 10)); @@ -777,6 +791,7 @@ namespace ExtUI { void setTargetTemp_celsius(float value, const extruder_t extruder) { constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP); const int16_t e = extruder - E0; + enableHeater(extruder); thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e); } diff --git a/Marlin/src/lcd/extensible_ui/ui_api.h b/Marlin/src/lcd/extensible_ui/ui_api.h index 550fc7f2fb..4ad4b45b09 100644 --- a/Marlin/src/lcd/extensible_ui/ui_api.h +++ b/Marlin/src/lcd/extensible_ui/ui_api.h @@ -46,16 +46,25 @@ #include "../../inc/MarlinConfig.h" namespace ExtUI { + // The ExtUI implementation can store up to this many bytes + // in the EEPROM when the methods onStoreSettings and + // onLoadSettings are called. + + static constexpr size_t eeprom_data_size = 48; enum axis_t : uint8_t { X, Y, Z }; enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5 }; enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED }; enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5 }; - + constexpr uint8_t extruderCount = EXTRUDERS; constexpr uint8_t hotendCount = HOTENDS; constexpr uint8_t fanCount = FAN_COUNT; + #if HAS_MESH + typedef float (&bed_mesh_t)[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; + #endif + bool isMoving(); bool isAxisPositionKnown(const axis_t); bool isPositionKnown(); // Axis position guaranteed, steppers active since homing @@ -65,6 +74,11 @@ namespace ExtUI { void enqueueCommands_P(PGM_P const); bool commandsInQueue(); + bool isHeaterIdle(const heater_t); + bool isHeaterIdle(const extruder_t); + void enableHeater(const heater_t); + void enableHeater(const extruder_t); + /** * Getters and setters * Should be used by the EXTENSIBLE_UI to query or change Marlin's state. @@ -112,10 +126,9 @@ namespace ExtUI { #if HAS_LEVELING bool getLevelingActive(); void setLevelingActive(const bool); + bool getMeshValid(); #if HAS_MESH - #include "../../feature/bedlevel/bedlevel.h" - bool getMeshValid(); - //float *getMeshArray[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y] = &Z_VALUES_ARR; + bed_mesh_t getMeshArray(); float getMeshPoint(const uint8_t xpos, const uint8_t ypos); void setMeshPoint(const uint8_t xpos, const uint8_t ypos, const float zval); void onMeshUpdate(const uint8_t xpos, const uint8_t ypos, const float zval); @@ -207,7 +220,7 @@ namespace ExtUI { bool getFilamentRunoutEnabled(); void setFilamentRunoutEnabled(const bool); - #if FILAMENT_RUNOUT_DISTANCE_MM > 0 + #ifdef FILAMENT_RUNOUT_DISTANCE_MM float getFilamentRunoutDistance_mm(); void setFilamentRunoutDistance_mm(const float); #endif @@ -283,8 +296,10 @@ namespace ExtUI { void onUserConfirmRequired(const char * const msg); void onStatusChanged(const char * const msg); void onFactoryReset(); - void onStoreSettings(); - void onLoadSettings(); + void onStoreSettings(char *); + void onLoadSettings(const char *); + void onConfigurationStoreWritten(bool success); + void onConfigurationStoreRead(bool success); }; /** diff --git a/Marlin/src/lcd/fontutils.h b/Marlin/src/lcd/fontutils.h index 2f4dca7dca..28921aef25 100644 --- a/Marlin/src/lcd/fontutils.h +++ b/Marlin/src/lcd/fontutils.h @@ -8,9 +8,10 @@ */ #pragma once -#include -#include +#include "../HAL/shared/Marduino.h" #include "../core/macros.h" + +#include #include // wchar_t #include // uint32_t diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 9275b08643..05dbf899df 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -39,6 +39,7 @@ #define MSG_BACK _UxGT("Zurück") #define MSG_SD_INSERTED _UxGT("SD-Karte erkannt") #define MSG_SD_REMOVED _UxGT("SD-Karte entfernt") +#define MSG_SD_RELEASED _UxGT("SD-Karte freigeg.") #define MSG_LCD_ENDSTOPS _UxGT("Endstopp") // Max length 8 characters #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Soft-Endstopp") #define MSG_MAIN _UxGT("Hauptmenü") @@ -273,8 +274,13 @@ #define MSG_PREPARE _UxGT("Vorbereitung") #define MSG_TUNE _UxGT("Justierung") #define MSG_START_PRINT _UxGT("Starte Druck") -#define MSG_BUTTON_PRINT _UxGT("Drucke") +#define MSG_BUTTON_NEXT _UxGT("Weiter") +#define MSG_BUTTON_INIT _UxGT("Init") +#define MSG_BUTTON_STOP _UxGT("Stop") +#define MSG_BUTTON_PRINT _UxGT("Drucken") +#define MSG_BUTTON_RESET _UxGT("Zurücksetzen") #define MSG_BUTTON_CANCEL _UxGT("Abbrechen") +#define MSG_BUTTON_DONE _UxGT("Fertig") #define MSG_PAUSE_PRINT _UxGT("SD-Druck pausieren") #define MSG_RESUME_PRINT _UxGT("SD-Druck fortsetzen") #define MSG_STOP_PRINT _UxGT("SD-Druck abbrechen") @@ -308,8 +314,9 @@ #define MSG_FILAMENTLOAD _UxGT("Filament laden") #define MSG_FILAMENTUNLOAD _UxGT("Filament entladen") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Alles entladen") -#define MSG_INIT_SDCARD _UxGT("SD-Karte initialisi.") // Manually initialize the SD-card via user interface +#define MSG_INIT_SDCARD _UxGT("SD-Karte initial.") // Manually initialize the SD-card via user interface #define MSG_CHANGE_SDCARD _UxGT("SD-Karte getauscht") // SD-card changed by user. For machines with no autocarddetect. Both send "M21" +#define MSG_RELEASE_SDCARD _UxGT("SD-Karte freigeben") // if Marlin gets confused - M22 #define MSG_ZPROBE_OUT _UxGT("Z-Sonde außerhalb") #define MSG_SKEW_FACTOR _UxGT("Korrekturfaktor") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -318,7 +325,7 @@ #define MSG_BLTOUCH_DEPLOY _UxGT("BLTouch ausfahren") #define MSG_BLTOUCH_SW_MODE _UxGT("BLTouch SW-Modus") #define MSG_BLTOUCH_5V_MODE _UxGT("BLTouch 5V-Modus") -#define MSG_BLTOUCH_STOW _UxGT("BLTouch einfahren") +#define MSG_BLTOUCH_OD_MODE _UxGT("BLTouch OD Mode") #define MSG_BLTOUCH_STOW _UxGT("BLTouch einfahren") #define MSG_MANUAL_DEPLOY _UxGT("Z-Sonde ausfahren") #define MSG_MANUAL_STOW _UxGT("Z-Sonde einfahren") @@ -353,6 +360,8 @@ #define MSG_COOLING _UxGT("Extr. kühlt...") #define MSG_BED_HEATING _UxGT("Bett heizt...") #define MSG_BED_COOLING _UxGT("Bett kühlt...") +#define MSG_CHAMBER_HEATING _UxGT("Gehäuse heizt...") +#define MSG_CHAMBER_COOLING _UxGT("Gehäuse kühlt...") #define MSG_DELTA_CALIBRATE _UxGT("Delta kalibrieren") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibriere X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibriere Y") @@ -439,7 +448,7 @@ #define MSG_MMU2_FILAMENT2 _UxGT("Filament 3") #define MSG_MMU2_FILAMENT3 _UxGT("Filament 4") #define MSG_MMU2_FILAMENT4 _UxGT("Filament 5") -#define MSG_MMU2_RESET _UxGT("setz MMU zurück") +#define MSG_MMU2_RESET _UxGT("setze MMU zurück") #define MSG_MMU2_RESETTING _UxGT("MMU zurücksetzen...") #define MSG_MMU2_EJECT_RECOVER _UxGT("Entfernen, klicken") @@ -460,7 +469,7 @@ #define MSG_COMMIT_VTOOL _UxGT("V-Tool Mix sichern") #define MSG_VTOOLS_RESET _UxGT("V-Tools ist resetet") #define MSG_START_Z _UxGT("Z Start") -#define MSG_END_Z _UxGT("Z End") +#define MSG_END_Z _UxGT("Z Ende") #define MSG_BRICKOUT _UxGT("Brickout") #define MSG_INVADERS _UxGT("Invaders") #define MSG_SNAKE _UxGT("Sn4k3") @@ -472,7 +481,8 @@ #if LCD_HEIGHT >= 4 #define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Knopf drücken um") #define MSG_ADVANCED_PAUSE_WAITING_2 _UxGT("Druck fortzusetzen") - #define MSG_PAUSE_PRINT_INIT_1 _UxGT("Parken...") + #define MSG_PAUSE_PRINT_INIT_1 _UxGT("Druck ist") + #define MSG_PAUSE_PRINT_INIT_2 _UxGT("pausiert...") #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Warte auf den") #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("Start des") #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("Filamentwechsels...") @@ -500,6 +510,7 @@ #define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("Drucks...") #else // LCD_HEIGHT < 4 #define MSG_ADVANCED_PAUSE_WAITING_1 MSG_USERWAIT + #define MSG_PAUSE_PRINT_INIT_1 _UxGT("Pausiert...") #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Bitte warten...") #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Laden und Klick") #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Klick zum Heizen") diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index d16cd44d47..440177ab98 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -67,6 +67,9 @@ #ifndef MSG_SD_REMOVED #define MSG_SD_REMOVED _UxGT("Card removed") #endif +#ifndef MSG_SD_RELEASED + #define MSG_SD_RELEASED _UxGT("Card released") +#endif #ifndef MSG_LCD_ENDSTOPS #define MSG_LCD_ENDSTOPS _UxGT("Endstops") // Max length 8 characters #endif @@ -753,12 +756,27 @@ #ifndef MSG_START_PRINT #define MSG_START_PRINT _UxGT("Start print") #endif +#ifndef MSG_BUTTON_NEXT + #define MSG_BUTTON_NEXT _UxGT("Next") +#endif +#ifndef MSG_BUTTON_INIT + #define MSG_BUTTON_INIT _UxGT("Init") +#endif +#ifndef MSG_BUTTON_STOP + #define MSG_BUTTON_STOP _UxGT("Stop") +#endif #ifndef MSG_BUTTON_PRINT #define MSG_BUTTON_PRINT _UxGT("Print") #endif +#ifndef MSG_BUTTON_RESET + #define MSG_BUTTON_RESET _UxGT("Reset") +#endif #ifndef MSG_BUTTON_CANCEL #define MSG_BUTTON_CANCEL _UxGT("Cancel") #endif +#ifndef MSG_BUTTON_DONE + #define MSG_BUTTON_DONE _UxGT("Done") +#endif #ifndef MSG_PAUSE_PRINT #define MSG_PAUSE_PRINT _UxGT("Pause print") #endif @@ -864,6 +882,9 @@ #ifndef MSG_CHANGE_SDCARD #define MSG_CHANGE_SDCARD _UxGT("Change SD card") #endif +#ifndef MSG_RELEASE_SDCARD + #define MSG_RELEASE_SDCARD _UxGT("Release SD card") +#endif #ifndef MSG_ZPROBE_OUT #define MSG_ZPROBE_OUT _UxGT("Z Probe past bed") #endif @@ -883,7 +904,7 @@ #define MSG_BLTOUCH_DEPLOY _UxGT("Deploy BLTouch") #endif #ifndef MSG_BLTOUCH_SW_MODE - #define MSG_BLTOUCH_SW_MODE _UxGT("SW Deploy BLTouch") + #define MSG_BLTOUCH_SW_MODE _UxGT("BLTouch SW Mode") #endif #ifndef MSG_BLTOUCH_5V_MODE #define MSG_BLTOUCH_5V_MODE _UxGT("BLTouch 5V Mode") @@ -993,6 +1014,12 @@ #ifndef MSG_BED_COOLING #define MSG_BED_COOLING _UxGT("Bed cooling...") #endif +#ifndef MSG_CHAMBER_HEATING + #define MSG_CHAMBER_HEATING _UxGT("Chamber heating...") +#endif +#ifndef MSG_CHAMBER_COOLING + #define MSG_CHAMBER_COOLING _UxGT("Chamber cooling...") +#endif #ifndef MSG_DELTA_CALIBRATE #define MSG_DELTA_CALIBRATE _UxGT("Delta Calibration") #endif diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index e45bb3277d..f53bb30ca8 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -38,6 +38,7 @@ #define MSG_BACK _UxGT("Retour") #define MSG_SD_INSERTED _UxGT("Carte insérée") #define MSG_SD_REMOVED _UxGT("Carte retirée") +#define MSG_SD_RELEASED _UxGT("Carte libérée") #define MSG_LCD_ENDSTOPS _UxGT("Butées") #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Butées SW") #define MSG_MAIN _UxGT("Menu principal") @@ -47,32 +48,32 @@ #define MSG_DISABLE_STEPPERS _UxGT("Arrêter moteurs") #define MSG_DEBUG_MENU _UxGT("Menu debug") #define MSG_PROGRESS_BAR_TEST _UxGT("Test barre progress.") -#define MSG_AUTO_HOME _UxGT("Origine auto.") -#define MSG_AUTO_HOME_X _UxGT("Origine X auto.") -#define MSG_AUTO_HOME_Y _UxGT("Origine Y auto.") -#define MSG_AUTO_HOME_Z _UxGT("Origine Z auto.") -#define MSG_AUTO_Z_ALIGN _UxGT("Align. Z auto.") -#define MSG_LEVEL_BED_HOMING _UxGT("Origine XYZ") +#define MSG_AUTO_HOME _UxGT("Origine auto") +#define MSG_AUTO_HOME_X _UxGT("Origine X auto") +#define MSG_AUTO_HOME_Y _UxGT("Origine Y auto") +#define MSG_AUTO_HOME_Z _UxGT("Origine Z auto") +#define MSG_AUTO_Z_ALIGN _UxGT("Align. Z auto") +#define MSG_LEVEL_BED_HOMING _UxGT("Origine XYZ...") #define MSG_LEVEL_BED_WAITING _UxGT("Clic pour commencer") #define MSG_LEVEL_BED_NEXT_POINT _UxGT("Point suivant") #define MSG_LEVEL_BED_DONE _UxGT("Mise à niveau OK!") #define MSG_Z_FADE_HEIGHT _UxGT("Hauteur lissée") -#define MSG_SET_HOME_OFFSETS _UxGT("Régl. décal. origine") +#define MSG_SET_HOME_OFFSETS _UxGT("Régl. décal origine") #define MSG_HOME_OFFSETS_APPLIED _UxGT("Décalages appliqués") #define MSG_SET_ORIGIN _UxGT("Régler origine") #define MSG_PREHEAT_1 _UxGT("Préchauffage " PREHEAT_1_LABEL) #define MSG_PREHEAT_1_N _UxGT("Préchauff. " PREHEAT_1_LABEL " ") #define MSG_PREHEAT_1_ALL _UxGT("Préch. " PREHEAT_1_LABEL " Tout") -#define MSG_PREHEAT_1_END MSG_PREHEAT_1 _UxGT(" buse") +#define MSG_PREHEAT_1_END _UxGT("Préch. " PREHEAT_1_LABEL " buse") #define MSG_PREHEAT_1_BEDONLY _UxGT("Préch. " PREHEAT_1_LABEL " lit") -#define MSG_PREHEAT_1_SETTINGS _UxGT("Régl. préch. " PREHEAT_1_LABEL) +#define MSG_PREHEAT_1_SETTINGS _UxGT("Régler préch. " PREHEAT_1_LABEL) #define MSG_PREHEAT_2 _UxGT("Préchauffage " PREHEAT_2_LABEL) #define MSG_PREHEAT_2_N _UxGT("Préchauff. " PREHEAT_2_LABEL " ") #define MSG_PREHEAT_2_ALL _UxGT("Préch. " PREHEAT_2_LABEL " Tout") -#define MSG_PREHEAT_2_END MSG_PREHEAT_2 _UxGT(" buse") +#define MSG_PREHEAT_2_END _UxGT("Préch. " PREHEAT_2_LABEL " buse") #define MSG_PREHEAT_2_BEDONLY _UxGT("Préch. " PREHEAT_2_LABEL " lit") -#define MSG_PREHEAT_2_SETTINGS _UxGT("Régl. préch. " PREHEAT_2_LABEL) -#define MSG_PREHEAT_CUSTOM _UxGT("Préchauff. perso.") +#define MSG_PREHEAT_2_SETTINGS _UxGT("Régler préch. " PREHEAT_2_LABEL) +#define MSG_PREHEAT_CUSTOM _UxGT("Préchauffage perso") #define MSG_COOLDOWN _UxGT("Refroidir") #define MSG_LASER_MENU _UxGT("Contrôle Laser") #define MSG_LASER_OFF _UxGT("Laser Off") @@ -84,15 +85,15 @@ #define MSG_EXTRUDE _UxGT("Extrusion") #define MSG_RETRACT _UxGT("Retrait") #define MSG_MOVE_AXIS _UxGT("Déplacer un axe") -#define MSG_BED_LEVELING _UxGT("Régl. Niv. lit") -#define MSG_LEVEL_BED _UxGT("Régl. Niv. lit") +#define MSG_BED_LEVELING _UxGT("Régler Niv. lit") +#define MSG_LEVEL_BED _UxGT("Niveau du lit") #define MSG_LEVEL_CORNERS _UxGT("Niveau coins") #define MSG_NEXT_CORNER _UxGT("Coin suivant") #define MSG_EDITING_STOPPED _UxGT("Arrêt édit. maillage") #define MSG_MESH_X _UxGT("Index X") #define MSG_MESH_Y _UxGT("Index Y") #define MSG_MESH_EDIT_Z _UxGT("Valeur Z") -#define MSG_USER_MENU _UxGT("Commandes perso.") +#define MSG_USER_MENU _UxGT("Commandes perso") #define MSG_UBL_DOING_G29 _UxGT("G29 en cours") #define MSG_UBL_UNHOMED _UxGT("Origine XYZ d'abord") @@ -158,7 +159,7 @@ #define MSG_UBL_STORAGE_SLOT _UxGT("Slot mémoire") #define MSG_UBL_LOAD_MESH _UxGT("Charger maille") #define MSG_UBL_SAVE_MESH _UxGT("Sauver maille") -#define MSG_MESH_LOADED _UxGT("Maille %i charg.") +#define MSG_MESH_LOADED _UxGT("Maille %i chargée") #define MSG_MESH_SAVED _UxGT("Maille %i enreg.") #define MSG_NO_STORAGE _UxGT("Pas de mémoire") #define MSG_UBL_SAVE_ERROR _UxGT("Err: Enreg. UBL") @@ -178,7 +179,7 @@ #define MSG_SET_LEDS_VIOLET _UxGT("Violet") #define MSG_SET_LEDS_WHITE _UxGT("Blanc") #define MSG_SET_LEDS_DEFAULT _UxGT("Defaut") -#define MSG_CUSTOM_LEDS _UxGT("Lum. perso.") +#define MSG_CUSTOM_LEDS _UxGT("LEDs perso.") #define MSG_INTENSITY_R _UxGT("Intensité rouge") #define MSG_INTENSITY_G _UxGT("Intensité vert") #define MSG_INTENSITY_B _UxGT("Intensité bleu") @@ -187,14 +188,14 @@ #define MSG_MOVING _UxGT("Déplacement...") #define MSG_FREE_XY _UxGT("Débloquer XY") -#define MSG_MOVE_X _UxGT("Dépl. X") -#define MSG_MOVE_Y _UxGT("Dépl. Y") -#define MSG_MOVE_Z _UxGT("Dépl. Z") +#define MSG_MOVE_X _UxGT("Déplacer X") +#define MSG_MOVE_Y _UxGT("Déplacer Y") +#define MSG_MOVE_Z _UxGT("Déplacer Z") #define MSG_MOVE_E _UxGT("Extrudeur") #define MSG_HOTEND_TOO_COLD _UxGT("Buse trop froide") -#define MSG_MOVE_01MM _UxGT("Dépl. 0.1mm") -#define MSG_MOVE_1MM _UxGT("Dépl. 1mm") -#define MSG_MOVE_10MM _UxGT("Dépl. 10mm") +#define MSG_MOVE_01MM _UxGT("Déplacer 0.1mm") +#define MSG_MOVE_1MM _UxGT("Déplacer 1mm") +#define MSG_MOVE_10MM _UxGT("Déplacer 10mm") #define MSG_SPEED _UxGT("Vitesse") #define MSG_BED_Z _UxGT("Lit Z") #define MSG_NOZZLE _UxGT("Buse") @@ -258,38 +259,43 @@ #define MSG_MOTION _UxGT("Mouvement") #define MSG_FILAMENT _UxGT("Filament") #define MSG_VOLUMETRIC_ENABLED _UxGT("E en mm3") -#define MSG_FILAMENT_DIAM _UxGT("Diam. Fil.") -#define MSG_FILAMENT_UNLOAD _UxGT("Décharger mm") +#define MSG_FILAMENT_DIAM _UxGT("Diamètre fil.") +#define MSG_FILAMENT_UNLOAD _UxGT("Retrait mm") #define MSG_FILAMENT_LOAD _UxGT("Charger mm") #define MSG_ADVANCE_K _UxGT("Avance K") #define MSG_CONTRAST _UxGT("Contraste LCD") -#define MSG_STORE_EEPROM _UxGT("Sauver config") -#define MSG_LOAD_EEPROM _UxGT("Lire config") +#define MSG_STORE_EEPROM _UxGT("Enregistrer config.") +#define MSG_LOAD_EEPROM _UxGT("Charger config.") #define MSG_RESTORE_FAILSAFE _UxGT("Restaurer défauts") #define MSG_INIT_EEPROM _UxGT("Initialiser EEPROM") -#define MSG_SD_UPDATE _UxGT("MàJ. SD") -#define MSG_RESET_PRINTER _UxGT("RàZ. imprimante") +#define MSG_SD_UPDATE _UxGT("MaJ Firmware SD") +#define MSG_RESET_PRINTER _UxGT("RaZ imprimante") #define MSG_REFRESH _UxGT("Actualiser") #define MSG_WATCH _UxGT("Surveiller") #define MSG_PREPARE _UxGT("Préparer") #define MSG_TUNE _UxGT("Régler") -#define MSG_START_PRINT _UxGT("Démarrer Impr.") +#define MSG_START_PRINT _UxGT("Démarrer impression") +#define MSG_BUTTON_NEXT _UxGT("Suivant") +#define MSG_BUTTON_INIT _UxGT("Init.") +#define MSG_BUTTON_STOP _UxGT("Stop") #define MSG_BUTTON_PRINT _UxGT("Imprimer") +#define MSG_BUTTON_RESET _UxGT("Reset") #define MSG_BUTTON_CANCEL _UxGT("Annuler") -#define MSG_PAUSE_PRINT _UxGT("Interrompre impr.") +#define MSG_BUTTON_DONE _UxGT("Terminé") +#define MSG_PAUSE_PRINT _UxGT("Pause impression") #define MSG_RESUME_PRINT _UxGT("Reprendre impr.") #define MSG_STOP_PRINT _UxGT("Arrêter impr.") #define MSG_OUTAGE_RECOVERY _UxGT("Récupér. coupure") -#define MSG_CARD_MENU _UxGT("Impr. depuis SD") +#define MSG_CARD_MENU _UxGT("Impression SD") #define MSG_NO_CARD _UxGT("Pas de carte") #define MSG_DWELL _UxGT("Repos...") #define MSG_USERWAIT _UxGT("Attente utilis.") #define MSG_PRINT_PAUSED _UxGT("Impr. en pause") #define MSG_PRINTING _UxGT("Impression") #define MSG_PRINT_ABORTED _UxGT("Impr. annulée") -#define MSG_NO_MOVE _UxGT("Moteurs bloqués.") -#define MSG_KILLED _UxGT("MORT.") -#define MSG_STOPPED _UxGT("STOPPÉ.") +#define MSG_NO_MOVE _UxGT("Moteurs bloqués") +#define MSG_KILLED _UxGT("KILLED") +#define MSG_STOPPED _UxGT("STOPPÉ") #define MSG_CONTROL_RETRACT _UxGT("Retrait mm") #define MSG_CONTROL_RETRACT_SWAP _UxGT("Ech. Retr. mm") #define MSG_CONTROL_RETRACTF _UxGT("Retrait V") @@ -298,7 +304,7 @@ #define MSG_CONTROL_RETRACT_RECOVER_SWAP _UxGT("Ech. Rappel mm") #define MSG_CONTROL_RETRACT_RECOVERF _UxGT("Rappel V") #define MSG_CONTROL_RETRACT_RECOVER_SWAPF _UxGT("Ech. Rappel V") -#define MSG_AUTORETRACT _UxGT("Retrait auto.") +#define MSG_AUTORETRACT _UxGT("Retrait auto") #define MSG_TOOL_CHANGE _UxGT("Changement outil") #define MSG_TOOL_CHANGE_ZLIFT _UxGT("Augmenter Z") #define MSG_SINGLENOZZLE_PRIME_SPD _UxGT("Vitesse primaire") @@ -306,21 +312,22 @@ #define MSG_NOZZLE_STANDBY _UxGT("Attente buse") #define MSG_FILAMENT_SWAP_LENGTH _UxGT("Distance retrait") #define MSG_FILAMENTCHANGE _UxGT("Changer filament") -#define MSG_FILAMENTLOAD _UxGT("Charger fil.") -#define MSG_FILAMENTUNLOAD _UxGT("Décharger fil.") +#define MSG_FILAMENTLOAD _UxGT("Charger filament") +#define MSG_FILAMENTUNLOAD _UxGT("Retrait filament") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Décharger tout") #define MSG_INIT_SDCARD _UxGT("Init. la carte SD") -#define MSG_CHANGE_SDCARD _UxGT("Changer de carte") +#define MSG_CHANGE_SDCARD _UxGT("Actualiser carte SD") +#define MSG_RELEASE_SDCARD _UxGT("Retirer carte SD") #define MSG_ZPROBE_OUT _UxGT("Sonde Z hors lit") #define MSG_SKEW_FACTOR _UxGT("Facteur écart") #define MSG_BLTOUCH _UxGT("BLTouch") #define MSG_BLTOUCH_SELFTEST _UxGT("Autotest BLTouch") -#define MSG_BLTOUCH_RESET _UxGT("RaZ BLTouch") -#define MSG_BLTOUCH_DEPLOY _UxGT("Déployer BLTouch") +#define MSG_BLTOUCH_RESET _UxGT("RaZ BL-Touch") +#define MSG_BLTOUCH_DEPLOY _UxGT("Déployer BL-Touch") #define MSG_BLTOUCH_SW_MODE _UxGT("Mode BLTouch SW") #define MSG_BLTOUCH_5V_MODE _UxGT("Mode BLTouch 5V") #define MSG_BLTOUCH_OD_MODE _UxGT("Mode BLTouch OD") -#define MSG_BLTOUCH_STOW _UxGT("Ranger BLTouch") +#define MSG_BLTOUCH_STOW _UxGT("Ranger BL-Touch") #define MSG_MANUAL_DEPLOY _UxGT("Déployer Sonde Z") #define MSG_MANUAL_STOW _UxGT("Ranger Sonde Z") #define MSG_HOME _UxGT("Origine") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST @@ -331,21 +338,23 @@ #define MSG_BABYSTEP_Z _UxGT("Babystep Z") #define MSG_BABYSTEP_TOTAL _UxGT("Total") #define MSG_ENDSTOP_ABORT _UxGT("Butée abandon") -#define MSG_HEATING_FAILED_LCD _UxGT("Erreur de chauffe") -#define MSG_HEATING_FAILED_LCD_BED _UxGT("Erreur de chauffe lit") -#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err: TEMP. REDONDANTE") -#define MSG_THERMAL_RUNAWAY _UxGT("EMBALLEMENT THERM.") -#define MSG_THERMAL_RUNAWAY_BED _UxGT("ERREUR THERMIQUE LIT") -#define MSG_ERR_MAXTEMP _UxGT("Err: TEMP. MAX") -#define MSG_ERR_MINTEMP _UxGT("Err: TEMP. MIN") -#define MSG_ERR_MAXTEMP_BED _UxGT("Err: TEMP. MAX LIT") -#define MSG_ERR_MINTEMP_BED _UxGT("Err: TEMP. MIN LIT") -#define MSG_ERR_MAXTEMP_CHAMBER _UxGT("Err: MAXTEMP CAISSON") -#define MSG_ERR_MINTEMP_CHAMBER _UxGT("Err: MINTEMP CAISSON") +#define MSG_HEATING_FAILED_LCD _UxGT("Err de chauffe") +#define MSG_HEATING_FAILED_LCD_BED _UxGT("Err de chauffe lit") +#define MSG_HEATING_FAILED_LCD_CHAMBER _UxGT("Err chauffe caisson") +#define MSG_ERR_REDUNDANT_TEMP _UxGT("Err TEMP. REDONDANTE") +#define MSG_THERMAL_RUNAWAY _UxGT("Err THERMIQUE") +#define MSG_THERMAL_RUNAWAY_BED _UxGT("Err THERMIQUE LIT") +#define MSG_THERMAL_RUNAWAY_CHAMBER _UxGT("Err THERMIQUE CAISSON") +#define MSG_ERR_MAXTEMP _UxGT("Err TEMP. MAX") +#define MSG_ERR_MINTEMP _UxGT("Err TEMP. MIN") +#define MSG_ERR_MAXTEMP_BED _UxGT("Err TEMP. MAX LIT") +#define MSG_ERR_MINTEMP_BED _UxGT("Err TEMP. MIN LIT") +#define MSG_ERR_MAXTEMP_CHAMBER _UxGT("Err MAXTEMP CAISSON") +#define MSG_ERR_MINTEMP_CHAMBER _UxGT("Err MINTEMP CAISSON") #define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("IMPR. STOPPÉE") -#define MSG_PLEASE_RESET _UxGT("RàZ. SVP") +#define MSG_PLEASE_RESET _UxGT("Redémarrer SVP") #define MSG_SHORT_DAY _UxGT("j") // One character only #define MSG_SHORT_HOUR _UxGT("h") // One character only #define MSG_SHORT_MINUTE _UxGT("m") // One character only @@ -411,7 +420,7 @@ #define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("Purger encore") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Reprendre impr.") #define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Buse: ") -#define MSG_RUNOUT_SENSOR _UxGT("Capteur Fil.") +#define MSG_RUNOUT_SENSOR _UxGT("Capteur fil.") #define MSG_ERR_HOMING_FAILED _UxGT("Echec origine") #define MSG_ERR_PROBING_FAILED _UxGT("Echec sonde") #define MSG_M600_TOO_COLD _UxGT("M600: Trop froid") @@ -499,7 +508,7 @@ #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insérer fil.") #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Chauffer ?") #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Chauffage...") - #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejecting...") + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Retrait fil...") #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Chargement...") #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Purge...") #define MSG_FILAMENT_CHANGE_CONT_PURGE_1 _UxGT("Terminer ?") diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 78450b47bd..7d6f7ae83a 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -37,6 +37,7 @@ #define MSG_BACK _UxGT("Indietro") #define MSG_SD_INSERTED _UxGT("SD Card inserita") #define MSG_SD_REMOVED _UxGT("SD Card rimossa") +#define MSG_SD_RELEASED _UxGT("SD Card rilasciata") #define MSG_LCD_ENDSTOPS _UxGT("Finecor.") // Max 8 caratteri #define MSG_LCD_SOFT_ENDSTOPS _UxGT("Finecorsa Soft") #define MSG_MAIN _UxGT("Menu principale") @@ -271,8 +272,13 @@ #define MSG_PREPARE _UxGT("Prepara") #define MSG_TUNE _UxGT("Regola") #define MSG_START_PRINT _UxGT("Avvia stampa") +#define MSG_BUTTON_NEXT _UxGT("Prossimo") +#define MSG_BUTTON_INIT _UxGT("Inizializza") +#define MSG_BUTTON_STOP _UxGT("Stop") #define MSG_BUTTON_PRINT _UxGT("Stampa") +#define MSG_BUTTON_RESET _UxGT("Resetta") #define MSG_BUTTON_CANCEL _UxGT("Annulla") +#define MSG_BUTTON_DONE _UxGT("Fatto") #define MSG_PAUSE_PRINT _UxGT("Pausa stampa") #define MSG_RESUME_PRINT _UxGT("Riprendi stampa") #define MSG_STOP_PRINT _UxGT("Arresta stampa") @@ -306,8 +312,9 @@ #define MSG_FILAMENTLOAD _UxGT("Carica filamento") #define MSG_FILAMENTUNLOAD _UxGT("Rimuovi filamento") #define MSG_FILAMENTUNLOAD_ALL _UxGT("Rimuovi tutto") -#define MSG_INIT_SDCARD _UxGT("Iniz. SD-Card") -#define MSG_CHANGE_SDCARD _UxGT("Cambia SD-Card") +#define MSG_INIT_SDCARD _UxGT("Iniz. SD card") +#define MSG_CHANGE_SDCARD _UxGT("Cambia SD card") +#define MSG_RELEASE_SDCARD _UxGT("Rilascia SD card") #define MSG_ZPROBE_OUT _UxGT("Z probe fuori piatto") #define MSG_SKEW_FACTOR _UxGT("Fattore distorsione") #define MSG_BLTOUCH _UxGT("BLTouch") @@ -351,6 +358,8 @@ #define MSG_COOLING _UxGT("Raffreddamento..") #define MSG_BED_HEATING _UxGT("Risc. piatto...") #define MSG_BED_COOLING _UxGT("Raffr. piatto...") +#define MSG_CHAMBER_HEATING _UxGT("Risc. camera...") +#define MSG_CHAMBER_COOLING _UxGT("Raffr. camera...") #define MSG_DELTA_CALIBRATE _UxGT("Calibraz. Delta") #define MSG_DELTA_CALIBRATE_X _UxGT("Calibra X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Calibra Y") @@ -404,7 +413,7 @@ #define MSG_FILAMENT_CHANGE_OPTION_PURGE _UxGT("Spurga di più") #define MSG_FILAMENT_CHANGE_OPTION_RESUME _UxGT("Riprendi stampa") #define MSG_FILAMENT_CHANGE_NOZZLE _UxGT(" Ugello: ") -#define MSG_RUNOUT_SENSOR _UxGT("Sens.filo terminato") +#define MSG_RUNOUT_SENSOR _UxGT("Sens.filo termin.") // Max 17 caratteri #define MSG_ERR_HOMING_FAILED _UxGT("Home fallito") #define MSG_ERR_PROBING_FAILED _UxGT("Sondaggio fallito") #define MSG_M600_TOO_COLD _UxGT("M600:Troppo freddo") @@ -413,12 +422,12 @@ #define MSG_MMU2_CHOOSE_FILAMENT_HEADER _UxGT("SCELTA FILAMENTO") #define MSG_MMU2_MENU _UxGT("MMU") #define MSG_MMU2_WRONG_FIRMWARE _UxGT("Agg.firmware MMU!") -#define MSG_MMU2_NOT_RESPONDING _UxGT("MMU needs attention.") +#define MSG_MMU2_NOT_RESPONDING _UxGT("MMU chiede attenz.") #define MSG_MMU2_RESUME _UxGT("Riprendi stampa") #define MSG_MMU2_RESUMING _UxGT("Ripresa...") #define MSG_MMU2_LOAD_FILAMENT _UxGT("Carica filamento") #define MSG_MMU2_LOAD_ALL _UxGT("Carica tutto") -#define MSG_MMU2_LOAD_TO_NOZZLE _UxGT("Load to nozzle") +#define MSG_MMU2_LOAD_TO_NOZZLE _UxGT("Carica fino ugello") #define MSG_MMU2_EJECT_FILAMENT _UxGT("Espelli filamento") #define MSG_MMU2_EJECT_FILAMENT0 _UxGT("Espelli filam.1") #define MSG_MMU2_EJECT_FILAMENT1 _UxGT("Espelli filam.2") diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index c069c780e9..d0d8af11df 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -79,7 +79,7 @@ #define MSG_PREHEAT_2_END MSG_PREHEAT_2 _UxGT(" hotend") #define MSG_PREHEAT_2_BEDONLY MSG_PREHEAT_2 _UxGT(" podlož") #define MSG_PREHEAT_2_SETTINGS MSG_PREHEAT_2 _UxGT(" nast.") -#define MSG_PREHEAT_CUSTOM _UxGT("Vlastné zahriatie") +#define MSG_PREHEAT_CUSTOM _UxGT("Vlastná teplota") #define MSG_COOLDOWN _UxGT("Schladiť") #define MSG_LASER_MENU _UxGT("Nastavenie lasera") #define MSG_LASER_OFF _UxGT("Vypnúť laser") @@ -243,7 +243,7 @@ #define MSG_AMAX _UxGT("Amax ") #define MSG_A_RETRACT _UxGT("A-retrakt") #define MSG_A_TRAVEL _UxGT("A-prejazd") -#define MSG_STEPS_PER_MM _UxGT("Krokov/mm") +#define MSG_STEPS_PER_MM _UxGT("Kroky/mm") #if IS_KINEMATIC #define MSG_ASTEPS _UxGT("Akrokov/mm") #define MSG_BSTEPS _UxGT("Bkrokov/mm") @@ -280,8 +280,13 @@ #define MSG_PREPARE _UxGT("Príprava tlače") #define MSG_TUNE _UxGT("Doladenie tlače") #define MSG_START_PRINT _UxGT("Spustiť tlač") +#define MSG_BUTTON_NEXT _UxGT("Ďalší") +#define MSG_BUTTON_INIT _UxGT("Inicial.") +#define MSG_BUTTON_STOP _UxGT("Zastaviť") #define MSG_BUTTON_PRINT _UxGT("Tlačiť") +#define MSG_BUTTON_RESET _UxGT("Vynulovať") #define MSG_BUTTON_CANCEL _UxGT("Zrušiť") +#define MSG_BUTTON_DONE _UxGT("Hotovo") #define MSG_PAUSE_PRINT _UxGT("Pozastaviť tlač") #define MSG_RESUME_PRINT _UxGT("Obnoviť tlač") #define MSG_STOP_PRINT _UxGT("Zastaviť tlač") @@ -340,9 +345,11 @@ #define MSG_ENDSTOP_ABORT _UxGT("Zastavenie Endstop") #define MSG_HEATING_FAILED_LCD _UxGT("Chyba ohrevu") #define MSG_HEATING_FAILED_LCD_BED _UxGT("Chyba ohrevu podl.") +#define MSG_HEATING_FAILED_LCD_CHAMBER _UxGT("Chyba ohrevu komory") #define MSG_ERR_REDUNDANT_TEMP _UxGT("Chyba: REDUND. TEP.") #define MSG_THERMAL_RUNAWAY _UxGT("TEPLOTNÝ SKOK") #define MSG_THERMAL_RUNAWAY_BED _UxGT("TEPLOTNÝ SKOK PODL.") +#define MSG_THERMAL_RUNAWAY_CHAMBER _UxGT("TEPLOTNÝ SKOK KOMO.") #define MSG_ERR_MAXTEMP _UxGT("Chyba: MAXTEMP") #define MSG_ERR_MINTEMP _UxGT("Chyba: MINTEMP") #define MSG_ERR_MAXTEMP_BED _UxGT("Chyba: MAXTEMP PODL.") @@ -351,7 +358,7 @@ #define MSG_ERR_MINTEMP_CHAMBER _UxGT("Chyba: MINTEMP KOMO.") #define MSG_ERR_Z_HOMING MSG_HOME _UxGT(" ") MSG_X MSG_Y _UxGT(" ") MSG_FIRST #define MSG_HALTED _UxGT("TLAČIAREŇ ZASTAVENÁ") -#define MSG_PLEASE_RESET _UxGT("Spravte reset") +#define MSG_PLEASE_RESET _UxGT("Reštartuje ju") #define MSG_SHORT_DAY _UxGT("d") #define MSG_SHORT_HOUR _UxGT("h") #define MSG_SHORT_MINUTE _UxGT("m") @@ -463,9 +470,9 @@ #define MSG_START_VTOOL _UxGT("Počiat. V-tool") #define MSG_END_VTOOL _UxGT("Konečn. V-tool") #define MSG_GRADIENT_ALIAS _UxGT("Alias V-tool") -#define MSG_RESET_VTOOLS _UxGT("Resetovať V-tools") +#define MSG_RESET_VTOOLS _UxGT("Vynulovať V-tools") #define MSG_COMMIT_VTOOL _UxGT("Uložiť V-tool Mix") -#define MSG_VTOOLS_RESET _UxGT("V-tools resetované") +#define MSG_VTOOLS_RESET _UxGT("V-tools vynulované") #define MSG_START_Z _UxGT("Počiat.Z") #define MSG_END_Z _UxGT("Konečn.Z") #define MSG_BRICKOUT _UxGT("Brickout") @@ -507,6 +514,7 @@ #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("obnovenie tlače...") #else // LCD_HEIGHT < 4 #define MSG_ADVANCED_PAUSE_WAITING_1 _UxGT("Kliknite pre pokr.") + #define MSG_PAUSE_PRINT_INIT_1 _UxGT("Parkovanie...") #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Čakajte prosím...") #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vložte a kliknite") #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Kliknite pre ohrev") diff --git a/Marlin/src/lcd/malyanlcd.cpp b/Marlin/src/lcd/malyanlcd.cpp index cb0e2a00cc..a3462d295d 100644 --- a/Marlin/src/lcd/malyanlcd.cpp +++ b/Marlin/src/lcd/malyanlcd.cpp @@ -41,23 +41,19 @@ * Copyright (c) 2017 Jason Nelson (xC0000005) */ -#include "../inc/MarlinConfig.h" +#include "../inc/MarlinConfigPre.h" #if ENABLED(MALYAN_LCD) +#include "extensible_ui/ui_api.h" + #include "ultralcd.h" #include "../module/temperature.h" -#include "../module/planner.h" #include "../module/stepper.h" #include "../module/motion.h" -#include "../module/probe.h" #include "../libs/duration_t.h" #include "../module/printcounter.h" -#include "../gcode/gcode.h" #include "../gcode/queue.h" -#include "../module/configuration_store.h" - -#include "../Marlin.h" #if ENABLED(SDSUPPORT) #include "../sd/cardreader.h" @@ -412,78 +408,94 @@ void update_usb_status(const bool forceUpdate) { } } -/** - * - from printer on startup: - * {SYS:STARTED}{VER:29}{SYS:STARTED}{R:UD} - * The optimize attribute fixes a register Compile - * error for amtel. - */ -void MarlinUI::update() { - static char inbound_buffer[MAX_CURLY_COMMAND]; +namespace ExtUI { + void onStartup() { + /** + * The Malyan LCD actually runs as a separate MCU on Serial 1. + * This code's job is to siphon the weird curly-brace commands from + * it and translate into gcode, which then gets injected into + * the command queue where possible. + */ + inbound_count = 0; + LCD_SERIAL.begin(500000); - // First report USB status. - update_usb_status(false); + // Signal init + write_to_lcd_P(PSTR("{SYS:STARTED}\r\n")); - // now drain commands... - while (LCD_SERIAL.available()) { - const byte b = (byte)LCD_SERIAL.read() & 0x7F; - inbound_buffer[inbound_count++] = b; - if (b == '}' || inbound_count == sizeof(inbound_buffer) - 1) { - inbound_buffer[inbound_count - 1] = '\0'; - process_lcd_command(inbound_buffer); - inbound_count = 0; - inbound_buffer[0] = 0; - } + // send a version that says "unsupported" + write_to_lcd_P(PSTR("{VER:99}\r\n")); + + // No idea why it does this twice. + write_to_lcd_P(PSTR("{SYS:STARTED}\r\n")); + update_usb_status(true); } - #if ENABLED(SDSUPPORT) - // The way last printing status works is simple: - // The UI needs to see at least one TQ which is not 100% - // and then when the print is complete, one which is. - static uint8_t last_percent_done = 100; + void onIdle() { + /** + * - from printer on startup: + * {SYS:STARTED}{VER:29}{SYS:STARTED}{R:UD} + * The optimize attribute fixes a register Compile + * error for amtel. + */ + static char inbound_buffer[MAX_CURLY_COMMAND]; - // If there was a print in progress, we need to emit the final - // print status as {TQ:100}. Reset last percent done so a new print will - // issue a percent of 0. - const uint8_t percent_done = IS_SD_PRINTING() ? card.percentDone() : last_printing_status ? 100 : 0; - if (percent_done != last_percent_done) { - char message_buffer[10]; - sprintf_P(message_buffer, PSTR("{TQ:%03i}"), percent_done); - write_to_lcd(message_buffer); - last_percent_done = percent_done; - last_printing_status = IS_SD_PRINTING(); + // First report USB status. + update_usb_status(false); + + // now drain commands... + while (LCD_SERIAL.available()) { + const byte b = (byte)LCD_SERIAL.read() & 0x7F; + inbound_buffer[inbound_count++] = b; + if (b == '}' || inbound_count == sizeof(inbound_buffer) - 1) { + inbound_buffer[inbound_count - 1] = '\0'; + process_lcd_command(inbound_buffer); + inbound_count = 0; + inbound_buffer[0] = 0; + } } - #endif -} -/** - * The Malyan LCD actually runs as a separate MCU on Serial 1. - * This code's job is to siphon the weird curly-brace commands from - * it and translate into gcode, which then gets injected into - * the command queue where possible. - */ -void MarlinUI::init() { - inbound_count = 0; - LCD_SERIAL.begin(500000); + #if ENABLED(SDSUPPORT) + // The way last printing status works is simple: + // The UI needs to see at least one TQ which is not 100% + // and then when the print is complete, one which is. + static uint8_t last_percent_done = 100; - // Signal init - write_to_lcd_P(PSTR("{SYS:STARTED}\r\n")); + // If there was a print in progress, we need to emit the final + // print status as {TQ:100}. Reset last percent done so a new print will + // issue a percent of 0. + const uint8_t percent_done = IS_SD_PRINTING() ? card.percentDone() : last_printing_status ? 100 : 0; + if (percent_done != last_percent_done) { + char message_buffer[10]; + sprintf_P(message_buffer, PSTR("{TQ:%03i}"), percent_done); + write_to_lcd(message_buffer); + last_percent_done = percent_done; + last_printing_status = IS_SD_PRINTING(); + } + #endif + } - // send a version that says "unsupported" - write_to_lcd_P(PSTR("{VER:99}\r\n")); + void onStatusChanged(const char * const msg) { + write_to_lcd_P(PSTR("{E:")); + write_to_lcd(msg); + write_to_lcd_P("}"); + } - // No idea why it does this twice. - write_to_lcd_P(PSTR("{SYS:STARTED}\r\n")); - update_usb_status(true); -} - -/** - * Set an alert. - */ -void MarlinUI::set_alert_status_P(PGM_P const message) { - write_to_lcd_P(PSTR("{E:")); - write_to_lcd_P(message); - write_to_lcd_P("}"); + // Not needed for Malyan LCD + void onPrinterKilled(PGM_P const msg) { UNUSED(msg); } + void onMediaInserted() {}; + void onMediaError() {}; + void onMediaRemoved() {}; + void onPlayTone(const uint16_t frequency, const uint16_t duration) { UNUSED(frequency); UNUSED(duration); } + void onPrintTimerStarted() {} + void onPrintTimerPaused() {} + void onPrintTimerStopped() {} + void onFilamentRunout() {} + void onUserConfirmRequired(const char * const msg) { UNUSED(msg); } + void onFactoryReset() {} + void onStoreSettings(char *buff) { UNUSED(buff); } + void onLoadSettings(const char *buff) { UNUSED(buff); } + void onConfigurationStoreWritten(bool success) { UNUSED(success); } + void onConfigurationStoreRead(bool success) { UNUSED(success); } } #endif // MALYAN_LCD diff --git a/Marlin/src/lcd/menu/game/invaders.cpp b/Marlin/src/lcd/menu/game/invaders.cpp index b454d6c17e..ce320fa4aa 100644 --- a/Marlin/src/lcd/menu/game/invaders.cpp +++ b/Marlin/src/lcd/menu/game/invaders.cpp @@ -302,7 +302,7 @@ void InvadersGame::game_screen() { if (invader_count && !random(0, 20)) { // Find a free bullet - laser_t *b = NULL; + laser_t *b = nullptr; LOOP_L_N(i, COUNT(bullet)) if (!bullet[i].v) { b = &bullet[i]; break; } if (b) { // Pick a random shooter and update the bullet diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index 1a053ad850..ff2b5fd6e9 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -68,7 +68,7 @@ bool screen_changed; // Value Editing PGM_P MenuItemBase::editLabel; void* MenuItemBase::editValue; -int16_t MenuItemBase::minEditValue, MenuItemBase::maxEditValue; +int32_t MenuItemBase::minEditValue, MenuItemBase::maxEditValue; screenFunc_t MenuItemBase::callbackFunc; bool MenuItemBase::liveEdit; @@ -136,13 +136,13 @@ void MenuItemBase::edit(strfunc_t strfunc, loadfunc_t loadfunc) { if (ui.should_draw()) draw_edit_screen(editLabel, strfunc(ui.encoderPosition + minEditValue)); if (ui.lcd_clicked || (liveEdit && ui.should_draw())) { - if (editValue != NULL) loadfunc(editValue, ui.encoderPosition + minEditValue); + if (editValue != nullptr) loadfunc(editValue, ui.encoderPosition + minEditValue); if (callbackFunc && (liveEdit || ui.lcd_clicked)) (*callbackFunc)(); if (ui.use_click()) ui.goto_previous_screen(); } } -void MenuItemBase::init(PGM_P const el, void * const ev, const int16_t minv, const int16_t maxv, const uint16_t ep, const screenFunc_t cs, const screenFunc_t cb, const bool le) { +void MenuItemBase::init(PGM_P const el, void * const ev, const int32_t minv, const int32_t maxv, const uint16_t ep, const screenFunc_t cs, const screenFunc_t cb, const bool le) { ui.save_previous_screen(); ui.refresh(); editLabel = el; @@ -167,10 +167,12 @@ DEFINE_MENU_EDIT_ITEM(float3); // 123 right-justified DEFINE_MENU_EDIT_ITEM(float52); // 123.45 DEFINE_MENU_EDIT_ITEM(float43); // 1.234 DEFINE_MENU_EDIT_ITEM(float5); // 12345 right-justified +DEFINE_MENU_EDIT_ITEM(float5_25); // 12345 right-justified (25 increment) DEFINE_MENU_EDIT_ITEM(float51); // 1234.5 right-justified DEFINE_MENU_EDIT_ITEM(float51sign); // +1234.5 DEFINE_MENU_EDIT_ITEM(float52sign); // +123.45 DEFINE_MENU_EDIT_ITEM(long5); // 12345 right-justified +DEFINE_MENU_EDIT_ITEM(long5_25); // 12345 right-justified (25 increment) void MenuItem_bool::action_edit(PGM_P pstr, bool *ptr, screenFunc_t callback) { UNUSED(pstr); *ptr ^= true; ui.refresh(); @@ -268,6 +270,8 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co #if HAS_GRAPHICAL_LCD drawing_screen = false; #endif + + set_ui_selection(false); } } @@ -296,7 +300,7 @@ void MarlinUI::_synchronize() { // Display the synchronize screen with a custom message // ** This blocks the command queue! ** -void MarlinUI::synchronize(PGM_P const msg/*=NULL*/) { +void MarlinUI::synchronize(PGM_P const msg/*=nullptr*/) { static const char moving[] PROGMEM = MSG_MOVING; sync_message = msg ? msg : moving; _synchronize(); @@ -436,12 +440,21 @@ void _lcd_draw_homing() { void _lcd_toggle_bed_leveling() { set_bed_leveling_enabled(!planner.leveling_active); } #endif -void do_select_screen(PGM_P const yes, PGM_P const no, bool &yesno, PGM_P const pref, const char * const string, PGM_P const suff) { +// +// Selection screen presents a prompt and two options +// +bool ui_selection; // = false +void set_ui_selection(const bool sel) { ui_selection = sel; } +void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { if (ui.encoderPosition) { - yesno = int16_t(ui.encoderPosition) > 0; + ui_selection = int16_t(ui.encoderPosition) > 0; ui.encoderPosition = 0; } - draw_select_screen(yes, no, yesno, pref, string, suff); + const bool got_click = ui.use_click(); + if (got_click || ui.should_draw()) { + draw_select_screen(yes, no, ui_selection, pref, string, suff); + if (got_click) { ui_selection ? yesFunc() : noFunc(); } + } } #endif // HAS_LCD_MENU diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index acc51a2ae0..d050031fae 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -53,26 +53,31 @@ DECLARE_MENU_EDIT_TYPE(uint8_t, uint8, ui8tostr3, 1 ); // 123 DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_3, ui16tostr3, 1 ); // 123, -12 right-justified DECLARE_MENU_EDIT_TYPE(uint16_t, uint16_4, ui16tostr4, 0.1 ); // 1234, -123 right-justified DECLARE_MENU_EDIT_TYPE(float, float3, ftostr3, 1 ); // 123 right-justified -DECLARE_MENU_EDIT_TYPE(float, float52, ftostr52, 100 ); // 123.45 +DECLARE_MENU_EDIT_TYPE(float, float52, ftostr52, 100 ); // 123.45, -23.45 DECLARE_MENU_EDIT_TYPE(float, float43, ftostr43sign, 1000 ); // 1.234 DECLARE_MENU_EDIT_TYPE(float, float5, ftostr5rj, 0.01f ); // 12345 right-justified -DECLARE_MENU_EDIT_TYPE(float, float51, ftostr51rj, 10 ); // 1234.5 right-justified +DECLARE_MENU_EDIT_TYPE(float, float5_25, ftostr5rj, 0.04f ); // 12345 right-justified (25 increment) +DECLARE_MENU_EDIT_TYPE(float, float51, ftostr51rj, 10 ); // _1234.5 right-justified DECLARE_MENU_EDIT_TYPE(float, float51sign, ftostr51sign, 10 ); // +1234.5 DECLARE_MENU_EDIT_TYPE(float, float52sign, ftostr52sign, 100 ); // +123.45 DECLARE_MENU_EDIT_TYPE(uint32_t, long5, ftostr5rj, 0.01f ); // 12345 right-justified +DECLARE_MENU_EDIT_TYPE(uint32_t, long5_25, ftostr5rj, 0.04f ); // 12345 right-justified (25 increment) //////////////////////////////////////////// ///////// Menu Item Draw Functions ///////// //////////////////////////////////////////// -void draw_edit_screen(PGM_P const pstr, const char* const value=NULL); +typedef void (*selectFunc_t)(); void draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff); -void do_select_screen(PGM_P const yes, PGM_P const no, bool &yesno, PGM_P const pref, const char * const string=NULL, PGM_P const suff=NULL); -inline void do_select_screen_yn(bool &yesno, PGM_P const pref, const char * const string, PGM_P const suff) { - do_select_screen(PSTR(MSG_YES), PSTR(MSG_NO), yesno, pref, string, suff); +void set_ui_selection(const bool sel); +void do_select_screen(PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr); +inline void do_select_screen_yn(selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr) { + do_select_screen(PSTR(MSG_YES), PSTR(MSG_NO), yesFunc, noFunc, pref, string, suff); } + +void draw_edit_screen(PGM_P const pstr, const char* const value=nullptr); void draw_menu_item(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char); -void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const bool center=true, const bool invert=false, const char *valstr=NULL); +void draw_menu_item_static(const uint8_t row, PGM_P const pstr, const bool center=true, const bool invert=false, const char *valstr=nullptr); void _draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm); FORCE_INLINE void draw_menu_item_back(const bool sel, const uint8_t row, PGM_P const pstr) { draw_menu_item(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0]); } FORCE_INLINE void draw_menu_item_edit(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data) { _draw_menu_item_edit(sel, row, pstr, data, false); } @@ -118,13 +123,15 @@ DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint8); // 123 right-justif DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_3); // 123, -12 right-justified DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(uint16_4); // 1234, -123 right-justified DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float3); // 123 right-justified -DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float52); // 123.45 +DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float52); // 123.45, -23.45 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float43); // 1.234 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float5); // 12345 right-justified -DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float51); // 1234.5 right-justified +DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float5_25); // 12345 right-justified (25 increment) +DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float51); // _1234.5 right-justified DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float51sign); // +1234.5 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(float52sign); // +123.45 DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(long5); // 12345 right-justified +DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(long5_25); // 12345 right-justified (25 increment) #define draw_menu_item_edit_bool(sel, row, pstr, pstr2, data, ...) DRAW_BOOL_SETTING(sel, row, pstr, data) #define draw_menu_item_edit_accessor_bool(sel, row, pstr, pstr2, pget, pset) DRAW_BOOL_SETTING(sel, row, pstr, data) @@ -161,13 +168,13 @@ class MenuItemBase { private: static PGM_P editLabel; static void *editValue; - static int16_t minEditValue, maxEditValue; + static int32_t minEditValue, maxEditValue; static screenFunc_t callbackFunc; static bool liveEdit; protected: - typedef char* (*strfunc_t)(const int16_t); - typedef void (*loadfunc_t)(void *, const int16_t); - static void init(PGM_P const el, void * const ev, const int16_t minv, const int16_t maxv, const uint16_t ep, const screenFunc_t cs, const screenFunc_t cb, const bool le); + typedef char* (*strfunc_t)(const int32_t); + typedef void (*loadfunc_t)(void *, const int32_t); + static void init(PGM_P const el, void * const ev, const int32_t minv, const int32_t maxv, const uint16_t ep, const screenFunc_t cs, const screenFunc_t cb, const bool le); static void edit(strfunc_t, loadfunc_t); }; @@ -177,13 +184,13 @@ class TMenuItem : MenuItemBase { typedef typename NAME::type_t type_t; static inline float unscale(const float value) { return value * (1.0f / NAME::scale); } static inline float scale(const float value) { return value * NAME::scale; } - static void load(void *ptr, const int16_t value) { *((type_t*)ptr) = unscale(value); } - static char* to_string(const int16_t value) { return NAME::strfunc(unscale(value)); } + static void load(void *ptr, const int32_t value) { *((type_t*)ptr) = unscale(value); } + static char* to_string(const int32_t value) { return NAME::strfunc(unscale(value)); } public: - static void action_edit(PGM_P const pstr, type_t * const ptr, const type_t minValue, const type_t maxValue, const screenFunc_t callback=NULL, const bool live=false) { + static void action_edit(PGM_P const pstr, type_t * const ptr, const type_t minValue, const type_t maxValue, const screenFunc_t callback=nullptr, const bool live=false) { // Make sure minv and maxv fit within int16_t - const int16_t minv = MAX(scale(minValue), INT16_MIN), - maxv = MIN(scale(maxValue), INT16_MAX); + const int32_t minv = MAX(scale(minValue), INT_MIN), + maxv = MIN(scale(maxValue), INT_MAX); init(pstr, ptr, minv, maxv - minv, scale(*ptr) - minv, edit, callback, live); } static void edit() { MenuItemBase::edit(to_string, load); } @@ -202,14 +209,16 @@ DECLARE_MENU_EDIT_ITEM(float3); DECLARE_MENU_EDIT_ITEM(float52); DECLARE_MENU_EDIT_ITEM(float43); DECLARE_MENU_EDIT_ITEM(float5); +DECLARE_MENU_EDIT_ITEM(float5_25); DECLARE_MENU_EDIT_ITEM(float51); DECLARE_MENU_EDIT_ITEM(float51sign); DECLARE_MENU_EDIT_ITEM(float52sign); DECLARE_MENU_EDIT_ITEM(long5); +DECLARE_MENU_EDIT_ITEM(long5_25); class MenuItem_bool { public: - static void action_edit(PGM_P const pstr, bool* ptr, const screenFunc_t callbackFunc=NULL); + static void action_edit(PGM_P const pstr, bool* ptr, const screenFunc_t callbackFunc=nullptr); }; //////////////////////////////////////////// diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 05396f8507..69595f25d3 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -499,16 +499,17 @@ void menu_backlash(); MENU_BACK(MSG_ADVANCED_SETTINGS); // M204 P Acceleration - MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_ACC, &planner.settings.acceleration, 10, 99000); + MENU_MULTIPLIER_ITEM_EDIT(float5_25, MSG_ACC, &planner.settings.acceleration, 25, 99000); // M204 R Retract Acceleration MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, 99000); // M204 T Travel Acceleration - MENU_MULTIPLIER_ITEM_EDIT(float5, MSG_A_TRAVEL, &planner.settings.travel_acceleration, 100, 99000); + MENU_MULTIPLIER_ITEM_EDIT(float5_25, MSG_A_TRAVEL, &planner.settings.travel_acceleration, 25, 99000); // M201 settings - #define EDIT_AMAX(Q,L) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5, MSG_AMAX MSG_##Q, &planner.settings.max_acceleration_mm_per_s2[_AXIS(Q)], L, 99000, _reset_acceleration_rates) + #define EDIT_AMAX(Q,L) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(long5_25, MSG_AMAX MSG_##Q, &planner.settings.max_acceleration_mm_per_s2[_AXIS(Q)], L, 99000, _reset_acceleration_rates) + EDIT_AMAX(A,100); EDIT_AMAX(B,100); EDIT_AMAX(C, 10); @@ -604,16 +605,13 @@ void menu_backlash(); #include "../../module/configuration_store.h" - static void lcd_init_eeprom() { - ui.completion_feedback(settings.init_eeprom()); - ui.goto_previous_screen(); - } - static void lcd_init_eeprom_confirm() { - START_MENU(); - MENU_BACK(MSG_ADVANCED_SETTINGS); - MENU_ITEM(function, MSG_INIT_EEPROM, lcd_init_eeprom); - END_MENU(); + do_select_screen( + PSTR(MSG_BUTTON_INIT), PSTR(MSG_BUTTON_CANCEL), + []{ ui.completion_feedback(settings.init_eeprom()); }, + ui.goto_previous_screen, + PSTR(MSG_INIT_EEPROM), nullptr, PSTR("?") + ); } #endif diff --git a/Marlin/src/lcd/menu/menu_backlash.cpp b/Marlin/src/lcd/menu/menu_backlash.cpp index 1b183e1063..9c512303b7 100644 --- a/Marlin/src/lcd/menu/menu_backlash.cpp +++ b/Marlin/src/lcd/menu/menu_backlash.cpp @@ -30,26 +30,21 @@ #include "menu.h" -extern float backlash_distance_mm[XYZ]; -extern uint8_t backlash_correction; - -#ifdef BACKLASH_SMOOTHING_MM - extern float backlash_smoothing_mm; -#endif +#include "../../feature/backlash.h" void menu_backlash() { START_MENU(); MENU_BACK(MSG_MAIN); - MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_BACKLASH_CORRECTION, &backlash_correction, all_off, all_on); + MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_BACKLASH_CORRECTION, &backlash.correction, all_off, all_on); - #define EDIT_BACKLASH_DISTANCE(N) MENU_MULTIPLIER_ITEM_EDIT(float43, MSG_##N, &backlash_distance_mm[_AXIS(N)], 0.0f, 9.9f); + #define EDIT_BACKLASH_DISTANCE(N) MENU_MULTIPLIER_ITEM_EDIT(float43, MSG_##N, &backlash.distance_mm[_AXIS(N)], 0.0f, 9.9f); EDIT_BACKLASH_DISTANCE(A); EDIT_BACKLASH_DISTANCE(B); EDIT_BACKLASH_DISTANCE(C); #ifdef BACKLASH_SMOOTHING_MM - MENU_MULTIPLIER_ITEM_EDIT(float43, MSG_BACKLASH_SMOOTHING, &backlash_smoothing_mm, 0.0f, 9.9f); + MENU_MULTIPLIER_ITEM_EDIT(float43, MSG_BACKLASH_SMOOTHING, &backlash.smoothing_mm, 0.0f, 9.9f); #endif END_MENU(); diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index b36d8dd3b1..fd90043d0f 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -50,13 +50,6 @@ static_assert(LEVEL_CORNERS_Z_HOP >= 0, "LEVEL_CORNERS_Z_HOP must be >= 0. Pleas static bool leveling_was_active = false; #endif -static inline void _lcd_level_bed_corners_back() { - #if HAS_LEVELING - set_bed_leveling_enabled(leveling_was_active); - #endif - ui.goto_previous_screen_no_defer(); -} - /** * Level corners, starting in the front-left corner. */ @@ -94,17 +87,23 @@ static inline void _lcd_goto_next_corner() { } static inline void menu_level_bed_corners() { - START_MENU(); - MENU_ITEM(function, - #if ENABLED(LEVEL_CENTER_TOO) - MSG_LEVEL_BED_NEXT_POINT - #else - MSG_NEXT_CORNER - #endif - , _lcd_goto_next_corner + do_select_screen( + PSTR(MSG_BUTTON_NEXT), PSTR(MSG_BUTTON_DONE), + _lcd_goto_next_corner, + []{ + #if HAS_LEVELING + set_bed_leveling_enabled(leveling_was_active); + #endif + ui.goto_previous_screen_no_defer(); + }, + PSTR( + #if ENABLED(LEVEL_CENTER_TOO) + MSG_LEVEL_BED_NEXT_POINT + #else + MSG_NEXT_CORNER + #endif + ), nullptr, PSTR("?") ); - MENU_ITEM(function, MSG_BACK, _lcd_level_bed_corners_back); - END_MENU(); } static inline void _lcd_level_bed_corners_homing() { @@ -112,6 +111,7 @@ static inline void _lcd_level_bed_corners_homing() { if (all_axes_homed()) { bed_corner = 0; ui.goto_screen(menu_level_bed_corners); + set_ui_selection(true); _lcd_goto_next_corner(); } } diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 3dab293334..25fa2c3dcd 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -174,15 +174,13 @@ static void lcd_factory_settings() { void menu_bltouch() { START_MENU(); MENU_BACK(MSG_MAIN); - MENU_ITEM(function, MSG_BLTOUCH_RESET, bltouch.reset); - MENU_ITEM(function, MSG_BLTOUCH_SELFTEST, bltouch.selftest); + MENU_ITEM(function, MSG_BLTOUCH_RESET, bltouch._reset); + MENU_ITEM(function, MSG_BLTOUCH_SELFTEST, bltouch._selftest); MENU_ITEM(function, MSG_BLTOUCH_DEPLOY, bltouch._deploy); MENU_ITEM(function, MSG_BLTOUCH_STOW, bltouch._stow); - #if ENABLED(BLTOUCH_V3) - MENU_ITEM(function, MSG_BLTOUCH_SW_MODE, bltouch.set_SW_mode); - MENU_ITEM(function, MSG_BLTOUCH_5V_MODE, bltouch.set_5V_mode); - MENU_ITEM(function, MSG_BLTOUCH_OD_MODE, bltouch.set_OD_mode); - #endif + MENU_ITEM(function, MSG_BLTOUCH_SW_MODE, bltouch._set_SW_mode); + MENU_ITEM(function, MSG_BLTOUCH_5V_MODE, bltouch._set_5V_mode); + MENU_ITEM(function, MSG_BLTOUCH_OD_MODE, bltouch._set_OD_mode); END_MENU(); } diff --git a/Marlin/src/lcd/menu/menu_filament.cpp b/Marlin/src/lcd/menu/menu_filament.cpp index 2e84a25d54..9c91f7748b 100644 --- a/Marlin/src/lcd/menu/menu_filament.cpp +++ b/Marlin/src/lcd/menu/menu_filament.cpp @@ -367,7 +367,7 @@ void menu_pause_option() { // ADVANCED_PAUSE_FEATURE message screens // -void _lcd_pause_message(PGM_P const msg1, PGM_P const msg2=NULL, PGM_P const msg3=NULL) { +void _lcd_pause_message(PGM_P const msg1, PGM_P const msg2=nullptr, PGM_P const msg3=nullptr) { START_SCREEN(); STATIC_ITEM_P(pause_header(), true, true); STATIC_ITEM_P(msg1); @@ -516,7 +516,7 @@ FORCE_INLINE screenFunc_t ap_message_screen(const PauseMessage message) { case PAUSE_MESSAGE_STATUS: default: break; } - return NULL; + return nullptr; } void lcd_pause_show_message( diff --git a/Marlin/src/lcd/menu/menu_game.cpp b/Marlin/src/lcd/menu/menu_game.cpp index 9e0af2c7f0..93a5d9c49a 100644 --- a/Marlin/src/lcd/menu/menu_game.cpp +++ b/Marlin/src/lcd/menu/menu_game.cpp @@ -46,3 +46,4 @@ void menu_game() { } #endif // HAS_GAME_MENU + diff --git a/Marlin/src/lcd/menu/menu_job_recovery.cpp b/Marlin/src/lcd/menu/menu_job_recovery.cpp index 6d584948c4..f819052977 100644 --- a/Marlin/src/lcd/menu/menu_job_recovery.cpp +++ b/Marlin/src/lcd/menu/menu_job_recovery.cpp @@ -44,6 +44,8 @@ static void lcd_power_loss_recovery_cancel() { ui.return_to_status(); } +// TODO: Display long filename with Cancel/Resume buttons +// Requires supporting methods in PLR class. void menu_job_recovery() { ui.defer_status_screen(); START_MENU(); diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 52178b873c..08d30d124e 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -101,10 +101,7 @@ } void menu_abort_confirm() { - START_MENU(); - MENU_BACK(MSG_MAIN); - MENU_ITEM(function, MSG_STOP_PRINT, lcd_abort_job); - END_MENU(); + do_select_screen(PSTR(MSG_BUTTON_STOP), PSTR(MSG_BACK), lcd_abort_job, ui.goto_previous_screen, PSTR(MSG_STOP_PRINT), nullptr, PSTR("?")); } #endif // MACHINE_CAN_STOP @@ -139,6 +136,16 @@ void menu_led(); #endif #endif +#if HAS_GAME_MENU + void menu_game(); +#elif ENABLED(MARLIN_BRICKOUT) + void lcd_goto_brickout(); +#elif ENABLED(MARLIN_INVADERS) + void lcd_goto_invaders(); +#elif ENABLED(MARLIN_SNAKE) + void lcd_goto_snake(); +#endif + void menu_main() { START_MENU(); MENU_BACK(MSG_WATCH); @@ -171,16 +178,22 @@ void menu_main() { if (card_detected) { if (!card_open) { MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard); - #if !PIN_EXISTS(SD_DETECT) - MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user - #endif + MENU_ITEM(gcode, + #if PIN_EXISTS(SD_DETECT) + MSG_CHANGE_SDCARD, PSTR("M21") + #else + MSG_RELEASE_SDCARD, PSTR("M22") + #endif + ); } } else { - #if !PIN_EXISTS(SD_DETECT) - MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually init SD-card + #if PIN_EXISTS(SD_DETECT) + MENU_ITEM(function, MSG_NO_CARD, nullptr); + #else + MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); + MENU_ITEM(function, MSG_SD_RELEASED, nullptr); #endif - MENU_ITEM(function, MSG_NO_CARD, NULL); } #endif // !HAS_ENCODER_WHEEL && SDSUPPORT @@ -252,16 +265,22 @@ void menu_main() { if (card_detected) { if (!card_open) { MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard); - #if !PIN_EXISTS(SD_DETECT) - MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user - #endif + MENU_ITEM(gcode, + #if PIN_EXISTS(SD_DETECT) + MSG_CHANGE_SDCARD, PSTR("M21") + #else + MSG_RELEASE_SDCARD, PSTR("M22") + #endif + ); } } else { - #if !PIN_EXISTS(SD_DETECT) - MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually init SD-card + #if PIN_EXISTS(SD_DETECT) + MENU_ITEM(function, MSG_NO_CARD, nullptr); + #else + MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); + MENU_ITEM(function, MSG_SD_RELEASED, nullptr); #endif - MENU_ITEM(function, MSG_NO_CARD, NULL); } #endif // HAS_ENCODER_WHEEL && SDSUPPORT diff --git a/Marlin/src/lcd/menu/menu_mixer.cpp b/Marlin/src/lcd/menu/menu_mixer.cpp index 8e5b6f4d0f..437f44e7e2 100644 --- a/Marlin/src/lcd/menu/menu_mixer.cpp +++ b/Marlin/src/lcd/menu/menu_mixer.cpp @@ -101,7 +101,7 @@ MENU_ITEM_EDIT_CALLBACK(int8, MSG_GRADIENT_ALIAS, &mixer.gradient.vtool_index, 0, MIXING_VIRTUAL_TOOLS - 1, mixer.refresh_gradient); #endif - char tmp[10]; + char tmp[18]; MENU_ITEM(submenu, MSG_START_Z ":", lcd_mixer_gradient_z_start_edit); MENU_ITEM_ADDON_START(9); @@ -250,17 +250,17 @@ void lcd_mixer_mix_edit() { // // Reset All V-Tools // -inline void _lcd_reset_vtools() { - LCD_MESSAGEPGM(MSG_VTOOLS_RESET); - ui.return_to_status(); - mixer.reset_vtools(); -} - void menu_mixer_vtools_reset_confirm() { - START_MENU(); - MENU_BACK(MSG_BACK); - MENU_ITEM(function, MSG_RESET_VTOOLS, _lcd_reset_vtools); - END_MENU(); + do_select_screen( + PSTR(MSG_BUTTON_RESET), PSTR(MSG_BUTTON_CANCEL), + []{ + mixer.reset_vtools(); + LCD_MESSAGEPGM(MSG_VTOOLS_RESET); + ui.return_to_status(); + }, + ui.goto_previous_screen, + PSTR(MSG_RESET_VTOOLS), nullptr, PSTR("?") + ); } void menu_mixer() { @@ -298,7 +298,7 @@ void menu_mixer() { #if ENABLED(GRADIENT_MIX) { - char tmp[10]; + char tmp[13]; MENU_ITEM(submenu, MSG_GRADIENT, lcd_mixer_edit_gradient_menu); MENU_ITEM_ADDON_START(10); sprintf_P(tmp, PSTR("T%i->T%i"), mixer.gradient.start_vtool, mixer.gradient.end_vtool); diff --git a/Marlin/src/lcd/menu/menu_sdcard.cpp b/Marlin/src/lcd/menu/menu_sdcard.cpp index 274643841f..d574dc150e 100644 --- a/Marlin/src/lcd/menu/menu_sdcard.cpp +++ b/Marlin/src/lcd/menu/menu_sdcard.cpp @@ -81,17 +81,12 @@ inline void sdcard_start_selected_file() { #if ENABLED(SD_MENU_CONFIRM_START) - bool do_print_file; void menu_sd_confirm() { - if (ui.should_draw()) - do_select_screen(PSTR(MSG_BUTTON_PRINT), PSTR(MSG_BUTTON_CANCEL), do_print_file, PSTR(MSG_START_PRINT " "), card.longest_filename(), PSTR("?")); - - if (ui.use_click()) { - if (do_print_file) - sdcard_start_selected_file(); - else - ui.goto_previous_screen(); - } + do_select_screen( + PSTR(MSG_BUTTON_PRINT), PSTR(MSG_BUTTON_CANCEL), + sdcard_start_selected_file, ui.goto_previous_screen, + PSTR(MSG_START_PRINT " "), card.longest_filename(), PSTR("?") + ); } #endif @@ -106,7 +101,6 @@ class MenuItem_sdfile { sd_items = screen_items; #endif #if ENABLED(SD_MENU_CONFIRM_START) - do_print_file = false; MenuItem_submenu::action(menu_sd_confirm); #else sdcard_start_selected_file(); diff --git a/Marlin/src/lcd/menu/menu_service.cpp b/Marlin/src/lcd/menu/menu_service.cpp index 05d43f5fd0..3ab890d7bb 100644 --- a/Marlin/src/lcd/menu/menu_service.cpp +++ b/Marlin/src/lcd/menu/menu_service.cpp @@ -31,52 +31,32 @@ #include "menu.h" #include "../../module/printcounter.h" -inline void _lcd_reset_service(const int index) { - print_job_timer.resetServiceInterval(index); - BUZZ(200, 404); - ui.reset_status(); - ui.return_to_status(); +inline void _menu_service(const int index, PGM_P const name) { + char sram[30]; + strncpy_P(sram, name, 29); + do_select_screen( + PSTR(MSG_BUTTON_RESET), PSTR(MSG_BUTTON_CANCEL), + []{ + print_job_timer.resetServiceInterval(index); + ui.completion_feedback(true); + ui.reset_status(); + ui.return_to_status(); + }, + ui.goto_previous_screen, + PSTR(MSG_SERVICE_RESET), sram, PSTR("?") + ); } #if SERVICE_INTERVAL_1 > 0 - void menu_action_reset_service1() { _lcd_reset_service(1); } + void menu_service1() { _menu_service(1, PSTR(SERVICE_NAME_1)); } #endif #if SERVICE_INTERVAL_2 > 0 - void menu_action_reset_service2() { _lcd_reset_service(2); } + void menu_service2() { _menu_service(2, PSTR(SERVICE_NAME_2)); } #endif #if SERVICE_INTERVAL_3 > 0 - void menu_action_reset_service3() { _lcd_reset_service(3); } -#endif - -inline void _menu_service(const int index) { - START_MENU(); - MENU_BACK(MSG_MAIN); - switch (index) { - #if SERVICE_INTERVAL_1 > 0 - case 1: MENU_ITEM(function, MSG_SERVICE_RESET, menu_action_reset_service1); break; - #endif - #if SERVICE_INTERVAL_2 > 0 - case 2: MENU_ITEM(function, MSG_SERVICE_RESET, menu_action_reset_service2); break; - #endif - #if SERVICE_INTERVAL_3 > 0 - case 3: MENU_ITEM(function, MSG_SERVICE_RESET, menu_action_reset_service3); break; - #endif - } - END_MENU(); -} - -#if SERVICE_INTERVAL_1 > 0 - void menu_service1() { _menu_service(1); } -#endif - -#if SERVICE_INTERVAL_2 > 0 - void menu_service2() { _menu_service(2); } -#endif - -#if SERVICE_INTERVAL_3 > 0 - void menu_service3() { _menu_service(3); } + void menu_service3() { _menu_service(3, PSTR(SERVICE_NAME_3)); } #endif #endif // HAS_LCD_MENU && HAS_SERVICE_INTERVALS && PRINTCOUNTER diff --git a/Marlin/src/lcd/menu/menu_ubl.cpp b/Marlin/src/lcd/menu/menu_ubl.cpp index 8b182b89b9..2bb9409794 100644 --- a/Marlin/src/lcd/menu/menu_ubl.cpp +++ b/Marlin/src/lcd/menu/menu_ubl.cpp @@ -228,7 +228,7 @@ void _lcd_ubl_validate_mesh() { * UBL Grid Leveling Command */ void _lcd_ubl_grid_level_cmd() { - char UBL_LCD_GCODE[10]; + char UBL_LCD_GCODE[12]; sprintf_P(UBL_LCD_GCODE, PSTR("G29 J%i"), side_points); lcd_enqueue_command(UBL_LCD_GCODE); } @@ -269,7 +269,7 @@ void _lcd_ubl_mesh_leveling() { * UBL Fill-in Amount Mesh Command */ void _lcd_ubl_fillin_amount_cmd() { - char UBL_LCD_GCODE[16]; + char UBL_LCD_GCODE[18]; sprintf_P(UBL_LCD_GCODE, PSTR("G29 P3 R C.%i"), ubl_fillin_amount); lcd_enqueue_command(UBL_LCD_GCODE); } diff --git a/Marlin/src/lcd/thermistornames.h b/Marlin/src/lcd/thermistornames.h index ea7998e33f..d143de5719 100644 --- a/Marlin/src/lcd/thermistornames.h +++ b/Marlin/src/lcd/thermistornames.h @@ -31,8 +31,12 @@ #undef THERMISTOR_NAME +// User-specified thermistor parameters +#if THERMISTOR_ID == 1000 + #define THERMISTOR_NAME "User Parameters" + // Thermcouples -#if THERMISTOR_ID == -4 +#elif THERMISTOR_ID == -4 #define THERMISTOR_NAME "AD8495" #elif THERMISTOR_ID == -3 #define THERMISTOR_NAME "MAX31855" @@ -96,6 +100,8 @@ #define THERMISTOR_NAME "PT100 1K" #elif THERMISTOR_ID == 666 #define THERMISTOR_NAME "Einstart S" +#elif THERMISTOR_ID == 501 + #define THERMISTOR_NAME "Zonestar (Tronxy X3A)" // High Temperature thermistors #elif THERMISTOR_ID == 61 diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 0cdac15690..8dbec921e1 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -23,7 +23,7 @@ #include "../inc/MarlinConfigPre.h" // These displays all share the MarlinUI class -#if HAS_SPI_LCD || EITHER(MALYAN_LCD, EXTENSIBLE_UI) +#if HAS_DISPLAY #include "ultralcd.h" #include "fontutils.h" MarlinUI ui; @@ -193,24 +193,39 @@ millis_t next_button_update_ms; #endif - void wrap_string(uint8_t y, const char * const string) { - uint8_t x = LCD_WIDTH; + void _wrap_string(uint8_t &x, uint8_t &y, const char * const string, read_byte_cb_t cb_read_byte) { + SETCURSOR(x, y); if (string) { uint8_t *p = (uint8_t*)string; for (;;) { - if (x >= LCD_WIDTH) { - x = 0; - SETCURSOR(0, y++); - } wchar_t ch; - p = get_utf8_value_cb(p, read_byte_ram, &ch); + p = get_utf8_value_cb(p, cb_read_byte, &ch); if (!ch) break; lcd_put_wchar(ch); x++; + if (x >= LCD_WIDTH) { + x = 0; y++; + SETCURSOR(0, y); + } } } } + void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { + const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0; + uint8_t x = 0, y = 0; + if (!string && plen + slen <= LCD_WIDTH) { + x = (LCD_WIDTH - plen - slen) / 2; + y = LCD_HEIGHT > 3 ? 1 : 0; + } + wrap_string_P(x, y, pref); + if (string) { + if (x) { x = 0; y++; } // Move to the start of the next line + wrap_string(x, y, string); + } + if (suff) wrap_string_P(x, y, suff); + } + #endif // HAS_LCD_MENU void MarlinUI::init() { @@ -731,6 +746,7 @@ void MarlinUI::update() { refresh(); init_lcd(); // May revive the LCD if static electricity killed it + ms = millis(); next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL; // delay LCD update until after SD activity completes } @@ -1176,7 +1192,7 @@ void MarlinUI::update() { #endif // HAS_SPI_LCD -#if HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI) +#if HAS_DISPLAY #if ENABLED(EXTENSIBLE_UI) #include "extensible_ui/ui_api.h" @@ -1360,4 +1376,4 @@ void MarlinUI::update() { } #endif -#endif // HAS_SPI_LCD || EXTENSIBLE_UI +#endif // HAS_DISPLAY diff --git a/Marlin/src/lcd/ultralcd.h b/Marlin/src/lcd/ultralcd.h index be694ddfe4..fc573211b3 100644 --- a/Marlin/src/lcd/ultralcd.h +++ b/Marlin/src/lcd/ultralcd.h @@ -72,7 +72,11 @@ #define LCDWRITE(c) lcd_put_wchar(c) #endif - void wrap_string(uint8_t y, const char * const string); + #include "fontutils.h" + + void _wrap_string(uint8_t &x, uint8_t &y, const char * const string, read_byte_cb_t cb_read_byte); + inline void wrap_string_P(uint8_t &x, uint8_t &y, PGM_P const pstr) { _wrap_string(x, y, pstr, read_byte_rom); } + inline void wrap_string(uint8_t &x, uint8_t &y, const char * const string) { _wrap_string(x, y, string, read_byte_ram); } #if ENABLED(SDSUPPORT) #include "../sd/cardreader.h" @@ -264,17 +268,11 @@ public: static void clear_lcd(); static void init_lcd(); - #if HAS_SPI_LCD || EITHER(MALYAN_LCD, EXTENSIBLE_UI) + #if HAS_DISPLAY + static void init(); static void update(); static void set_alert_status_P(PGM_P message); - #else // NO LCD - static inline void init() {} - static inline void update() {} - static inline void set_alert_status_P(PGM_P message) { UNUSED(message); } - #endif - - #if HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI) static char status_message[]; static bool has_status(); @@ -371,9 +369,12 @@ public: static void status_printf_P(const uint8_t level, PGM_P const fmt, ...); static void reset_status(); - #else // MALYAN_LCD or NO LCD + #else // No LCD + static inline void init() {} + static inline void update() {} static inline void refresh() {} + static inline void set_alert_status_P(PGM_P message) { UNUSED(message); } static inline void set_status(const char* const message, const bool persist=false) { UNUSED(message); UNUSED(persist); } static inline void set_status_P(PGM_P const message, const int8_t level=0) { UNUSED(message); UNUSED(level); } static inline void status_printf_P(const uint8_t level, PGM_P const fmt, ...) { UNUSED(level); UNUSED(fmt); } @@ -418,7 +419,7 @@ public: static bool lcd_clicked; static bool use_click(); - static void synchronize(PGM_P const msg=NULL); + static void synchronize(PGM_P const msg=nullptr); static screenFunc_t currentScreen; static void goto_screen(const screenFunc_t screen, const uint16_t encoder=0, const uint8_t top=0, const uint8_t items=0); @@ -457,6 +458,8 @@ public: static void ubl_plot(const uint8_t x, const uint8_t inverted_y); #endif + static void draw_select_screen_prompt(PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr); + #elif HAS_SPI_LCD static constexpr bool lcd_clicked = false; @@ -523,7 +526,7 @@ private: static void _synchronize(); - #if HAS_SPI_LCD || ENABLED(EXTENSIBLE_UI) + #if HAS_DISPLAY static void finish_status(const bool persist); #endif diff --git a/Marlin/src/libs/L6470/L6470_Marlin.cpp b/Marlin/src/libs/L6470/L6470_Marlin.cpp index 9e1fd2ca69..6468d6f088 100644 --- a/Marlin/src/libs/L6470/L6470_Marlin.cpp +++ b/Marlin/src/libs/L6470/L6470_Marlin.cpp @@ -624,7 +624,7 @@ void L6470_Marlin::error_status_decode(const uint16_t status, const uint8_t axis #endif }; - inline void append_stepper_err(char * &p, const uint8_t stepper_index, const char * const err=NULL) { + inline void append_stepper_err(char * &p, const uint8_t stepper_index, const char * const err=nullptr) { p += sprintf_P(p, PSTR("Stepper %c%c "), char(index_to_axis[stepper_index][0]), char(index_to_axis[stepper_index][1])); if (err) p += sprintf_P(p, err); } diff --git a/Marlin/src/libs/duration_t.h b/Marlin/src/libs/duration_t.h index b446f4b496..1eb0b03984 100644 --- a/Marlin/src/libs/duration_t.h +++ b/Marlin/src/libs/duration_t.h @@ -21,7 +21,7 @@ */ #pragma once -#include +#include "../HAL/shared/Marduino.h" struct duration_t { /** diff --git a/Marlin/src/libs/softspi.h b/Marlin/src/libs/softspi.h index 819567df81..e986922c83 100644 --- a/Marlin/src/libs/softspi.h +++ b/Marlin/src/libs/softspi.h @@ -1,17 +1,36 @@ -// https://github.com/niteris/ArduinoSoftSpi +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once -#include +// +// Based on https://github.com/niteris/ArduinoSoftSpi +// + +#include "../HAL/shared/Marduino.h" #ifndef FORCE_INLINE #define FORCE_INLINE inline __attribute__((always_inline)) #endif -#ifndef _BV - #define _BV(B) (1 << (B)) - #define SBI(A,B) (A |= (1 << (B))) - #define CBI(A,B) (A &= ~(1 << (B))) -#endif - #define nop __asm__ volatile ("nop") // NOP for timing #ifdef __arm__ diff --git a/Marlin/src/libs/vector_3.cpp b/Marlin/src/libs/vector_3.cpp index a320085aae..c9d8a9b9f4 100644 --- a/Marlin/src/libs/vector_3.cpp +++ b/Marlin/src/libs/vector_3.cpp @@ -140,7 +140,7 @@ matrix_3x3 matrix_3x3::transpose(const matrix_3x3 &original) { } void matrix_3x3::debug(PGM_P const title) { - if (title != NULL) { + if (title != nullptr) { serialprintPGM(title); SERIAL_EOL(); } diff --git a/Marlin/src/module/configuration_store.cpp b/Marlin/src/module/configuration_store.cpp index 0552f555a5..50d5214ff2 100644 --- a/Marlin/src/module/configuration_store.cpp +++ b/Marlin/src/module/configuration_store.cpp @@ -37,7 +37,7 @@ */ // Change EEPROM version if the structure changes -#define EEPROM_VERSION "V64" +#define EEPROM_VERSION "V66" #define EEPROM_OFFSET 100 // Check the integrity of data offsets. @@ -64,6 +64,10 @@ #include "../feature/bedlevel/bedlevel.h" #endif +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extensible_ui/ui_api.h" +#endif + #if HAS_SERVOS #include "servo.h" #endif @@ -86,6 +90,16 @@ #include "../feature/pause.h" +#if ENABLED(BACKLASH_COMPENSATION) + #include "../feature/backlash.h" +#endif + +#if HAS_FILAMENT_SENSOR + #include "../feature/runout.h" +#endif + +#include "../lcd/extensible_ui/ui_api.h" + #if ENABLED(EXTRA_LIN_ADVANCE_K) extern float saved_extruder_advance_K[EXTRUDERS]; #endif @@ -137,6 +151,12 @@ typedef struct SettingsDataStruct { float hotend_offset[XYZ][HOTENDS - 1]; // M218 XYZ #endif + // + // FILAMENT_RUNOUT_SENSOR + // + bool runout_sensor_enabled; // M412 S + float runout_distance_mm; // M412 D + // // ENABLE_LEVELING_FADE_HEIGHT // @@ -223,6 +243,13 @@ typedef struct SettingsDataStruct { // PID_t bedPID; // M304 PID / M303 E-1 U + // + // User-defined Thermistors + // + #if HAS_USER_THERMISTORS + user_thermistor_t user_thermistor[USER_THERMISTORS]; // M305 P0 R4700 T100000 B3950 + #endif + // // HAS_LCD_CONTRAST // @@ -285,8 +312,25 @@ typedef struct SettingsDataStruct { toolchange_settings_t toolchange_settings; // M217 S P R #endif + // + // BACKLASH_COMPENSATION + // + float backlash_distance_mm[XYZ]; // M425 X Y Z + uint8_t backlash_correction; // M425 F + float backlash_smoothing_mm; // M425 S + + // + // EXTENSIBLE_UI + // + #if ENABLED(EXTENSIBLE_UI) + // This is a significant hardware change; don't reserve space when not present + uint8_t extui_data[ExtUI::eeprom_data_size]; + #endif + } SettingsData; +//static_assert(sizeof(SettingsData) <= E2END + 1, "EEPROM too small to contain SettingsData!"); + MarlinSettings settings; uint16_t MarlinSettings::datasize() { return sizeof(SettingsData); } @@ -357,6 +401,15 @@ void MarlinSettings::postprocess() { report_current_position(); } +#if BOTH(PRINTCOUNTER, EEPROM_SETTINGS) + #include "printcounter.h" + static_assert( + !WITHIN(STATS_EEPROM_ADDRESS, EEPROM_OFFSET, EEPROM_OFFSET + sizeof(SettingsData)) && + !WITHIN(STATS_EEPROM_ADDRESS + sizeof(printStatistics), EEPROM_OFFSET, EEPROM_OFFSET + sizeof(SettingsData)), + "STATS_EEPROM_ADDRESS collides with EEPROM settings storage." + ); +#endif + #if ENABLED(SD_FIRMWARE_UPDATE) #if ENABLED(EEPROM_SETTINGS) @@ -508,6 +561,25 @@ void MarlinSettings::postprocess() { #endif } + // + // Filament Runout Sensor + // + { + #if HAS_FILAMENT_SENSOR + const bool &runout_sensor_enabled = runout.enabled; + #else + const bool runout_sensor_enabled = false; + #endif + #if HAS_FILAMENT_SENSOR && defined(FILAMENT_RUNOUT_DISTANCE_MM) + const float &runout_distance_mm = runout.runout_distance(); + #else + const float runout_distance_mm = 0; + #endif + _FIELD_TEST(runout_sensor_enabled); + EEPROM_WRITE(runout_sensor_enabled); + EEPROM_WRITE(runout_distance_mm); + } + // // Global Leveling // @@ -734,6 +806,16 @@ void MarlinSettings::postprocess() { #endif } + // + // User-defined Thermistors + // + #if HAS_USER_THERMISTORS + { + _FIELD_TEST(user_thermistor); + EEPROM_WRITE(thermalManager.user_thermistor); + } + #endif + // // LCD Contrast // @@ -1091,6 +1173,42 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(toolchange_settings); #endif + // + // Backlash Compensation + // + { + #if ENABLED(BACKLASH_COMPENSATION) + const float (&backlash_distance_mm)[XYZ] = backlash.distance_mm; + const uint8_t &backlash_correction = backlash.correction; + #else + const float backlash_distance_mm[XYZ] = { 0 }; + const uint8_t backlash_correction = 0; + #endif + #ifdef BACKLASH_SMOOTHING_MM + const float &backlash_smoothing_mm = backlash.smoothing_mm; + #else + const float backlash_smoothing_mm = 3; + #endif + _FIELD_TEST(backlash_distance_mm); + EEPROM_WRITE(backlash_distance_mm[X_AXIS]); + EEPROM_WRITE(backlash_distance_mm[Y_AXIS]); + EEPROM_WRITE(backlash_distance_mm[Z_AXIS]); + EEPROM_WRITE(backlash_correction); + EEPROM_WRITE(backlash_smoothing_mm); + } + + // + // Extensible UI User Data + // + #if ENABLED(EXTENSIBLE_UI) + { + char extui_data[ExtUI::eeprom_data_size] = { 0 }; + ExtUI::onStoreSettings(extui_data); + _FIELD_TEST(extui_data); + EEPROM_WRITE(extui_data); + } + #endif + // // Validate CRC and Data Size // @@ -1120,6 +1238,10 @@ void MarlinSettings::postprocess() { store_mesh(ubl.storage_slot); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onConfigurationStoreWritten(!eeprom_error); + #endif + return !eeprom_error; } @@ -1229,6 +1351,25 @@ void MarlinSettings::postprocess() { #endif } + // + // Filament Runout Sensor + // + { + #if HAS_FILAMENT_SENSOR + bool &runout_sensor_enabled = runout.enabled; + #else + bool runout_sensor_enabled; + #endif + _FIELD_TEST(runout_sensor_enabled); + EEPROM_READ(runout_sensor_enabled); + + float runout_distance_mm; + EEPROM_READ(runout_distance_mm); + #if HAS_FILAMENT_SENSOR && defined(FILAMENT_RUNOUT_DISTANCE_MM) + runout.set_runout_distance(runout_distance_mm); + #endif + } + // // Global Leveling // @@ -1454,6 +1595,16 @@ void MarlinSettings::postprocess() { #endif } + // + // User-defined Thermistors + // + #if HAS_USER_THERMISTORS + { + _FIELD_TEST(user_thermistor); + EEPROM_READ(thermalManager.user_thermistor); + } + #endif + // // LCD Contrast // @@ -1807,6 +1958,44 @@ void MarlinSettings::postprocess() { EEPROM_READ(toolchange_settings); #endif + // + // Backlash Compensation + // + { + #if ENABLED(BACKLASH_COMPENSATION) + float (&backlash_distance_mm)[XYZ] = backlash.distance_mm; + uint8_t &backlash_correction = backlash.correction; + #else + float backlash_distance_mm[XYZ]; + uint8_t backlash_correction; + #endif + #ifdef BACKLASH_SMOOTHING_MM + float &backlash_smoothing_mm = backlash.smoothing_mm; + #else + float backlash_smoothing_mm; + #endif + _FIELD_TEST(backlash_distance_mm); + EEPROM_READ(backlash_distance_mm[X_AXIS]); + EEPROM_READ(backlash_distance_mm[Y_AXIS]); + EEPROM_READ(backlash_distance_mm[Z_AXIS]); + EEPROM_READ(backlash_correction); + EEPROM_READ(backlash_smoothing_mm); + } + + // + // Extensible UI User Data + // + #if ENABLED(EXTENSIBLE_UI) + // This is a significant hardware change; don't reserve EEPROM space when not present + { + const char extui_data[ExtUI::eeprom_data_size] = { 0 }; + _FIELD_TEST(extui_data); + EEPROM_READ(extui_data); + if(!validating) + ExtUI::onLoadSettings(extui_data); + } + #endif + eeprom_error = size_error(eeprom_index - (EEPROM_OFFSET)); if (eeprom_error) { DEBUG_ECHO_START(); @@ -1874,8 +2063,18 @@ void MarlinSettings::postprocess() { } bool MarlinSettings::load() { - if (validate()) return _load(); + if (validate()) { + const bool success = _load(); + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onConfigurationStoreRead(success); + #endif + return success; + } reset(); + #if ENABLED(EEPROM_AUTO_INIT) + (void)save(); + SERIAL_ECHO_MSG("EEPROM Initialized"); + #endif return true; } @@ -1937,7 +2136,7 @@ void MarlinSettings::postprocess() { #endif } - void MarlinSettings::load_mesh(const int8_t slot, void * const into/*=NULL*/) { + void MarlinSettings::load_mesh(const int8_t slot, void * const into/*=nullptr*/) { #if ENABLED(AUTO_BED_LEVELING_UBL) @@ -2033,6 +2232,22 @@ void MarlinSettings::reset() { reset_hotend_offsets(); #endif + // + // Filament Runout Sensor + // + + #if HAS_FILAMENT_SENSOR + runout.enabled = true; + runout.reset(); + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + runout.set_runout_distance(FILAMENT_RUNOUT_DISTANCE_MM); + #endif + #endif + + // + // Tool-change Settings + // + #if EXTRUDERS > 1 #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) toolchange_settings.swap_length = TOOLCHANGE_FIL_SWAP_LENGTH; @@ -2045,6 +2260,27 @@ void MarlinSettings::reset() { toolchange_settings.z_raise = TOOLCHANGE_ZRAISE; #endif + #if ENABLED(BACKLASH_GCODE) + backlash.correction = (BACKLASH_CORRECTION) * 255; + #ifdef BACKLASH_DISTANCE_MM + constexpr float tmp[XYZ] = BACKLASH_DISTANCE_MM; + backlash.distance_mm[X_AXIS] = tmp[X_AXIS]; + backlash.distance_mm[Y_AXIS] = tmp[Y_AXIS]; + backlash.distance_mm[Z_AXIS] = tmp[Z_AXIS]; + #endif + #ifdef BACKLASH_SMOOTHING_MM + backlash.smoothing_mm = BACKLASH_SMOOTHING_MM; + #endif + #endif + + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onFactoryReset(); + #endif + + // + // Magnetic Parking Extruder + // + #if ENABLED(MAGNETIC_PARKING_EXTRUDER) mpe_settings_init(); #endif @@ -2180,6 +2416,14 @@ void MarlinSettings::reset() { thermalManager.temp_bed.pid.Kd = scalePID_d(DEFAULT_bedKd); #endif + // + // User-Defined Thermistors + // + + #if HAS_USER_THERMISTORS + thermalManager.reset_user_thermistors(); + #endif + // // LCD Contrast // @@ -2290,6 +2534,10 @@ void MarlinSettings::reset() { DEBUG_ECHO_START(); DEBUG_ECHOLNPGM("Hardcoded Default Settings Loaded"); + + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onFactoryReset(); + #endif } #if DISABLED(DISABLE_M503) @@ -2301,7 +2549,7 @@ void MarlinSettings::reset() { #if HAS_TRINAMIC inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M906"); } #if HAS_STEALTHCHOP - void say_M569(const char * const etc=NULL) { + void say_M569(const char * const etc=nullptr) { SERIAL_ECHOPGM(" M569 S1"); if (etc) { SERIAL_CHAR(' '); @@ -2522,6 +2770,12 @@ void MarlinSettings::reset() { } #endif + #if HAS_FILAMENT_SENSOR + CONFIG_ECHO_HEADING("Filament Runout Sensor:"); + CONFIG_ECHO_START(); + SERIAL_ECHOLNPAIR(" M412 S", int(runout.enabled)); + #endif + /** * Bed Leveling */ @@ -2735,6 +2989,12 @@ void MarlinSettings::reset() { #endif // PIDTEMP || PIDTEMPBED + #if HAS_USER_THERMISTORS + CONFIG_ECHO_HEADING("User thermistors:"); + for (uint8_t i = 0; i < USER_THERMISTORS; i++) + thermalManager.log_user_thermistor(i, true); + #endif + #if HAS_LCD_CONTRAST CONFIG_ECHO_HEADING("LCD Contrast:"); CONFIG_ECHO_START(); @@ -3123,6 +3383,31 @@ void MarlinSettings::reset() { CONFIG_ECHO_START(); M217_report(true); #endif + + #if ENABLED(BACKLASH_GCODE) + CONFIG_ECHO_HEADING("Backlash compensation:"); + CONFIG_ECHO_START(); + SERIAL_ECHOLNPAIR( + " M425 F", backlash.get_correction(), + " X", LINEAR_UNIT(backlash.distance_mm[X_AXIS]), + " Y", LINEAR_UNIT(backlash.distance_mm[Y_AXIS]), + " Z", LINEAR_UNIT(backlash.distance_mm[Z_AXIS]) + #ifdef BACKLASH_SMOOTHING_MM + , " S", LINEAR_UNIT(backlash.smoothing_mm) + #endif + ); + #endif + + #if HAS_FILAMENT_SENSOR + CONFIG_ECHO_HEADING("Filament runout sensor:"); + CONFIG_ECHO_START(); + SERIAL_ECHOLNPAIR( + " M412 S", int(runout.enabled) + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + , " D", LINEAR_UNIT(runout.runout_distance()) + #endif + ); + #endif } #endif // !DISABLE_M503 diff --git a/Marlin/src/module/configuration_store.h b/Marlin/src/module/configuration_store.h index af2bff1e0a..05b4e12bd6 100644 --- a/Marlin/src/module/configuration_store.h +++ b/Marlin/src/module/configuration_store.h @@ -65,7 +65,7 @@ class MarlinSettings { static uint16_t calc_num_meshes(); static int mesh_slot_offset(const int8_t slot); static void store_mesh(const int8_t slot); - static void load_mesh(const int8_t slot, void * const into=NULL); + static void load_mesh(const int8_t slot, void * const into=nullptr); //static void delete_mesh(); // necessary if we have a MAT //static void defrag_meshes(); // " diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index e077045ef5..bfb89fb7b5 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -40,6 +40,10 @@ #include "printcounter.h" // for print_job_timer #endif +#if ENABLED(BLTOUCH) + #include "../feature/bltouch.h" +#endif + Endstops endstops; // private: @@ -373,7 +377,7 @@ void Endstops::event_handler() { prev_hit_state = hit_state; } -static void print_es_state(const bool is_hit, PGM_P const label=NULL) { +static void print_es_state(const bool is_hit, PGM_P const label=nullptr) { if (label) serialprintPGM(label); SERIAL_ECHOPGM(": "); serialprintPGM(is_hit ? PSTR(MSG_ENDSTOP_HIT) : PSTR(MSG_ENDSTOP_OPEN)); @@ -381,6 +385,9 @@ static void print_es_state(const bool is_hit, PGM_P const label=NULL) { } void _O2 Endstops::M119() { + #if ENABLED(BLTOUCH) + bltouch._set_SW_mode(); + #endif SERIAL_ECHOLNPGM(MSG_M119_REPORT); #define ES_REPORT(S) print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S)) #if HAS_X_MIN @@ -457,6 +464,10 @@ void _O2 Endstops::M119() { } #endif #endif + #if ENABLED(BLTOUCH) + bltouch._reset(); + if (enabled_globally) bltouch._stow(); + #endif } // Endstops::M119 // The following routines are called from an ISR context. It could be the temperature ISR, the diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index 30f63ebed5..7f1f9172c9 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -982,9 +982,21 @@ void prepare_move_to_destination() { } #endif // PREVENT_COLD_EXTRUSION #if ENABLED(PREVENT_LENGTHY_EXTRUDE) - if (ABS(destination[E_AXIS] - current_position[E_AXIS]) * planner.e_factor[active_extruder] > (EXTRUDE_MAXLENGTH)) { - current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part - SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP); + const float e_delta = ABS(destination[E_AXIS] - current_position[E_AXIS]) * planner.e_factor[active_extruder]; + if (e_delta > (EXTRUDE_MAXLENGTH)) { + #if ENABLED(MIXING_EXTRUDER) + bool ignore_e = false; + float collector[MIXING_STEPPERS]; + mixer.refresh_collector(1.0, mixer.get_current_vtool(), collector); + MIXER_STEPPER_LOOP(e) + if (e_delta * collector[e] > (EXTRUDE_MAXLENGTH)) { ignore_e = true; break; } + #else + constexpr bool ignore_e = true; + #endif + if (ignore_e) { + current_position[E_AXIS] = destination[E_AXIS]; // Behave as if the move really took place, but ignore E part + SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP); + } } #endif // PREVENT_LENGTHY_EXTRUDE } diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index ff4f13e1d7..ff6e0e71c7 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -92,6 +92,10 @@ #include "../feature/power.h" #endif +#if ENABLED(BACKLASH_COMPENSATION) + #include "../feature/backlash.h" +#endif + // Delay for delivery of first block to the stepper ISR, if the queue contains 2 or // fewer movements. The delay is measured in milliseconds, and must be less than 250ms #define BLOCK_DELAY_FOR_1ST_MOVE 100 @@ -896,7 +900,7 @@ void Planner::reverse_pass() { // Reverse Pass: Coarsely maximize all possible deceleration curves back-planning from the last // block in buffer. Cease planning when the last optimal planned or tail pointer is reached. // NOTE: Forward pass will later refine and correct the reverse pass to create an optimal plan. - const block_t *next = NULL; + const block_t *next = nullptr; while (block_index != planned_block_index) { // Perform the reverse pass @@ -991,7 +995,7 @@ void Planner::forward_pass() { uint8_t block_index = block_buffer_planned; block_t *current; - const block_t * previous = NULL; + const block_t * previous = nullptr; while (block_index != block_buffer_head) { // Perform the forward pass @@ -1041,7 +1045,7 @@ void Planner::recalculate_trapezoids() { } // Go from the tail (currently executed block) to the first block, without including it) - block_t *current = NULL, *next = NULL; + block_t *current = nullptr, *next = nullptr; float current_entry_speed = 0.0, next_entry_speed = 0.0; while (block_index != head_block_index) { @@ -1560,94 +1564,6 @@ void Planner::synchronize() { ) idle(); } -/** - * The following implements axis backlash correction. To minimize seams - * on the printed part, the backlash correction only adds steps to the - * current segment (instead of creating a new segment, which causes - * discontinuities and print artifacts). - * - * When BACKLASH_SMOOTHING_MM is enabled and non-zero, the backlash - * correction is spread over multiple segments, smoothing out print - * artifacts even more. - */ -#if ENABLED(BACKLASH_COMPENSATION) - #if ENABLED(BACKLASH_GCODE) - extern float backlash_distance_mm[]; - extern uint8_t backlash_correction; - #ifdef BACKLASH_SMOOTHING_MM - extern float backlash_smoothing_mm; - #endif - #else - constexpr float backlash_distance_mm[XYZ] = BACKLASH_DISTANCE_MM, - constexpr uint8_t backlash_correction = BACKLASH_CORRECTION * 255; - #ifdef BACKLASH_SMOOTHING_MM - constexpr float backlash_smoothing_mm = BACKLASH_SMOOTHING_MM; - #endif - #endif - - void Planner::add_backlash_correction_steps(const int32_t da, const int32_t db, const int32_t dc, const uint8_t dm, block_t * const block) { - static uint8_t last_direction_bits; - uint8_t changed_dir = last_direction_bits ^ dm; - // Ignore direction change if no steps are taken in that direction - if (da == 0) CBI(changed_dir, X_AXIS); - if (db == 0) CBI(changed_dir, Y_AXIS); - if (dc == 0) CBI(changed_dir, Z_AXIS); - last_direction_bits ^= changed_dir; - - if (backlash_correction == 0) return; - - #ifdef BACKLASH_SMOOTHING_MM - // The segment proportion is a value greater than 0.0 indicating how much residual_error - // is corrected for in this segment. The contribution is based on segment length and the - // smoothing distance. Since the computation of this proportion involves a floating point - // division, defer computation until needed. - float segment_proportion = 0; - - // Residual error carried forward across multiple segments, so correction can be applied - // to segments where there is no direction change. - static int32_t residual_error[XYZ] = { 0 }; - #else - // No leftover residual error from segment to segment - int32_t residual_error[XYZ] = { 0 }; - // No direction change, no correction. - if (!changed_dir) return; - #endif - - const float f_corr = float(backlash_correction) / 255.0f; - - LOOP_XYZ(axis) { - if (backlash_distance_mm[axis]) { - const bool reversing = TEST(dm,axis); - - // When an axis changes direction, add axis backlash to the residual error - if (TEST(changed_dir, axis)) - residual_error[axis] += (reversing ? -f_corr : f_corr) * backlash_distance_mm[axis] * planner.settings.axis_steps_per_mm[axis]; - - // Decide how much of the residual error to correct in this segment - int32_t error_correction = residual_error[axis]; - #ifdef BACKLASH_SMOOTHING_MM - if (error_correction && backlash_smoothing_mm != 0) { - // Take up a portion of the residual_error in this segment, but only when - // the current segment travels in the same direction as the correction - if (reversing == (error_correction < 0)) { - if (segment_proportion == 0) - segment_proportion = MIN(1.0f, block->millimeters / backlash_smoothing_mm); - error_correction = ceil(segment_proportion * error_correction); - } - else - error_correction = 0; // Don't take up any backlash in this segment, as it would subtract steps - } - #endif - // Making a correction reduces the residual error and modifies delta_mm - if (error_correction) { - block->steps[axis] += ABS(error_correction); - residual_error[axis] -= error_correction; - } - } - } - } -#endif // BACKLASH_COMPENSATION - /** * Planner::_buffer_steps * @@ -1767,13 +1683,26 @@ bool Planner::_populate_block(block_t * const block, bool split_move, } #endif // PREVENT_COLD_EXTRUSION #if ENABLED(PREVENT_LENGTHY_EXTRUDE) - if (ABS(de * e_factor[extruder]) > (int32_t)settings.axis_steps_per_mm[E_AXIS_N(extruder)] * (EXTRUDE_MAXLENGTH)) { // It's not important to get max. extrusion length in a precision < 1mm, so save some cycles and cast to int - position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part - #if HAS_POSITION_FLOAT - position_float[E_AXIS] = target_float[E_AXIS]; + const float e_steps = ABS(de * e_factor[extruder]); + const float max_e_steps = settings.axis_steps_per_mm[E_AXIS_N(extruder)] * (EXTRUDE_MAXLENGTH); + if (e_steps > max_e_steps) { + #if ENABLED(MIXING_EXTRUDER) + bool ignore_e = false; + float collector[MIXING_STEPPERS]; + mixer.refresh_collector(1.0, mixer.get_current_vtool(), collector); + MIXER_STEPPER_LOOP(e) + if (e_steps * collector[e] > max_e_steps) { ignore_e = true; break; } + #else + constexpr bool ignore_e = true; #endif - de = 0; // no difference - SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP); + if (ignore_e) { + position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part + #if HAS_POSITION_FLOAT + position_float[E_AXIS] = target_float[E_AXIS]; + #endif + de = 0; // no difference + SERIAL_ECHO_MSG(MSG_ERR_LONG_EXTRUDE_STOP); + } } #endif // PREVENT_LENGTHY_EXTRUDE } @@ -1906,7 +1835,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, * should *never* remove steps! */ #if ENABLED(BACKLASH_COMPENSATION) - add_backlash_correction_steps(da, db, dc, dm, block); + backlash.add_correction_steps(da, db, dc, dm, block); #endif } diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index a95c3f2605..39309a3e95 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -338,10 +338,6 @@ class Planner { volatile static uint32_t block_buffer_runtime_us; //Theoretical block buffer runtime in µs #endif - #if ENABLED(BACKLASH_COMPENSATION) - static void add_backlash_correction_steps(const int32_t da, const int32_t db, const int32_t dc, const uint8_t dm, block_t * const block); - #endif - public: /** @@ -750,7 +746,7 @@ class Planner { FORCE_INLINE static bool has_blocks_queued() { return (block_buffer_head != block_buffer_tail); } /** - * The current block. NULL if the buffer is empty. + * The current block. nullptr if the buffer is empty. * This also marks the block as busy. * WARNING: Called from Stepper ISR context! */ @@ -767,7 +763,7 @@ class Planner { --delay_before_delivering; // If the number of movements queued is less than 3, and there is still time // to wait, do not deliver anything - if (nr_moves < 3 && delay_before_delivering) return NULL; + if (nr_moves < 3 && delay_before_delivering) return nullptr; delay_before_delivering = 0; } @@ -775,7 +771,7 @@ class Planner { block_t * const block = &block_buffer[block_buffer_tail]; // No trapezoid calculated? Don't execute yet. - if (TEST(block->flag, BLOCK_BIT_RECALCULATE)) return NULL; + if (TEST(block->flag, BLOCK_BIT_RECALCULATE)) return nullptr; #if ENABLED(ULTRA_LCD) block_buffer_runtime_us -= block->segment_time_us; // We can't be sure how long an active block will take, so don't count it. @@ -797,7 +793,7 @@ class Planner { clear_block_buffer_runtime(); // paranoia. Buffer is empty now - so reset accumulated time to zero. #endif - return NULL; + return nullptr; } /** diff --git a/Marlin/src/module/printcounter.cpp b/Marlin/src/module/printcounter.cpp index 4fa3e501f3..51af80afcf 100644 --- a/Marlin/src/module/printcounter.cpp +++ b/Marlin/src/module/printcounter.cpp @@ -29,6 +29,10 @@ Stopwatch print_job_timer; // Global Print Job Timer instance #else // PRINTCOUNTER +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extensible_ui/ui_api.h" +#endif + #include "printcounter.h" #include "../Marlin.h" #include "../HAL/shared/persistent_store_api.h" @@ -169,6 +173,10 @@ void PrintCounter::saveStats() { persistentStore.access_start(); persistentStore.write_data(address + sizeof(uint8_t), (uint8_t*)&data, sizeof(printStatistics)); persistentStore.access_finish(); + + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onConfigurationStoreWritten(true); + #endif } #if HAS_SERVICE_INTERVALS diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 8988b15bea..20afebefd1 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -54,6 +54,10 @@ #include "planner.h" #endif +#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + #include "../feature/backlash.h" +#endif + float zprobe_zoffset; // Initialized by settings.load() #if ENABLED(BLTOUCH) @@ -279,7 +283,7 @@ float zprobe_zoffset; // Initialized by settings.load() #endif #if ENABLED(PROBING_STEPPERS_OFF) disable_e_steppers(); - #if DISABLED(DELTA) + #if DISABLED(DELTA, HOME_AFTER_DEACTIVATE) disable_X(); disable_Y(); #endif #endif @@ -463,30 +467,6 @@ bool set_probe_deployed(const bool deploy) { } #endif -#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) - #if USES_Z_MIN_PROBE_ENDSTOP - #define TEST_PROBE_PIN (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING) - #else - #define TEST_PROBE_PIN (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING) - #endif - - extern float backlash_measured_mm[]; - extern uint8_t backlash_measured_num[]; - - /* Measure Z backlash by raising nozzle in increments until probe deactivates */ - static void measure_backlash_with_probe() { - if (backlash_measured_num[Z_AXIS] == 255) return; - - float start_height = current_position[Z_AXIS]; - while (current_position[Z_AXIS] < (start_height + BACKLASH_MEASUREMENT_LIMIT) && TEST_PROBE_PIN) - do_blocking_move_to_z(current_position[Z_AXIS] + BACKLASH_MEASUREMENT_RESOLUTION, MMM_TO_MMS(BACKLASH_MEASUREMENT_FEEDRATE)); - - // The backlash from all probe points is averaged, so count the number of measurements - backlash_measured_mm[Z_AXIS] += current_position[Z_AXIS] - start_height; - backlash_measured_num[Z_AXIS]++; - } -#endif - /** * @brief Used by run_z_probe to do a single Z probe move. * @@ -643,7 +623,7 @@ static float run_z_probe() { } #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) - measure_backlash_with_probe(); + backlash.measure_with_probe(); #endif #if MULTIPLE_PROBING > 2 diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index ce3141c12f..5666f58bb3 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -113,7 +113,7 @@ Stepper stepper; // Singleton #include "../feature/mixing.h" #endif -#if FILAMENT_RUNOUT_DISTANCE_MM > 0 +#ifdef FILAMENT_RUNOUT_DISTANCE_MM #include "../feature/runout.h" #endif @@ -133,7 +133,7 @@ Stepper stepper; // Singleton // private: -block_t* Stepper::current_block; // (= NULL) A pointer to the block currently being traced +block_t* Stepper::current_block; // (= nullptr) A pointer to the block currently being traced uint8_t Stepper::last_direction_bits, // = 0 Stepper::axis_did_move; // = 0 @@ -1298,7 +1298,7 @@ void Stepper::isr() { ; // Limit the value to the maximum possible value of the timer - NOMORE(interval, HAL_TIMER_TYPE_MAX); + NOMORE(interval, uint32_t(HAL_TIMER_TYPE_MAX)); // Compute the time remaining for the main isr nextMainISR -= interval; @@ -1394,7 +1394,7 @@ void Stepper::stepper_pulse_phase_isr() { abort_current_block = false; if (current_block) { axis_did_move = 0; - current_block = NULL; + current_block = nullptr; planner.discard_current_block(); } } @@ -1537,11 +1537,11 @@ uint32_t Stepper::stepper_block_phase_isr() { // If current block is finished, reset pointer if (step_events_completed >= step_event_count) { - #if FILAMENT_RUNOUT_DISTANCE_MM > 0 + #ifdef FILAMENT_RUNOUT_DISTANCE_MM runout.block_completed(current_block); #endif axis_did_move = 0; - current_block = NULL; + current_block = nullptr; planner.discard_current_block(); } else { diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 46bc9d706a..b3f53fc4b6 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -156,9 +156,11 @@ #define MIN_ISR_LOOP_CYCLES (ISR_X_STEPPER_CYCLES + ISR_Y_STEPPER_CYCLES + ISR_Z_STEPPER_CYCLES + ISR_E_STEPPER_CYCLES + ISR_MIXING_STEPPER_CYCLES) // Calculate the minimum MPU cycles needed per pulse to enforce, limited to the max stepper rate -#define _MIN_STEPPER_PULSE_CYCLES(N) MAX((unsigned long)((F_CPU) / (MAXIMUM_STEPPER_RATE)), ((F_CPU) / 500000UL) * (N)) +#define _MIN_STEPPER_PULSE_CYCLES(N) MAX(uint32_t((F_CPU) / (MAXIMUM_STEPPER_RATE)), ((F_CPU) / 500000UL) * (N)) #if MINIMUM_STEPPER_PULSE - #define MIN_STEPPER_PULSE_CYCLES _MIN_STEPPER_PULSE_CYCLES((unsigned long)(MINIMUM_STEPPER_PULSE)) + #define MIN_STEPPER_PULSE_CYCLES _MIN_STEPPER_PULSE_CYCLES(uint32_t(MINIMUM_STEPPER_PULSE)) +#elif HAS_DRIVER(LV8729) + #define MIN_STEPPER_PULSE_CYCLES uint32_t((((F_CPU) - 1) / 2000000) + 1) // 0.5µs, aka 500ns #else #define MIN_STEPPER_PULSE_CYCLES _MIN_STEPPER_PULSE_CYCLES(1UL) #endif @@ -167,7 +169,11 @@ // adding the "start stepper pulse" code section execution cycles to account for that not all // pulses start at the beginning of the loop, so an extra time must be added to compensate so // the last generated pulse (usually the extruder stepper) has the right length -#define MIN_PULSE_TICKS (((PULSE_TIMER_TICKS_PER_US) * (unsigned long)(MINIMUM_STEPPER_PULSE)) + ((MIN_ISR_START_LOOP_CYCLES) / (unsigned long)(PULSE_TIMER_PRESCALE))) +#if HAS_DRIVER(LV8729) + #define MIN_PULSE_TICKS ((((PULSE_TIMER_TICKS_PER_US) + 1) / 2) + ((MIN_ISR_START_LOOP_CYCLES) / uint32_t(PULSE_TIMER_PRESCALE))) +#else + #define MIN_PULSE_TICKS (((PULSE_TIMER_TICKS_PER_US) * uint32_t(MINIMUM_STEPPER_PULSE)) + ((MIN_ISR_START_LOOP_CYCLES) / uint32_t(PULSE_TIMER_PRESCALE))) +#endif // Calculate the extra ticks of the PULSE timer between step pulses #define ADDED_STEP_TICKS (((MIN_STEPPER_PULSE_CYCLES) / (PULSE_TIMER_PRESCALE)) - (MIN_PULSE_TICKS)) diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 25a45661aa..a4a94fc678 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -110,6 +110,10 @@ hotend_info_t Temperature::temp_hotend[HOTENDS]; // = { 0 } uint8_t Temperature::autofan_speed[HOTENDS]; // = { 0 } #endif +#if ENABLED(AUTO_POWER_CHAMBER_FAN) + uint8_t Temperature::chamberfan_speed; // = 0 +#endif + #if FAN_COUNT > 0 uint8_t Temperature::fan_speed[FAN_COUNT]; // = { 0 } @@ -134,9 +138,9 @@ hotend_info_t Temperature::temp_hotend[HOTENDS]; // = { 0 } #endif - #if ENABLED(PROBING_FANS_OFF) + #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) bool Temperature::fans_paused; // = false; - uint8_t Temperature::paused_fan_speed[FAN_COUNT]; // = { 0 } + uint8_t Temperature::saved_fan_speed[FAN_COUNT]; // = { 0 } #endif #if ENABLED(ADAPTIVE_FAN_SLOWING) @@ -175,19 +179,19 @@ hotend_info_t Temperature::temp_hotend[HOTENDS]; // = { 0 } #endif } - #if ENABLED(PROBING_FANS_OFF) + #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) void Temperature::set_fans_paused(const bool p) { if (p != fans_paused) { fans_paused = p; if (p) - FANS_LOOP(x) { paused_fan_speed[x] = fan_speed[x]; fan_speed[x] = 0; } + FANS_LOOP(i) { saved_fan_speed[i] = fan_speed[i]; fan_speed[i] = 0; } else - FANS_LOOP(x) fan_speed[x] = paused_fan_speed[x]; + FANS_LOOP(i) fan_speed[i] = saved_fan_speed[i]; } } - #endif // PROBING_FANS_OFF + #endif #endif // FAN_COUNT > 0 @@ -229,8 +233,8 @@ hotend_info_t Temperature::temp_hotend[HOTENDS]; // = { 0 } #endif #if WATCH_CHAMBER heater_watch_t Temperature::watch_chamber = { 0 }; - millis_t Temperature::next_chamber_check_ms; #endif + millis_t Temperature::next_chamber_check_ms; #endif // HAS_HEATED_CHAMBER #endif // HAS_TEMP_CHAMBER @@ -640,16 +644,28 @@ int16_t Temperature::getHeaterPower(const int8_t heater) { #define AUTO_CHAMBER_IS_3 (CHAMBER_AUTO_FAN_PIN == E3_AUTO_FAN_PIN) #define AUTO_CHAMBER_IS_4 (CHAMBER_AUTO_FAN_PIN == E4_AUTO_FAN_PIN) #define AUTO_CHAMBER_IS_5 (CHAMBER_AUTO_FAN_PIN == E5_AUTO_FAN_PIN) + #define AUTO_CHAMBER_IS_E (AUTO_CHAMBER_IS_0 || AUTO_CHAMBER_IS_1 || AUTO_CHAMBER_IS_2 || AUTO_CHAMBER_IS_3 || AUTO_CHAMBER_IS_4 || AUTO_CHAMBER_IS_5) + #define CHAMBER_FAN_INDEX HOTENDS void Temperature::checkExtruderAutoFans() { static const uint8_t fanBit[] PROGMEM = { - 0, - AUTO_1_IS_0 ? 0 : 1, - AUTO_2_IS_0 ? 0 : AUTO_2_IS_1 ? 1 : 2, - AUTO_3_IS_0 ? 0 : AUTO_3_IS_1 ? 1 : AUTO_3_IS_2 ? 2 : 3, - AUTO_4_IS_0 ? 0 : AUTO_4_IS_1 ? 1 : AUTO_4_IS_2 ? 2 : AUTO_4_IS_3 ? 3 : 4, - AUTO_5_IS_0 ? 0 : AUTO_5_IS_1 ? 1 : AUTO_5_IS_2 ? 2 : AUTO_5_IS_3 ? 3 : AUTO_5_IS_4 ? 4 : 5 - #if HAS_TEMP_CHAMBER + 0 + #if HOTENDS > 1 + , AUTO_1_IS_0 ? 0 : 1 + #endif + #if HOTENDS > 2 + , AUTO_2_IS_0 ? 0 : AUTO_2_IS_1 ? 1 : 2 + #endif + #if HOTENDS > 3 + , AUTO_3_IS_0 ? 0 : AUTO_3_IS_1 ? 1 : AUTO_3_IS_2 ? 2 : 3, + #endif + #if HOTENDS > 4 + , AUTO_4_IS_0 ? 0 : AUTO_4_IS_1 ? 1 : AUTO_4_IS_2 ? 2 : AUTO_4_IS_3 ? 3 : 4, + #endif + #if HOTENDS > 5 + , AUTO_5_IS_0 ? 0 : AUTO_5_IS_1 ? 1 : AUTO_5_IS_2 ? 2 : AUTO_5_IS_3 ? 3 : AUTO_5_IS_4 ? 4 : 5 + #endif + #if HAS_AUTO_CHAMBER_FAN , AUTO_CHAMBER_IS_0 ? 0 : AUTO_CHAMBER_IS_1 ? 1 : AUTO_CHAMBER_IS_2 ? 2 : AUTO_CHAMBER_IS_3 ? 3 : AUTO_CHAMBER_IS_4 ? 4 : AUTO_CHAMBER_IS_5 ? 5 : 6 #endif }; @@ -659,52 +675,60 @@ int16_t Temperature::getHeaterPower(const int8_t heater) { if (temp_hotend[e].current > EXTRUDER_AUTO_FAN_TEMPERATURE) SBI(fanState, pgm_read_byte(&fanBit[e])); - #if HAS_TEMP_CHAMBER - if (temp_chamber.current > EXTRUDER_AUTO_FAN_TEMPERATURE) - SBI(fanState, pgm_read_byte(&fanBit[6])); + #if HAS_AUTO_CHAMBER_FAN + if (temp_chamber.current > CHAMBER_AUTO_FAN_TEMPERATURE) + SBI(fanState, pgm_read_byte(&fanBit[CHAMBER_FAN_INDEX])); #endif - #define _UPDATE_AUTO_FAN(P,D,A) do{ \ - if (PWM_PIN(P##_AUTO_FAN_PIN) && EXTRUDER_AUTO_FAN_SPEED < 255) \ - analogWrite(P##_AUTO_FAN_PIN, A); \ - else \ - WRITE(P##_AUTO_FAN_PIN, D); \ + #define _UPDATE_AUTO_FAN(P,D,A) do{ \ + if (PWM_PIN(P##_AUTO_FAN_PIN) && A < 255) \ + analogWrite(P##_AUTO_FAN_PIN, D ? A : 0); \ + else \ + WRITE(P##_AUTO_FAN_PIN, D); \ }while(0) uint8_t fanDone = 0; for (uint8_t f = 0; f < COUNT(fanBit); f++) { - const uint8_t bit = pgm_read_byte(&fanBit[f]); - if (TEST(fanDone, bit)) continue; - const bool fan_on = TEST(fanState, bit); - const uint8_t speed = fan_on ? EXTRUDER_AUTO_FAN_SPEED : 0; - #if ENABLED(AUTO_POWER_E_FANS) - autofan_speed[f] = speed; - #endif + const uint8_t realFan = pgm_read_byte(&fanBit[f]); + if (TEST(fanDone, realFan)) continue; + const bool fan_on = TEST(fanState, realFan); + switch (f) { + #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E + case CHAMBER_FAN_INDEX: + chamberfan_speed = fan_on ? CHAMBER_AUTO_FAN_SPEED : 0; + break; + #endif + default: + #if ENABLED(AUTO_POWER_E_FANS) + autofan_speed[realFan] = fan_on ? EXTRUDER_AUTO_FAN_SPEED : 0; + #endif + break; + } + switch (f) { #if HAS_AUTO_FAN_0 - case 0: _UPDATE_AUTO_FAN(E0, fan_on, speed); break; + case 0: _UPDATE_AUTO_FAN(E0, fan_on, EXTRUDER_AUTO_FAN_SPEED); break; #endif #if HAS_AUTO_FAN_1 - case 1: _UPDATE_AUTO_FAN(E1, fan_on, speed); break; + case 1: _UPDATE_AUTO_FAN(E1, fan_on, EXTRUDER_AUTO_FAN_SPEED); break; #endif #if HAS_AUTO_FAN_2 - case 2: _UPDATE_AUTO_FAN(E2, fan_on, speed); break; + case 2: _UPDATE_AUTO_FAN(E2, fan_on, EXTRUDER_AUTO_FAN_SPEED); break; #endif #if HAS_AUTO_FAN_3 - case 3: _UPDATE_AUTO_FAN(E3, fan_on, speed); break; + case 3: _UPDATE_AUTO_FAN(E3, fan_on, EXTRUDER_AUTO_FAN_SPEED); break; #endif #if HAS_AUTO_FAN_4 - case 4: _UPDATE_AUTO_FAN(E4, fan_on, speed); break; + case 4: _UPDATE_AUTO_FAN(E4, fan_on, EXTRUDER_AUTO_FAN_SPEED); break; #endif #if HAS_AUTO_FAN_5 - case 5: _UPDATE_AUTO_FAN(E5, fan_on, speed); break; + case 5: _UPDATE_AUTO_FAN(E5, fan_on, EXTRUDER_AUTO_FAN_SPEED); break; #endif - #if HAS_AUTO_CHAMBER_FAN - case 6: _UPDATE_AUTO_FAN(CHAMBER, fan_on, speed); break; + #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E + case CHAMBER_FAN_INDEX: _UPDATE_AUTO_FAN(CHAMBER, fan_on, CHAMBER_AUTO_FAN_SPEED); break; #endif } - SBI(fanDone, bit); - UNUSED(fan_on); UNUSED(speed); + SBI(fanDone, realFan); } } @@ -1034,82 +1058,85 @@ void Temperature::manage_heater() { } #endif // WATCH_BED - #if DISABLED(PIDTEMPBED) - if (PENDING(ms, next_bed_check_ms) + do { + + #if DISABLED(PIDTEMPBED) + if (PENDING(ms, next_bed_check_ms) + #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING) + && paused == last_pause_state + #endif + ) break; + next_bed_check_ms = ms + BED_CHECK_INTERVAL; #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING) - && paused == last_pause_state + last_pause_state = paused; #endif - ) return; - next_bed_check_ms = ms + BED_CHECK_INTERVAL; - #if BOTH(PROBING_HEATERS_OFF, BED_LIMIT_SWITCHING) - last_pause_state = paused; #endif - #endif - #if HEATER_IDLE_HANDLER - bed_idle.update(ms); - #endif + #if HEATER_IDLE_HANDLER + bed_idle.update(ms); + #endif - #if HAS_THERMALLY_PROTECTED_BED - thermal_runaway_protection(tr_state_machine_bed, temp_bed.current, temp_bed.target, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS); - #endif + #if HAS_THERMALLY_PROTECTED_BED + thermal_runaway_protection(tr_state_machine_bed, temp_bed.current, temp_bed.target, -1, THERMAL_PROTECTION_BED_PERIOD, THERMAL_PROTECTION_BED_HYSTERESIS); + #endif - #if HEATER_IDLE_HANDLER - if (bed_idle.timed_out) { - temp_bed.soft_pwm_amount = 0; - #if DISABLED(PIDTEMPBED) - WRITE_HEATER_BED(LOW); - #endif - } - else - #endif - { - #if ENABLED(PIDTEMPBED) - temp_bed.soft_pwm_amount = WITHIN(temp_bed.current, BED_MINTEMP, BED_MAXTEMP) ? (int)get_pid_output_bed() >> 1 : 0; - #else - // Check if temperature is within the correct band - if (WITHIN(temp_bed.current, BED_MINTEMP, BED_MAXTEMP)) { - #if ENABLED(BED_LIMIT_SWITCHING) - if (temp_bed.current >= temp_bed.target + BED_HYSTERESIS) - temp_bed.soft_pwm_amount = 0; - else if (temp_bed.current <= temp_bed.target - (BED_HYSTERESIS)) - temp_bed.soft_pwm_amount = MAX_BED_POWER >> 1; - #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING - temp_bed.soft_pwm_amount = temp_bed.current < temp_bed.target ? MAX_BED_POWER >> 1 : 0; + #if HEATER_IDLE_HANDLER + if (bed_idle.timed_out) { + temp_bed.soft_pwm_amount = 0; + #if DISABLED(PIDTEMPBED) + WRITE_HEATER_BED(LOW); #endif } - else { - temp_bed.soft_pwm_amount = 0; - WRITE_HEATER_BED(LOW); - } + else #endif - } + { + #if ENABLED(PIDTEMPBED) + temp_bed.soft_pwm_amount = WITHIN(temp_bed.current, BED_MINTEMP, BED_MAXTEMP) ? (int)get_pid_output_bed() >> 1 : 0; + #else + // Check if temperature is within the correct band + if (WITHIN(temp_bed.current, BED_MINTEMP, BED_MAXTEMP)) { + #if ENABLED(BED_LIMIT_SWITCHING) + if (temp_bed.current >= temp_bed.target + BED_HYSTERESIS) + temp_bed.soft_pwm_amount = 0; + else if (temp_bed.current <= temp_bed.target - (BED_HYSTERESIS)) + temp_bed.soft_pwm_amount = MAX_BED_POWER >> 1; + #else // !PIDTEMPBED && !BED_LIMIT_SWITCHING + temp_bed.soft_pwm_amount = temp_bed.current < temp_bed.target ? MAX_BED_POWER >> 1 : 0; + #endif + } + else { + temp_bed.soft_pwm_amount = 0; + WRITE_HEATER_BED(LOW); + } + #endif + } + + } while (false); + #endif // HAS_HEATED_BED - #if HAS_TEMP_CHAMBER + #if HAS_HEATED_CHAMBER #ifndef CHAMBER_CHECK_INTERVAL #define CHAMBER_CHECK_INTERVAL 1000UL #endif - #if HAS_HEATED_CHAMBER + #if ENABLED(THERMAL_PROTECTION_CHAMBER) + if (!grace_period && degChamber() > CHAMBER_MAXTEMP) + _temp_error(-2, PSTR(MSG_T_THERMAL_RUNAWAY), TEMP_ERR_PSTR(MSG_THERMAL_RUNAWAY, -2)); + #endif - #if ENABLED(THERMAL_PROTECTION_CHAMBER) - if (!grace_period && degChamber() > CHAMBER_MAXTEMP) - _temp_error(-2, PSTR(MSG_T_THERMAL_RUNAWAY), TEMP_ERR_PSTR(MSG_THERMAL_RUNAWAY, -2)); - #endif + #if WATCH_CHAMBER + // Make sure temperature is increasing + if (watch_chamber.elapsed(ms)) { // Time to check the chamber? + if (degChamber() < watch_chamber.target) // Failed to increase enough? + _temp_error(-2, PSTR(MSG_T_HEATING_FAILED), TEMP_ERR_PSTR(MSG_HEATING_FAILED_LCD, -2)); + else + start_watching_chamber(); // Start again if the target is still far off + } + #endif - #if WATCH_CHAMBER - // Make sure temperature is increasing - if (watch_chamber.elapsed(ms)) { // Time to check the chamber? - if (degChamber() < watch_chamber.target) // Failed to increase enough? - _temp_error(-2, PSTR(MSG_T_HEATING_FAILED), TEMP_ERR_PSTR(MSG_HEATING_FAILED_LCD, -2)); - else - start_watching_chamber(); // Start again if the target is still far off - } - #endif // WATCH_CHAMBER - - if (PENDING(ms, next_chamber_check_ms)) return; + if (ELAPSED(ms, next_chamber_check_ms)) { next_chamber_check_ms = ms + CHAMBER_CHECK_INTERVAL; if (WITHIN(temp_chamber.current, CHAMBER_MINTEMP, CHAMBER_MAXTEMP)) { @@ -1130,13 +1157,12 @@ void Temperature::manage_heater() { #if ENABLED(THERMAL_PROTECTION_CHAMBER) thermal_runaway_protection(tr_state_machine_chamber, temp_chamber.current, temp_chamber.target, -2, THERMAL_PROTECTION_CHAMBER_PERIOD, THERMAL_PROTECTION_CHAMBER_HYSTERESIS); #endif + } - // TODO: Implement true PID pwm - //temp_bed.soft_pwm_amount = WITHIN(temp_chamber.current, CHAMBER_MINTEMP, CHAMBER_MAXTEMP) ? (int)get_pid_output_chamber() >> 1 : 0; + // TODO: Implement true PID pwm + //temp_bed.soft_pwm_amount = WITHIN(temp_chamber.current, CHAMBER_MINTEMP, CHAMBER_MAXTEMP) ? (int)get_pid_output_chamber() >> 1 : 0; - #endif // HAS_HEATED_CHAMBER - - #endif // HAS_TEMP_CHAMBER + #endif // HAS_HEATED_CHAMBER } #define TEMP_AD595(RAW) ((RAW) * 5.0 * 100.0 / 1024.0 / (OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET) @@ -1163,6 +1189,136 @@ void Temperature::manage_heater() { } \ }while(0) +#if HAS_USER_THERMISTORS + + user_thermistor_t Temperature::user_thermistor[USER_THERMISTORS]; // Initialized by settings.load() + + void Temperature::reset_user_thermistors() { + user_thermistor_t user_thermistor[USER_THERMISTORS] = { + #if ENABLED(HEATER_0_USER_THERMISTOR) + { true, 0, 0, HOTEND0_PULLUP_RESISTOR_OHMS, HOTEND0_RESISTANCE_25C_OHMS, 0, 0, HOTEND0_BETA, 0 }, + #endif + #if ENABLED(HEATER_1_USER_THERMISTOR) + { true, 0, 0, HOTEND1_PULLUP_RESISTOR_OHMS, HOTEND1_RESISTANCE_25C_OHMS, 0, 0, HOTEND1_BETA, 0 }, + #endif + #if ENABLED(HEATER_2_USER_THERMISTOR) + { true, 0, 0, HOTEND2_PULLUP_RESISTOR_OHMS, HOTEND2_RESISTANCE_25C_OHMS, 0, 0, HOTEND2_BETA, 0 }, + #endif + #if ENABLED(HEATER_3_USER_THERMISTOR) + { true, 0, 0, HOTEND3_PULLUP_RESISTOR_OHMS, HOTEND3_RESISTANCE_25C_OHMS, 0, 0, HOTEND3_BETA, 0 }, + #endif + #if ENABLED(HEATER_4_USER_THERMISTOR) + { true, 0, 0, HOTEND4_PULLUP_RESISTOR_OHMS, HOTEND4_RESISTANCE_25C_OHMS, 0, 0, HOTEND4_BETA, 0 }, + #endif + #if ENABLED(HEATER_5_USER_THERMISTOR) + { true, 0, 0, HOTEND5_PULLUP_RESISTOR_OHMS, HOTEND5_RESISTANCE_25C_OHMS, 0, 0, HOTEND5_BETA, 0 }, + #endif + #if ENABLED(BED_USER_THERMISTOR) + { true, 0, 0, BED_PULLUP_RESISTOR_OHMS, BED_RESISTANCE_25C_OHMS, 0, 0, BED_BETA, 0 }, + #endif + #if ENABLED(CHAMBER_USER_THERMISTOR) + { true, 0, 0, CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS, 0, 0, CHAMBER_BETA, 0 } + #endif + }; + COPY(thermalManager.user_thermistor, user_thermistor); + } + + void Temperature::log_user_thermistor(const uint8_t t_index, const bool eprom/*=false*/) { + + if (eprom) + SERIAL_ECHOPGM(" M305 "); + else + SERIAL_ECHO_START(); + SERIAL_CHAR('P'); + SERIAL_CHAR('0' + t_index); + + const user_thermistor_t &t = user_thermistor[t_index]; + + SERIAL_ECHOPAIR_F(" R", t.series_res, 1); + SERIAL_ECHOPAIR_F(" T", t.res_25, 1); + SERIAL_ECHOPAIR_F(" B", t.beta, 1); + SERIAL_ECHOPAIR_F(" C", t.sh_c_coeff, 9); + SERIAL_ECHOPGM(" ; "); + serialprintPGM( + #if ENABLED(HEATER_0_USER_THERMISTOR) + t_index == CTI_HOTEND_0 ? PSTR("HOTEND 0") : + #endif + #if ENABLED(HEATER_1_USER_THERMISTOR) + t_index == CTI_HOTEND_1 ? PSTR("HOTEND 1") : + #endif + #if ENABLED(HEATER_2_USER_THERMISTOR) + t_index == CTI_HOTEND_2 ? PSTR("HOTEND 2") : + #endif + #if ENABLED(HEATER_3_USER_THERMISTOR) + t_index == CTI_HOTEND_3 ? PSTR("HOTEND 3") : + #endif + #if ENABLED(HEATER_4_USER_THERMISTOR) + t_index == CTI_HOTEND_4 ? PSTR("HOTEND 4") : + #endif + #if ENABLED(HEATER_5_USER_THERMISTOR) + t_index == CTI_HOTEND_5 ? PSTR("HOTEND 5") : + #endif + #if ENABLED(BED_USER_THERMISTOR) + t_index == CTI_BED ? PSTR("BED") : + #endif + #if ENABLED(CHAMBER_USER_THERMISTOR) + t_index == CTI_CHAMBER ? PSTR("CHAMBER") : + #endif + nullptr + ); + SERIAL_EOL(); + } + + float Temperature::user_thermistor_to_deg_c(const uint8_t t_index, const int raw) { + //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB) + // static uint32_t clocks_total = 0; + // static uint32_t calls = 0; + // uint32_t tcnt5 = TCNT5; + //#endif + + if (!WITHIN(t_index, 0, COUNT(user_thermistor) - 1)) return 25; + + if (user_thermistor[t_index].pre_calc) { + // pre-calculate some variables + user_thermistor[t_index].pre_calc = false; + user_thermistor[t_index].res_25_recip = 1.0f / user_thermistor[t_index].res_25; + user_thermistor[t_index].res_25_log = logf(user_thermistor[t_index].res_25); + user_thermistor[t_index].beta_recip = 1.0f / user_thermistor[t_index].beta; + user_thermistor[t_index].sh_alpha = (1.0f / (THERMISTOR_RESISTANCE_NOMINAL_C - THERMISTOR_ABS_ZERO_C)) - (user_thermistor[t_index].beta_recip * user_thermistor[t_index].res_25_log) - (user_thermistor[t_index].sh_c_coeff * user_thermistor[t_index].res_25_log * user_thermistor[t_index].res_25_log * user_thermistor[t_index].res_25_log); + } + + // maximum adc value .. take into account the over sampling + const int adc_max = (THERMISTOR_ADC_RESOLUTION * OVERSAMPLENR) - 1, + adc_raw = constrain(raw, 1, adc_max - 1); // constrain to prevent divide-by-zero + + const float adc_inverse = (adc_max - adc_raw) - 0.5f, + resistance = user_thermistor[t_index].series_res * (adc_raw + 0.5f) / adc_inverse, + log_resistance = logf(resistance); + + float value = user_thermistor[t_index].sh_alpha; + value += log_resistance * user_thermistor[t_index].beta_recip; + if (user_thermistor[t_index].sh_c_coeff != 0) + value += user_thermistor[t_index].sh_c_coeff * log_resistance * log_resistance * log_resistance; + value = 1.0f / value; + + // Convert to degrees C + float deg_c = value + THERMISTOR_ABS_ZERO_C; + + // Test only + //deg_c = constrain(deg_c, 6, 100); + + //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB) + // int32_t clocks = TCNT5 - tcnt5; + // if (clocks >= 0) { + // clocks_total += clocks; + // calls++; + // } + //#endif + + return deg_c; + } +#endif + // Derived from RepRap FiveD extruder::getTemperature() // For hot end temperature measurement. float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { @@ -1181,7 +1337,9 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { switch (e) { case 0: - #if ENABLED(HEATER_0_USES_MAX6675) + #if ENABLED(HEATER_0_USER_THERMISTOR) + return user_thermistor_to_deg_c(CTI_HOTEND_0, raw); + #elif ENABLED(HEATER_0_USES_MAX6675) return raw * 0.25; #elif ENABLED(HEATER_0_USES_AD595) return TEMP_AD595(raw); @@ -1191,7 +1349,9 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { break; #endif case 1: - #if ENABLED(HEATER_1_USES_MAX6675) + #if ENABLED(HEATER_1_USER_THERMISTOR) + return user_thermistor_to_deg_c(CTI_HOTEND_1, raw); + #elif ENABLED(HEATER_1_USES_MAX6675) return raw * 0.25; #elif ENABLED(HEATER_1_USES_AD595) return TEMP_AD595(raw); @@ -1201,7 +1361,9 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { break; #endif case 2: - #if ENABLED(HEATER_2_USES_AD595) + #if ENABLED(HEATER_2_USER_THERMISTOR) + return user_thermistor_to_deg_c(CTI_HOTEND_2, raw); + #elif ENABLED(HEATER_2_USES_AD595) return TEMP_AD595(raw); #elif ENABLED(HEATER_2_USES_AD8495) return TEMP_AD8495(raw); @@ -1209,7 +1371,9 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { break; #endif case 3: - #if ENABLED(HEATER_3_USES_AD595) + #if ENABLED(HEATER_3_USER_THERMISTOR) + return user_thermistor_to_deg_c(CTI_HOTEND_3, raw); + #elif ENABLED(HEATER_3_USES_AD595) return TEMP_AD595(raw); #elif ENABLED(HEATER_3_USES_AD8495) return TEMP_AD8495(raw); @@ -1217,7 +1381,9 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { break; #endif case 4: - #if ENABLED(HEATER_4_USES_AD595) + #if ENABLED(HEATER_4_USER_THERMISTOR) + return user_thermistor_to_deg_c(CTI_HOTEND_4, raw); + #elif ENABLED(HEATER_4_USES_AD595) return TEMP_AD595(raw); #elif ENABLED(HEATER_4_USES_AD8495) return TEMP_AD8495(raw); @@ -1225,7 +1391,9 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { break; #endif case 5: - #if ENABLED(HEATER_5_USES_AD595) + #if ENABLED(HEATER_5_USER_THERMISTOR) + return user_thermistor_to_deg_c(CTI_HOTEND_5, raw); + #elif ENABLED(HEATER_5_USES_AD595) return TEMP_AD595(raw); #elif ENABLED(HEATER_5_USES_AD8495) return TEMP_AD8495(raw); @@ -1248,7 +1416,9 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { // Derived from RepRap FiveD extruder::getTemperature() // For bed temperature measurement. float Temperature::analog_to_celsius_bed(const int raw) { - #if ENABLED(HEATER_BED_USES_THERMISTOR) + #if ENABLED(BED_USER_THERMISTOR) + return user_thermistor_to_deg_c(CTI_BED, raw); + #elif ENABLED(HEATER_BED_USES_THERMISTOR) SCAN_THERMISTOR_TABLE(BEDTEMPTABLE, BEDTEMPTABLE_LEN); #elif ENABLED(HEATER_BED_USES_AD595) return TEMP_AD595(raw); @@ -1264,7 +1434,9 @@ float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { // Derived from RepRap FiveD extruder::getTemperature() // For chamber temperature measurement. float Temperature::analog_to_celsius_chamber(const int raw) { - #if ENABLED(HEATER_CHAMBER_USES_THERMISTOR) + #if ENABLED(CHAMBER_USER_THERMISTOR) + return user_thermistor_to_deg_c(CTI_CHAMBER, raw); + #elif ENABLED(HEATER_CHAMBER_USES_THERMISTOR) SCAN_THERMISTOR_TABLE(CHAMBERTEMPTABLE, CHAMBERTEMPTABLE_LEN); #elif ENABLED(HEATER_CHAMBER_USES_AD595) return TEMP_AD595(raw); @@ -1353,10 +1525,16 @@ void Temperature::updateTemperaturesFromRawValues() { #endif #define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0) #if EXTRUDER_AUTO_FAN_SPEED != 255 - #define INIT_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0) + #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0) #else - #define INIT_AUTO_FAN_PIN(P) SET_OUTPUT(P) + #define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P) #endif +#if CHAMBER_AUTO_FAN_SPEED != 255 + #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0) +#else + #define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P) +#endif + /** * Initialize the temperature manager @@ -1472,25 +1650,25 @@ void Temperature::init() { ENABLE_TEMPERATURE_INTERRUPT(); #if HAS_AUTO_FAN_0 - INIT_AUTO_FAN_PIN(E0_AUTO_FAN_PIN); + INIT_E_AUTO_FAN_PIN(E0_AUTO_FAN_PIN); #endif #if HAS_AUTO_FAN_1 && !AUTO_1_IS_0 - INIT_AUTO_FAN_PIN(E1_AUTO_FAN_PIN); + INIT_E_AUTO_FAN_PIN(E1_AUTO_FAN_PIN); #endif #if HAS_AUTO_FAN_2 && !(AUTO_2_IS_0 || AUTO_2_IS_1) - INIT_AUTO_FAN_PIN(E2_AUTO_FAN_PIN); + INIT_E_AUTO_FAN_PIN(E2_AUTO_FAN_PIN); #endif #if HAS_AUTO_FAN_3 && !(AUTO_3_IS_0 || AUTO_3_IS_1 || AUTO_3_IS_2) - INIT_AUTO_FAN_PIN(E3_AUTO_FAN_PIN); + INIT_E_AUTO_FAN_PIN(E3_AUTO_FAN_PIN); #endif #if HAS_AUTO_FAN_4 && !(AUTO_4_IS_0 || AUTO_4_IS_1 || AUTO_4_IS_2 || AUTO_4_IS_3) - INIT_AUTO_FAN_PIN(E4_AUTO_FAN_PIN); + INIT_E_AUTO_FAN_PIN(E4_AUTO_FAN_PIN); #endif #if HAS_AUTO_FAN_5 && !(AUTO_5_IS_0 || AUTO_5_IS_1 || AUTO_5_IS_2 || AUTO_5_IS_3 || AUTO_5_IS_4) - INIT_AUTO_FAN_PIN(E5_AUTO_FAN_PIN); + INIT_E_AUTO_FAN_PIN(E5_AUTO_FAN_PIN); #endif - #if HAS_AUTO_CHAMBER_FAN && !(AUTO_CHAMBER_IS_0 || AUTO_CHAMBER_IS_1 || AUTO_CHAMBER_IS_2 || AUTO_CHAMBER_IS_3 || AUTO_CHAMBER_IS_4 || AUTO_CHAMBER_IS_5) - INIT_AUTO_FAN_PIN(CHAMBER_AUTO_FAN_PIN); + #if HAS_AUTO_CHAMBER_FAN && !AUTO_CHAMBER_IS_E + INIT_CHAMBER_AUTO_FAN_PIN(CHAMBER_AUTO_FAN_PIN); #endif // Wait for temperature measurement to settle @@ -1505,7 +1683,7 @@ void Temperature::init() { }while(0) #define _TEMP_MAX_E(NR) do{ \ temp_range[NR].maxtemp = HEATER_ ##NR## _MAXTEMP; \ - while (analog_to_celsius_hotend(temp_range[NR].raw_min, NR) > HEATER_ ##NR## _MAXTEMP) \ + while (analog_to_celsius_hotend(temp_range[NR].raw_max, NR) > HEATER_ ##NR## _MAXTEMP) \ temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \ }while(0) @@ -1563,7 +1741,7 @@ void Temperature::init() { while (analog_to_celsius_bed(mintemp_raw_BED) < BED_MINTEMP) mintemp_raw_BED += TEMPDIR(BED) * (OVERSAMPLENR); #endif #ifdef BED_MAXTEMP - while (analog_to_celsius_bed(maxtemp_raw_BED) > BED_MAXTEMP) mintemp_raw_BED -= TEMPDIR(BED) * (OVERSAMPLENR); + while (analog_to_celsius_bed(maxtemp_raw_BED) > BED_MAXTEMP) maxtemp_raw_BED -= TEMPDIR(BED) * (OVERSAMPLENR); #endif #endif // HAS_HEATED_BED @@ -1572,7 +1750,7 @@ void Temperature::init() { while (analog_to_celsius_chamber(mintemp_raw_CHAMBER) < CHAMBER_MINTEMP) mintemp_raw_CHAMBER += TEMPDIR(CHAMBER) * (OVERSAMPLENR); #endif #ifdef CHAMBER_MAXTEMP - while (analog_to_celsius_chamber(maxtemp_raw_CHAMBER) > CHAMBER_MAXTEMP) mintemp_raw_CHAMBER -= TEMPDIR(CHAMBER) * (OVERSAMPLENR); + while (analog_to_celsius_chamber(maxtemp_raw_CHAMBER) > CHAMBER_MAXTEMP) maxtemp_raw_CHAMBER -= TEMPDIR(CHAMBER) * (OVERSAMPLENR); #endif #endif @@ -1616,8 +1794,8 @@ void Temperature::init() { #if WATCH_CHAMBER /** - * Start Heating Sanity Check for hotends that are below - * their target temperature by a configurable margin. + * Start Heating Sanity Check for chamber that is below + * its target temperature by a configurable margin. * This is called when the temperature is set. (M141, M191) */ void Temperature::start_watching_chamber() { @@ -2615,22 +2793,18 @@ void Temperature::isr() { ); #endif #if HAS_TEMP_CHAMBER - #if HAS_HEATED_CHAMBER - print_heater_state(degChamber(), degTargetChamber() - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , rawChamberTemp() - #endif + print_heater_state(degChamber() + #if HAS_HEATED_CHAMBER + , degTargetChamber() + #else + , 0 + #endif + #if ENABLED(SHOW_TEMP_ADC_VALUES) + , rawChamberTemp() + #endif , -2 // CHAMBER ); - #else - print_heater_state(degChamber(), 0 - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , rawChamberTemp() - #endif - , -2 // CHAMBER - ); - #endif // HAS_HEATED_CHAMBER - #endif + #endif // HAS_TEMP_CHAMBER #if HOTENDS > 1 HOTEND_LOOP() print_heater_state(degHotend(e), degTargetHotend(e) #if ENABLED(SHOW_TEMP_ADC_VALUES) @@ -2825,6 +2999,7 @@ void Temperature::isr() { ) { #if TEMP_BED_RESIDENCY_TIME > 0 millis_t residency_start_ms = 0; + bool first_loop = true; // Loop until the temperature has stabilized #define TEMP_BED_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + (TEMP_BED_RESIDENCY_TIME) * 1000UL)) #else @@ -2833,7 +3008,7 @@ void Temperature::isr() { #endif float target_temp = -1, old_temp = 9999; - bool wants_to_cool = false, first_loop = true; + bool wants_to_cool = false; wait_for_heatup = true; millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; @@ -2917,7 +3092,9 @@ void Temperature::isr() { } #endif - first_loop = false; + #if TEMP_BED_RESIDENCY_TIME > 0 + first_loop = false; + #endif } while (wait_for_heatup && TEMP_BED_CONDITIONS); @@ -2932,4 +3109,106 @@ void Temperature::isr() { #endif // HAS_HEATED_BED + #if 0 && HAS_HEATED_CHAMBER + + #ifndef MIN_COOLING_SLOPE_DEG_CHAMBER + #define MIN_COOLING_SLOPE_DEG_CHAMBER 1.50 + #endif + #ifndef MIN_COOLING_SLOPE_TIME_CHAMBER + #define MIN_COOLING_SLOPE_TIME_CHAMBER 60 + #endif + + bool Temperature::wait_for_chamber(const bool no_wait_for_cooling/*=true*/) { + #if TEMP_CHAMBER_RESIDENCY_TIME > 0 + millis_t residency_start_ms = 0; + // Loop until the temperature has stabilized + #define TEMP_CHAMBER_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + (TEMP_CHAMBER_RESIDENCY_TIME) * 1000UL)) + #else + // Loop until the temperature is very close target + #define TEMP_CHAMBER_CONDITIONS (wants_to_cool ? isCoolingChamber() : isHeatingChamber()) + #endif + + float target_temp = -1, old_temp = 9999; + bool wants_to_cool = false, first_loop = true; + wait_for_heatup = true; + millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; + + #if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE) + const GcodeSuite::MarlinBusyState old_busy_state = gcode.busy_state; + KEEPALIVE_STATE(NOT_BUSY); + #endif + + do { + // Target temperature might be changed during the loop + if (target_temp != degTargetChamber()) { + wants_to_cool = isCoolingChamber(); + target_temp = degTargetChamber(); + + // Exit if S, continue if S, R, or R + if (no_wait_for_cooling && wants_to_cool) break; + } + + now = millis(); + if (ELAPSED(now, next_temp_ms)) { //Print Temp Reading every 1 second while heating up. + next_temp_ms = now + 1000UL; + print_heater_states(active_extruder); + #if TEMP_CHAMBER_RESIDENCY_TIME > 0 + SERIAL_ECHOPGM(" W:"); + if (residency_start_ms) + SERIAL_ECHO(long((((TEMP_CHAMBER_RESIDENCY_TIME) * 1000UL) - (now - residency_start_ms)) / 1000UL)); + else + SERIAL_CHAR('?'); + #endif + SERIAL_EOL(); + } + + idle(); + gcode.reset_stepper_timeout(); // Keep steppers powered + + const float temp = degChamber(); + + #if TEMP_CHAMBER_RESIDENCY_TIME > 0 + + const float temp_diff = ABS(target_temp - temp); + + if (!residency_start_ms) { + // Start the TEMP_CHAMBER_RESIDENCY_TIME timer when we reach target temp for the first time. + if (temp_diff < TEMP_CHAMBER_WINDOW) { + residency_start_ms = now; + if (first_loop) residency_start_ms += (TEMP_CHAMBER_RESIDENCY_TIME) * 1000UL; + } + } + else if (temp_diff > TEMP_CHAMBER_HYSTERESIS) { + // Restart the timer whenever the temperature falls outside the hysteresis. + residency_start_ms = now; + } + + #endif // TEMP_CHAMBER_RESIDENCY_TIME > 0 + + // Prevent a wait-forever situation if R is misused i.e. M191 R0 + if (wants_to_cool) { + // Break after MIN_COOLING_SLOPE_TIME_CHAMBER seconds + // if the temperature did not drop at least MIN_COOLING_SLOPE_DEG_CHAMBER + if (!next_cool_check_ms || ELAPSED(now, next_cool_check_ms)) { + if (old_temp - temp < float(MIN_COOLING_SLOPE_DEG_CHAMBER)) break; + next_cool_check_ms = now + 1000UL * MIN_COOLING_SLOPE_TIME_CHAMBER; + old_temp = temp; + } + } + + first_loop = false; + + } while (wait_for_heatup && TEMP_CHAMBER_CONDITIONS); + + if (wait_for_heatup) ui.reset_status(); + + #if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE) + gcode.busy_state = old_busy_state; + #endif + + return wait_for_heatup; + } + + #endif // HAS_HEATED_CHAMBER + #endif // HAS_TEMP_SENSOR diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index b24f84fb58..fa5013bc56 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -26,6 +26,7 @@ */ #include "thermistor/thermistors.h" + #include "../inc/MarlinConfig.h" #if ENABLED(AUTO_POWER_CONTROL) @@ -147,34 +148,6 @@ enum ADCSensorState : char { #define G26_CLICK_CAN_CANCEL (HAS_LCD_MENU && ENABLED(G26_MESH_VALIDATION)) -enum TempIndex : uint8_t { - #if HOTENDS > 0 - TEMP_E0, - #if HOTENDS > 1 - TEMP_E1, - #if HOTENDS > 2 - TEMP_E2, - #if HOTENDS > 3 - TEMP_E3, - #if HOTENDS > 4 - TEMP_E4, - #if HOTENDS > 5 - TEMP_E5, - #endif - #endif - #endif - #endif - #endif - #endif - #if HAS_HEATED_BED - TEMP_BED, - #endif - #if HAS_HEATED_CHAMBER - TEMP_CHAMBER, - #endif - tempCOUNT -}; - // A temperature sensor typedef struct TempInfo { uint16_t acc; @@ -235,6 +208,53 @@ typedef struct { int16_t raw_min, raw_max; } raw_range_t; typedef struct { int16_t mintemp, maxtemp; } celsius_range_t; typedef struct { int16_t raw_min, raw_max, mintemp, maxtemp; } temp_range_t; +#define THERMISTOR_ADC_RESOLUTION 1024 // 10-bit ADC .. shame to waste 12-bits of resolution on 32-bit +#define THERMISTOR_ABS_ZERO_C -273.15f // bbbbrrrrr cold ! +#define THERMISTOR_RESISTANCE_NOMINAL_C 25.0f // mmmmm comfortable + +#if HAS_USER_THERMISTORS + + enum CustomThermistorIndex : uint8_t { + #if ENABLED(HEATER_0_USER_THERMISTOR) + CTI_HOTEND_0, + #endif + #if ENABLED(HEATER_1_USER_THERMISTOR) + CTI_HOTEND_1, + #endif + #if ENABLED(HEATER_2_USER_THERMISTOR) + CTI_HOTEND_2, + #endif + #if ENABLED(HEATER_3_USER_THERMISTOR) + CTI_HOTEND_3, + #endif + #if ENABLED(HEATER_4_USER_THERMISTOR) + CTI_HOTEND_4, + #endif + #if ENABLED(HEATER_5_USER_THERMISTOR) + CTI_HOTEND_5, + #endif + #if ENABLED(BED_USER_THERMISTOR) + CTI_BED, + #endif + #if ENABLED(CHAMBER_USER_THERMISTOR) + CTI_CHAMBER, + #endif + USER_THERMISTORS + }; + + // User-defined thermistor + typedef struct { + bool pre_calc; // true if pre-calculations update needed + float sh_c_coeff, // Steinhart-Hart C coefficient .. defaults to '0.0' + sh_alpha, + series_res, + res_25, res_25_recip, + res_25_log, + beta, beta_recip; + } user_thermistor_t; + +#endif + class Temperature { public: @@ -255,6 +275,10 @@ class Temperature { static uint8_t autofan_speed[HOTENDS]; #endif + #if ENABLED(AUTO_POWER_CHAMBER_FAN) + static uint8_t chamberfan_speed; + #endif + #if ENABLED(FAN_SOFT_PWM) static uint8_t soft_pwm_amount_fan[FAN_COUNT], soft_pwm_count_fan[FAN_COUNT]; @@ -387,6 +411,38 @@ class Temperature { /** * Static (class) methods */ + + #if HAS_USER_THERMISTORS + static user_thermistor_t user_thermistor[USER_THERMISTORS]; + static void log_user_thermistor(const uint8_t t_index, const bool eprom=false); + static void reset_user_thermistors(); + static float user_thermistor_to_deg_c(const uint8_t t_index, const int raw); + static bool set_pull_up_res(int8_t t_index, float value) { + //if (!WITHIN(t_index, 0, USER_THERMISTORS - 1)) return false; + if (!WITHIN(value, 1, 1000000)) return false; + user_thermistor[t_index].series_res = value; + return true; + } + static bool set_res25(int8_t t_index, float value) { + if (!WITHIN(value, 1, 10000000)) return false; + user_thermistor[t_index].res_25 = value; + user_thermistor[t_index].pre_calc = true; + return true; + } + static bool set_beta(int8_t t_index, float value) { + if (!WITHIN(value, 1, 1000000)) return false; + user_thermistor[t_index].beta = value; + user_thermistor[t_index].pre_calc = true; + return true; + } + static bool set_sh_coeff(int8_t t_index, float value) { + if (!WITHIN(value, -0.01f, 0.01f)) return false; + user_thermistor[t_index].sh_c_coeff = value; + user_thermistor[t_index].pre_calc = true; + return true; + } + #endif + static float analog_to_celsius_hotend(const int raw, const uint8_t e); #if HAS_HEATED_BED @@ -403,9 +459,9 @@ class Temperature { static void set_fan_speed(const uint8_t target, const uint16_t speed); - #if ENABLED(PROBING_FANS_OFF) + #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) static bool fans_paused; - static uint8_t paused_fan_speed[FAN_COUNT]; + static uint8_t saved_fan_speed[FAN_COUNT]; #endif static constexpr inline uint8_t fanPercent(const uint8_t speed) { return ui8_to_percent(speed); } @@ -449,7 +505,7 @@ class Temperature { #endif // HAS_LCD_MENU - #if ENABLED(PROBING_FANS_OFF) + #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) void set_fans_paused(const bool p); #endif @@ -555,20 +611,18 @@ class Temperature { static inline void start_watching_chamber() {} #endif - #if HAS_TEMP_CHAMBER + #if HAS_HEATED_CHAMBER static void setTargetChamber(const int16_t celsius) { - #if HAS_HEATED_CHAMBER - temp_chamber.target = - #ifdef CHAMBER_MAXTEMP - MIN(celsius, CHAMBER_MAXTEMP) - #else - celsius - #endif - ; - start_watching_chamber(); - #endif // HAS_HEATED_CHAMBER + temp_chamber.target = + #ifdef CHAMBER_MAXTEMP + MIN(celsius, CHAMBER_MAXTEMP) + #else + celsius + #endif + ; + start_watching_chamber(); } - #endif // HAS_TEMP_CHAMBER + #endif // HAS_HEATED_CHAMBER FORCE_INLINE static bool isHeatingHotend(const uint8_t e) { E_UNUSED(); @@ -628,13 +682,15 @@ class Temperature { #if HAS_TEMP_CHAMBER #if ENABLED(SHOW_TEMP_ADC_VALUES) - FORCE_INLINE static int16_t rawChamberTemp() { return temp_chamber.raw; } + FORCE_INLINE static int16_t rawChamberTemp() { return temp_chamber.raw; } #endif - FORCE_INLINE static float degChamber() { return temp_chamber.current; } + FORCE_INLINE static float degChamber() { return temp_chamber.current; } #if HAS_HEATED_CHAMBER + FORCE_INLINE static int16_t degTargetChamber() { return temp_chamber.target; } FORCE_INLINE static bool isHeatingChamber() { return temp_chamber.target > temp_chamber.current; } FORCE_INLINE static bool isCoolingChamber() { return temp_chamber.target < temp_chamber.current; } - FORCE_INLINE static int16_t degTargetChamber() {return temp_chamber.target; } + + static bool wait_for_chamber(const bool no_wait_for_cooling=true); #endif #endif // HAS_TEMP_CHAMBER @@ -755,9 +811,6 @@ class Temperature { static void _temp_error(const int8_t e, PGM_P const serial_msg, PGM_P const lcd_msg); static void min_temp_error(const int8_t e); static void max_temp_error(const int8_t e); - #if HAS_TEMP_CHAMBER - static void chamber_temp_error(const bool max); - #endif #if ENABLED(THERMAL_PROTECTION_HOTENDS) || HAS_THERMALLY_PROTECTED_BED || ENABLED(THERMAL_PROTECTION_CHAMBER) diff --git a/Marlin/src/module/thermistor/thermistor_20.h b/Marlin/src/module/thermistor/thermistor_20.h index 46d89b84d2..7619bfc78f 100644 --- a/Marlin/src/module/thermistor/thermistor_20.h +++ b/Marlin/src/module/thermistor/thermistor_20.h @@ -22,28 +22,28 @@ // PT100 with INA826 amp on Ultimaker v2.0 electronics // The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature. -// This does not match the normal thermistor behaviour so we need to set the following defines -#if THERMISTORHEATER_0 == 20 +// This does not match the normal thermistor behavior so we need to set the following defines +#if THERMISTOR_HEATER_0 == 20 #define HEATER_0_RAW_HI_TEMP 16383 #define HEATER_0_RAW_LO_TEMP 0 #endif -#if THERMISTORHEATER_1 == 20 +#if THERMISTOR_HEATER_1 == 20 #define HEATER_1_RAW_HI_TEMP 16383 #define HEATER_1_RAW_LO_TEMP 0 #endif -#if THERMISTORHEATER_2 == 20 +#if THERMISTOR_HEATER_2 == 20 #define HEATER_2_RAW_HI_TEMP 16383 #define HEATER_2_RAW_LO_TEMP 0 #endif -#if THERMISTORHEATER_3 == 20 +#if THERMISTOR_HEATER_3 == 20 #define HEATER_3_RAW_HI_TEMP 16383 #define HEATER_3_RAW_LO_TEMP 0 #endif -#if THERMISTORHEATER_4 == 20 +#if THERMISTOR_HEATER_4 == 20 #define HEATER_4_RAW_HI_TEMP 16383 #define HEATER_4_RAW_LO_TEMP 0 #endif -#if THERMISTORHEATER_5 == 20 +#if THERMISTOR_HEATER_5 == 20 #define HEATER_5_RAW_HI_TEMP 16383 #define HEATER_5_RAW_LO_TEMP 0 #endif diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h index ab82f2603d..9d62f28bc2 100644 --- a/Marlin/src/module/thermistor/thermistors.h +++ b/Marlin/src/module/thermistor/thermistors.h @@ -26,7 +26,7 @@ #define OVERSAMPLENR 16 #define OV(N) int16_t((N) * (OVERSAMPLENR)) -#define ANY_THERMISTOR_IS(n) (THERMISTORHEATER_0 == n || THERMISTORHEATER_1 == n || THERMISTORHEATER_2 == n || THERMISTORHEATER_3 == n || THERMISTORHEATER_4 == n || THERMISTORHEATER_5 == n || THERMISTORBED == n || THERMISTORCHAMBER == n) +#define ANY_THERMISTOR_IS(n) (THERMISTOR_HEATER_0 == n || THERMISTOR_HEATER_1 == n || THERMISTOR_HEATER_2 == n || THERMISTOR_HEATER_3 == n || THERMISTOR_HEATER_4 == n || THERMISTOR_HEATER_5 == n || THERMISTORBED == n || THERMISTORCHAMBER == n) // Pt1000 and Pt100 handling // @@ -141,63 +141,63 @@ #define _TT_NAME(_N) temptable_ ## _N #define TT_NAME(_N) _TT_NAME(_N) -#if THERMISTORHEATER_0 - #define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0) +#if THERMISTOR_HEATER_0 + #define HEATER_0_TEMPTABLE TT_NAME(THERMISTOR_HEATER_0) #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE) #elif defined(HEATER_0_USES_THERMISTOR) #error "No heater 0 thermistor table specified" #else - #define HEATER_0_TEMPTABLE NULL + #define HEATER_0_TEMPTABLE nullptr #define HEATER_0_TEMPTABLE_LEN 0 #endif -#if THERMISTORHEATER_1 - #define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1) +#if THERMISTOR_HEATER_1 + #define HEATER_1_TEMPTABLE TT_NAME(THERMISTOR_HEATER_1) #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE) #elif defined(HEATER_1_USES_THERMISTOR) #error "No heater 1 thermistor table specified" #else - #define HEATER_1_TEMPTABLE NULL + #define HEATER_1_TEMPTABLE nullptr #define HEATER_1_TEMPTABLE_LEN 0 #endif -#if THERMISTORHEATER_2 - #define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2) +#if THERMISTOR_HEATER_2 + #define HEATER_2_TEMPTABLE TT_NAME(THERMISTOR_HEATER_2) #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE) #elif defined(HEATER_2_USES_THERMISTOR) #error "No heater 2 thermistor table specified" #else - #define HEATER_2_TEMPTABLE NULL + #define HEATER_2_TEMPTABLE nullptr #define HEATER_2_TEMPTABLE_LEN 0 #endif -#if THERMISTORHEATER_3 - #define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3) +#if THERMISTOR_HEATER_3 + #define HEATER_3_TEMPTABLE TT_NAME(THERMISTOR_HEATER_3) #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE) #elif defined(HEATER_3_USES_THERMISTOR) #error "No heater 3 thermistor table specified" #else - #define HEATER_3_TEMPTABLE NULL + #define HEATER_3_TEMPTABLE nullptr #define HEATER_3_TEMPTABLE_LEN 0 #endif -#if THERMISTORHEATER_4 - #define HEATER_4_TEMPTABLE TT_NAME(THERMISTORHEATER_4) +#if THERMISTOR_HEATER_4 + #define HEATER_4_TEMPTABLE TT_NAME(THERMISTOR_HEATER_4) #define HEATER_4_TEMPTABLE_LEN COUNT(HEATER_4_TEMPTABLE) #elif defined(HEATER_4_USES_THERMISTOR) #error "No heater 4 thermistor table specified" #else - #define HEATER_4_TEMPTABLE NULL + #define HEATER_4_TEMPTABLE nullptr #define HEATER_4_TEMPTABLE_LEN 0 #endif -#if THERMISTORHEATER_5 - #define HEATER_5_TEMPTABLE TT_NAME(THERMISTORHEATER_5) +#if THERMISTOR_HEATER_5 + #define HEATER_5_TEMPTABLE TT_NAME(THERMISTOR_HEATER_5) #define HEATER_5_TEMPTABLE_LEN COUNT(HEATER_5_TEMPTABLE) #elif defined(HEATER_5_USES_THERMISTOR) #error "No heater 5 thermistor table specified" #else - #define HEATER_5_TEMPTABLE NULL + #define HEATER_5_TEMPTABLE nullptr #define HEATER_5_TEMPTABLE_LEN 0 #endif diff --git a/Marlin/src/pins/pins_AZSMZ_MINI.h b/Marlin/src/pins/pins_AZSMZ_MINI.h index 6b0d8cc686..c254f2e984 100644 --- a/Marlin/src/pins/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/pins_AZSMZ_MINI.h @@ -85,6 +85,9 @@ #endif #define FAN1_PIN P0_26 +#define LCD_SDSS P0_16 // LCD SD chip select +#define ONBOARD_SD_CS P0_06 // On board SD chip select + #if ENABLED(AZSMZ_12864) #define BEEPER_PIN P1_30 #define DOGLCD_A0 P2_06 @@ -92,8 +95,28 @@ #define BTN_EN1 P4_28 #define BTN_EN2 P1_27 #define BTN_ENC P3_26 - #define LCD_SDSS P0_16 + #if DISABLED(LPC_SD_ONBOARD) + #define LPC_SD_LCD + #endif +#endif + +#if ENABLED(LPC_SD_LCD) + #define SCK_PIN P0_15 + #define MISO_PIN P0_17 + #define MOSI_PIN P0_18 + #define SS_PIN LCD_SDSS #define SD_DETECT_PIN P3_25 +#elif ENABLED(LPC_SD_ONBOARD) + #if ENABLED(USB_SD_ONBOARD) + // When sharing the SD card with a PC we want the menu options to + // mount/unmount the card and refresh it. So we disable card detect. + #define SHARED_SD_CARD + #undef SD_DETECT_PIN + #endif + #define SCK_PIN P0_07 + #define MISO_PIN P0_08 + #define MOSI_PIN P0_09 + #define SS_PIN ONBOARD_SD_CS #endif // diff --git a/Marlin/src/pins/pins_BIGTREE_SKR_V1.3.h b/Marlin/src/pins/pins_BIGTREE_SKR_V1.3.h index 319c56f31f..730610214d 100644 --- a/Marlin/src/pins/pins_BIGTREE_SKR_V1.3.h +++ b/Marlin/src/pins/pins_BIGTREE_SKR_V1.3.h @@ -28,6 +28,9 @@ #define BOARD_NAME "BIGTREE SKR V1.3" #endif +// Ignore temp readings during develpment. +//#define BOGUS_TEMPERATURE_FAILSAFE_OVERRIDE + // // Servos // @@ -177,44 +180,45 @@ | EXP2 EXP1 */ #if ENABLED(ULTRA_LCD) - #define BEEPER_PIN P1_30 // (37) not 5V tolerant - #define BTN_ENC P0_28 // (58) open-drain + #define BEEPER_PIN P1_30 // (37) not 5V tolerant + #define BTN_ENC P0_28 // (58) open-drain #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS P1_22 + #define LCD_PINS_RS P1_22 - #define BTN_EN1 P1_18 - #define BTN_EN2 P1_20 + #define BTN_EN1 P1_18 + #define BTN_EN2 P1_20 #define LCD_PINS_ENABLE P1_23 - #define LCD_PINS_D4 P1_21 + #define LCD_PINS_D4 P1_21 #else - #define LCD_PINS_RS P1_19 + #define LCD_PINS_RS P1_19 - #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4 - #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4 + #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4 + #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4 #define LCD_PINS_ENABLE P1_18 - #define LCD_PINS_D4 P1_20 + #define LCD_PINS_D4 P1_20 - #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4 - #define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant) + #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4 + #define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant) #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS P1_18 - #define DOGLCD_A0 P1_19 + #define DOGLCD_CS P1_18 + #define DOGLCD_A0 P1_19 + #define DOGLCD_SCK P0_15 + #define DOGLCD_MOSI P0_18 + #define FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN P1_20 // Must be high or open for LCD to operate normally. - // Seems to work best if left open. + #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define FYSETC_MINI_12864_REV_1_2 - //#define FYSETC_MINI_12864_REV_2_0 - //#define FYSETC_MINI_12864_REV_2_1 - #if EITHER(FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0) - #define RGB_LED + #define LCD_RESET_PIN P1_20 // Must be high or open for LCD to operate normally. + + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN P1_21 #endif @@ -224,33 +228,21 @@ #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN P1_23 #endif - #elif defined(FYSETC_MINI_12864_REV_2_1) - #define NEOPIXEL_LED - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN P1_21 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. - #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) - #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup - #else - #error "Either FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0 or FYSETC_MINI_12864_REV_2_1 must be defined" - #endif - - #if !defined(LED_USER_PRESET_STARTUP) && EITHER(FYSETC_MINI_12864_REV_2_0, FYSETC_MINI_12864_REV_2_1) - #error "LED_USER_PRESET_STARTUP must be enabled when using FYSETC_MINI_12864 REV 2.0 and later" + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN P1_21 #endif #else // !FYSETC_MINI_12864 #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS P1_21 - #define DOGLCD_A0 P1_22 + #define DOGLCD_CS P1_21 + #define DOGLCD_A0 P1_22 #endif #if ENABLED(ULTIPANEL) - #define LCD_PINS_D5 P1_21 - #define LCD_PINS_D6 P1_22 - #define LCD_PINS_D7 P1_23 + #define LCD_PINS_D5 P1_21 + #define LCD_PINS_D6 P1_22 + #define LCD_PINS_D7 P1_23 #endif #endif // !FYSETC_MINI_12864 diff --git a/Marlin/src/pins/pins_COHESION3D_REMIX.h b/Marlin/src/pins/pins_COHESION3D_REMIX.h index 00b6714cea..29979792ef 100644 --- a/Marlin/src/pins/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/pins_COHESION3D_REMIX.h @@ -139,11 +139,11 @@ // #if ENABLED(SPINDLE_LASER_ENABLE) #undef HEATER_0_PIN - #define SPINDLE_LASER_ENA_PIN P2_07 // FET 1 #undef HEATER_BED_PIN - #define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET #undef FAN_PIN - #define SPINDLE_DIR_PIN P2_06 // FET 4 + #define SPINDLE_LASER_ENA_PIN P2_07 // FET 1 + #define SPINDLE_LASER_PWM_PIN P2_05 // Bed FET + #define SPINDLE_DIR_PIN P2_06 // FET 4 #endif // @@ -153,41 +153,134 @@ // defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. // // A remote SD card is currently not supported because the pins routed to the EXP2 -// connector are shared with the onboard SD card, and Marlin does not support reading -// G-code files from the onboard SD card. +// connector are shared with the onboard SD card, and Marlin does not support that +// hardware configuration. // -#if ENABLED(ULTRA_LCD) - #define BEEPER_PIN P1_31 // EXP1-1 - #define SD_DETECT_PIN P0_27 // EXP2-7 +#if ENABLED(FYSETC_MINI_12864) - #define BTN_EN1 P3_26 // EXP2-5 - #define BTN_EN2 P3_25 // EXP2-3 - #define BTN_ENC P1_30 // EXP1-2 + #define FORCE_SOFT_SPI // REQUIRED - results in LCD soft SPI mode 3 - #define LCD_PINS_RS P0_16 // EXP1-4 - #define LCD_SDSS P0_28 // EXP2-4 - #define LCD_PINS_ENABLE P0_18 // EXP1-3 - #define LCD_PINS_D4 P0_15 // EXP1-5 + #define BEEPER_PIN P1_31 // EXP1-1 + #define BTN_ENC P1_30 // EXP1-2 + #define DOGLCD_CS P0_18 // EXP1-3 + #define DOGLCD_A0 P0_16 // EXP1-4 + #define LCD_RESET_PIN P0_15 // EXP1-5 - #define KILL_PIN P2_11 // EXP2-10 + // A custom cable is REQUIRED for EXP2 cable because the SCK & MOSI on the card's EXP2 are dedicated + // to the onboard SD card. All required EXP2 signals come from the Ethernet connector. Pin 1 of this + // connector is the one nearest the motor power connector. + #define DOGLCD_SCK P1_17 // EXP2-2 => Ethernet pin 5 (bottom, 3 from left) + #define BTN_EN2 P1_09 // EXP2-3 => Ethernet pin 9 (bottom, 5 from left) + #define BTN_EN1 P1_04 // EXP2-5 => Ethernet pin 11 (bottom, 6 from left) + #define DOGLCD_MOSI P1_01 // EXP2-6 => Ethernet pin 13 (bottom, 7 from left) - #if ENABLED(SDSUPPORT) - #error "SDSUPPORT is not currently supported by the Cohesion3D boards" + // A custom EXP1 cable is required colored LEDs. Pins 1-5, 9, 10 of the cable go to pins 1-5, 9, 10 + // on the board's EXP1 connector. Pins 6, 7, and 8 of the EXP1 cable go to the Ethernet connector. + // Rev 1.2 displays do NOT require the RGB LEDs. 2.0 and 2.1 displays do require RGB. + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN P1_10 // EXP1-7 => Ethernet pin 10 (top row, 5 from left) + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN P1_00 // EXP1-8 => Ethernet pin 12 (top row, 6 from left) + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN P1_16 // EXP1-6 => Ethernet pin 6 (top row, 3 from left) #endif +#elif ENABLED(ULTRA_LCD) + + #define BEEPER_PIN P1_31 // EXP1-1 + //#define SD_DETECT_PIN P0_27 // EXP2-7 + + #define BTN_EN1 P3_26 // EXP2-5 + #define BTN_EN2 P3_25 // EXP2-3 + #define BTN_ENC P1_30 // EXP1-2 + + #define LCD_PINS_RS P0_16 // EXP1-4 + #define LCD_SDSS P0_28 // EXP2-4 + #define LCD_PINS_ENABLE P0_18 // EXP1-3 + #define LCD_PINS_D4 P0_15 // EXP1-5 + + #define KILL_PIN P2_11 // EXP2-10 + #endif // ULTRA_LCD +// +// SD Support +// +#if NONE(LPC_SD_LCD, LPC_SD_ONBOARD, LPC_SD_CUSTOM_CABLE) + #undef USB_SD_DISABLED + #define USB_SD_ONBOARD + #define LPC_SD_ONBOARD +#endif + +#if ENABLED(LPC_SD_LCD) + + #define SCK_PIN P0_07 // (52) system defined J3-9 & AUX-3 + #define MISO_PIN P0_08 // (50) system defined J3-10 & AUX-3 + #define MOSI_PIN P0_09 // (51) system defined J3-10 & AUX-3 + #define SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin + #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card + +#elif ENABLED(LPC_SD_ONBOARD) + + #if ENABLED(USB_SD_ONBOARD) + // When sharing the SD card with a PC the LCD menu options are + // needed to mount/unmount and refresh SD. So disable SD detect. + #define SHARED_SD_CARD + #undef SD_DETECT_PIN // No SD detect pin for the onboard card + #endif + + #define SCK_PIN P0_07 + #define MISO_PIN P0_08 + #define MOSI_PIN P0_09 + #define SS_PIN P0_06 // Chip select for SD card used by Marlin + #define ONBOARD_SD_CS P0_06 // Chip select for "System" SD card + +#endif + // // Ethernet pins // -#define ENET_MDIO P1_17 -#define ENET_RX_ER P1_14 -#define ENET_RXD1 P1_10 -#define ENET_MOC P1_16 -#define REF_CLK P1_15 -#define ENET_RXD0 P1_09 -#define ENET_CRS P1_08 -#define ENET_TX_EN P1_04 -#define ENET_TXD0 P1_00 -#define ENET_TXD1 P1_01 +//#define ENET_MDIO P1_17 // Ethernet pin 5 (bottom, 3 from left) +//#define ENET_RX_ER P1_14 +//#define ENET_RXD1 P1_10 // Ethernet pin 10 (top row, 5 from left) +//#define ENET_MOC P1_16 // Ethernet pin 6 (top row, 3 from left) +//#define REF_CLK P1_15 +//#define ENET_RXD0 P1_09 // Ethernet pin 9 (bottom, 5 from left) +//#define ENET_CRS P1_08 // Ethernet pin 8 (top row, 4 from left) - INPUT ONLY +//#define ENET_TX_EN P1_04 // Ethernet pin 11 (bottom, 6 from left) +//#define ENET_TXD0 P1_00 // Ethernet pin 12 (top row, 6 from left) +//#define ENET_TXD1 P1_01 // Ethernet pin 13 (bottom, 7 from left) + +/** + * EXP1 pins + * 1 - P1_31 + * 2 - P1_30 + * 3 - P0_18 + * 4 - P0_16 + * 5 - P0_15 + * 6 - N/C + * 7 - N/C + * 8 - P0_27 (also on EXP2-7) + * 9 - GND + * 10 - +5V + * + * + * EXP2 pins + * 1 - P0_08 + * 2 - P0_07 + * 3 - P3_26 + * 4 - P0_28 + * 5 - P3_25 + * 6 - P0_09 + * 7 - P0_27 (also on EXP1_8) + * 8 - P2_11 + * 9 - GND + * 10 - N/C + */ diff --git a/Marlin/src/pins/pins_FYSETC_F6_13.h b/Marlin/src/pins/pins_FYSETC_F6_13.h index d40abd1024..800abbc892 100644 --- a/Marlin/src/pins/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/pins_FYSETC_F6_13.h @@ -197,10 +197,7 @@ #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. // Seems to work best if left open. - #define FYSETC_MINI_12864_REV_1_2 - //#define FYSETC_MINI_12864_REV_2_0 - //#define FYSETC_MINI_12864_REV_2_1 - #if EITHER(FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0) + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN 25 #endif @@ -210,20 +207,8 @@ #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN 29 #endif - #elif defined(FYSETC_MINI_12864_REV_2_1) - #define NEOPIXEL_LED - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 25 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. - #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) - #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup - #else - #error "Either FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0 or FYSETC_MINI_12864_REV_2_1 must be defined" - #endif - - #if !defined(LED_USER_PRESET_STARTUP) && EITHER(FYSETC_MINI_12864_REV_2_0, FYSETC_MINI_12864_REV_2_1) - #error "LED_USER_PRESET_STARTUP must be enabled when using FYSETC_MINI_12864 REV 2.0 and later" + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN 25 #endif #elif HAS_GRAPHICAL_LCD diff --git a/Marlin/src/pins/pins_MALYAN_M200.h b/Marlin/src/pins/pins_MALYAN_M200.h index fc61cdfdde..b35e779661 100644 --- a/Marlin/src/pins/pins_MALYAN_M200.h +++ b/Marlin/src/pins/pins_MALYAN_M200.h @@ -24,7 +24,7 @@ * MALYAN M200 pin assignments */ -#ifndef __STM32F1__ +#if !defined(__STM32F1__) && !defined(STM32F1xx) && !defined(STM32F0xx) #error "Oops! You must be compiling for STM32." #endif @@ -37,6 +37,13 @@ #define SDSS SS_PIN +// Based on PWM timer usage, we have to use these timers and soft PWM for the fans +// On STM32F103: +// PB3, PB6, PB7, and PB8 can be used with pwm, which rules out TIM2 and TIM4. +// On STM32F070, 16 and 17 are in use, but 1 and 3 are available. +#define STEP_TIMER 1 +#define TEMP_TIMER 3 + // // Limit Switches // diff --git a/Marlin/src/pins/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/pins_MIGHTYBOARD_REVE.h index d9def846c2..5a4fa42354 100644 --- a/Marlin/src/pins/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/pins_MIGHTYBOARD_REVE.h @@ -271,7 +271,7 @@ // Check if all pins are defined in mega/pins_arduino.h -#include +//#include static_assert(NUM_DIGITAL_PINS > MAX_PIN, "add missing pins to [arduino dir]/hardware/arduino/avr/variants/mega/pins_arduino.h based on fastio.h" "to digital_pin_to_port_PGM, digital_pin_to_bit_mask_PGM, digital_pin_to_timer_PGM, NUM_DIGITAL_PINS, see below"); diff --git a/Marlin/src/pins/pins_MKS_SBASE.h b/Marlin/src/pins/pins_MKS_SBASE.h index a97bcd164d..dd333745c2 100644 --- a/Marlin/src/pins/pins_MKS_SBASE.h +++ b/Marlin/src/pins/pins_MKS_SBASE.h @@ -259,13 +259,21 @@ #define DOGLCD_SCK P2_11 // J8-5 (SCK on Fysetc schematic) #define DOGLCD_MOSI P4_28 // J8-6 (MOSI on Fysetc schematic) - #define RGB_LED - //#define RGBW_LED - #if EITHER(RGB_LED, RGBW_LED) - #define RGB_LED_R_PIN P2_12 // J8-4 (LCD_D6 on Fysetc schematic) - #define RGB_LED_G_PIN P1_23 // J8-3 (LCD_D5 on Fysetc schematic) - #define RGB_LED_B_PIN P1_22 // J8-2 (LCD_D7 on Fysetc schematic) - //#define RGB_LED_W_PIN -1 + //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 + + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN P2_12 // J8-4 (LCD_D6 on Fysetc schematic) + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN P1_23 // J8-3 (LCD_D5 on Fysetc schematic) + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN P1_22 // J8-2 (LCD_D7 on Fysetc schematic) + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN P2_12 #endif #elif ENABLED(MINIPANEL) diff --git a/Marlin/src/pins/pins_PRINTRBOARD_G2.h b/Marlin/src/pins/pins_PRINTRBOARD_G2.h index 02f094498f..e8816b267d 100644 --- a/Marlin/src/pins/pins_PRINTRBOARD_G2.h +++ b/Marlin/src/pins/pins_PRINTRBOARD_G2.h @@ -49,7 +49,7 @@ // Z Probe (when not Z_MIN_PIN) // #ifndef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN 22 + #define Z_MIN_PROBE_PIN 22 #endif #ifndef FIL_RUNOUT_PIN @@ -59,18 +59,14 @@ //#define FIL_RUNOUT2_PIN 21 // PB13 #endif - // // LED defines // -//#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) -//#define NEOPIXEL_PIN 20 // LED driving pin on motherboard -//#define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip - - - -//#define SDA0 20 // PB12 NeoPixel pin I2C data -//#define SCL0 21 // PB13 I2C clock +//#define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) +//#define NEOPIXEL_PIN 20 // LED driving pin on motherboard +//#define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip +//#define SDA0 20 // PB12 NeoPixel pin I2C data +//#define SCL0 21 // PB13 I2C clock // D0_12 #REF! (INDICATOR_LED) // B28 JTAG-CLK diff --git a/Marlin/src/pins/pins_RAMPS.h b/Marlin/src/pins/pins_RAMPS.h index a705e3e194..88249ada31 100644 --- a/Marlin/src/pins/pins_RAMPS.h +++ b/Marlin/src/pins/pins_RAMPS.h @@ -436,7 +436,9 @@ #endif #define BTN_ENC 35 - #define SD_DETECT_PIN 49 + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN 49 + #endif #define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) @@ -500,73 +502,60 @@ #define SD_DETECT_PIN 49 #define KILL_PIN 41 - #elif ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6 - - #define DOGLCD_A0 27 - #define DOGLCD_CS 25 - - // GLCD features - // Uncomment screen orientation - //#define LCD_SCREEN_ROT_90 - //#define LCD_SCREEN_ROT_180 - //#define LCD_SCREEN_ROT_270 + #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) #define BEEPER_PIN 37 - // not connected to a pin - #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 - - #define BTN_EN1 31 - #define BTN_EN2 33 #define BTN_ENC 35 - #define SD_DETECT_PIN 49 #define KILL_PIN 41 - #elif ENABLED(FYSETC_MINI_12864) // Added in Marlin 1.1.9+ + #if ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6 - // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 - #define BEEPER_PIN 37 + #define DOGLCD_A0 27 + #define DOGLCD_CS 25 - #define DOGLCD_A0 16 - #define DOGLCD_CS 17 + // GLCD features + // Uncomment screen orientation + //#define LCD_SCREEN_ROT_90 + //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_270 - #define BTN_EN1 31 - #define BTN_EN2 33 - #define BTN_ENC 35 + // not connected to a pin + #define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65 - #define SD_DETECT_PIN 49 + #define BTN_EN1 31 + #define BTN_EN2 33 - #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - // Seems to work best if left open. + #elif ENABLED(FYSETC_MINI_12864) - #define FYSETC_MINI_12864_REV_1_2 - //#define FYSETC_MINI_12864_REV_2_0 - //#define FYSETC_MINI_12864_REV_2_1 - #if EITHER(FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0) - #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN 25 + // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 + + #define DOGLCD_A0 16 + #define DOGLCD_CS 17 + + #define BTN_EN1 33 + #define BTN_EN2 31 + + //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 + + #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. + + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN 25 + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN 27 + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN 29 + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN 25 #endif - #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN 27 - #endif - #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN 29 - #endif - #elif defined(FYSETC_MINI_12864_REV_2_1) - #define NEOPIXEL_LED - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 25 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. - #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) - #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup - #else - #error "Either FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0 or FYSETC_MINI_12864_REV_2_1 must be defined" - #endif - #if !defined(LED_USER_PRESET_STARTUP) && EITHER(FYSETC_MINI_12864_REV_2_0, FYSETC_MINI_12864_REV_2_1) - #error "LED_USER_PRESET_STARTUP must be enabled when using FYSETC_MINI_12864 REV 2.0 and later" - #endif + #endif #elif ENABLED(MINIPANEL) diff --git a/Marlin/src/pins/pins_RAMPS_FD_V1.h b/Marlin/src/pins/pins_RAMPS_FD_V1.h index 78e75d9116..e64b9cfd2f 100644 --- a/Marlin/src/pins/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/pins_RAMPS_FD_V1.h @@ -155,16 +155,15 @@ #if ENABLED(FYSETC_MINI_12864) #define DOGLCD_CS LCD_PINS_ENABLE #define DOGLCD_A0 LCD_PINS_RS + #define DOGLCD_SCK 76 + #define DOGLCD_MOSI 75 - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes problems + //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. - // Seems to work best if left open. - #define FYSETC_MINI_12864_REV_1_2 - //#define FYSETC_MINI_12864_REV_2_0 - //#define FYSETC_MINI_12864_REV_2_1 - #if EITHER(FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0) + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN 25 #endif @@ -174,20 +173,8 @@ #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN 29 #endif - #elif defined(FYSETC_MINI_12864_REV_2_1) - #define NEOPIXEL_LED - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 25 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. - #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) - #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup - #else - #error "Either FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0 or FYSETC_MINI_12864_REV_2_1 must be defined" - #endif - - #if !defined(LED_USER_PRESET_STARTUP) && EITHER(FYSETC_MINI_12864_REV_2_0, FYSETC_MINI_12864_REV_2_1) - #error "LED_USER_PRESET_STARTUP must be enabled when using FYSETC_MINI_12864 REV 2.0 and later" + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN 25 #endif #elif ENABLED(NEWPANEL) diff --git a/Marlin/src/pins/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/pins_RAMPS_RE_ARM.h index 5871b80d15..a40239c49e 100644 --- a/Marlin/src/pins/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/pins_RAMPS_RE_ARM.h @@ -106,6 +106,35 @@ #define TMC_SW_SCK P1_09 // ETH #endif +#if HAS_DRIVER(TMC2208) + /** + * TMC2208 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + + /** + * Software serial + */ + + // P2_08 E1-Step + // P2_13 E1-Dir + + #define X_SERIAL_TX_PIN P2_13 + #define X_SERIAL_RX_PIN P2_13 + + #define Y_SERIAL_TX_PIN P0_00 + #define Y_SERIAL_RX_PIN P0_00 + + #define Z_SERIAL_TX_PIN P0_01 + #define Z_SERIAL_RX_PIN P0_01 + + #define E0_SERIAL_TX_PIN P2_08 + #define E0_SERIAL_RX_PIN P2_08 + +#endif + // // Temperature Sensors // 3.3V max when defined as an analog input @@ -318,9 +347,28 @@ #if ENABLED(FYSETC_MINI_12864) #define DOGLCD_SCK P0_15 #define DOGLCD_MOSI P0_18 - #define DOGLCD_CS P1_09 // use Ethernet connector for EXP1 cable signals + + // EXP1 on LCD adapter is not usable - using Ethernet connector instead + #define DOGLCD_CS P1_09 #define DOGLCD_A0 P1_14 - #define FORCE_SOFT_SPI // required on a Re-ARM system + //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 + + #define LCD_RESET_PIN P0_16 // Must be high or open for LCD to operate normally. + + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN P1_00 + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN P1_01 + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN P1_08 + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN P1_00 + #endif #else #define DOGLCD_CS P0_26 // (63) J5-3 & AUX-2 #define DOGLCD_A0 P2_06 // (59) J3-8 & AUX-2 diff --git a/Marlin/src/pins/pins_RUMBA.h b/Marlin/src/pins/pins_RUMBA.h index e0bed70e22..f002a4f539 100644 --- a/Marlin/src/pins/pins_RUMBA.h +++ b/Marlin/src/pins/pins_RUMBA.h @@ -175,6 +175,31 @@ #define DOGLCD_MOSI 42 #define DOGLCD_SCK 18 #define DOGLCD_A0 LCD_PINS_DC +#elif ENABLED(FYSETC_MINI_12864) + #define DOGLCD_CS 42 + #define DOGLCD_A0 19 + #define DOGLCD_MOSI 51 + #define DOGLCD_SCK 52 + + //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 + + #define LCD_RESET_PIN 18 // Must be high or open for LCD to operate normally. + + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN 41 + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN 38 + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN 40 + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN 25 + #endif + #else #define LCD_PINS_RS 19 #define LCD_PINS_ENABLE 42 diff --git a/Marlin/src/pins/pins_RURAMPS4D_11.h b/Marlin/src/pins/pins_RURAMPS4D_11.h index 718e44651e..ac188ec334 100644 --- a/Marlin/src/pins/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/pins_RURAMPS4D_11.h @@ -233,16 +233,12 @@ #define DOGLCD_CS 64 #define DOGLCD_A0 63 - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes problems + //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 #define LCD_RESET_PIN 48 // Must be high or open for LCD to operate normally. - // Seems to work best if left open. - #define FYSETC_MINI_12864_REV_1_2 - //#define FYSETC_MINI_12864_REV_2_0 - //#define FYSETC_MINI_12864_REV_2_1 - #if EITHER(FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0) - #define RGB_LED + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN 50 // D5 #endif @@ -252,20 +248,8 @@ #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN 53 // D7 #endif - #elif defined(FYSETC_MINI_12864_REV_2_1) - #define NEOPIXEL_LED - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 50 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. - #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) - #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup - #else - #error "Either FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0 or FYSETC_MINI_12864_REV_2_1 must be defined" - #endif - - #if !defined(LED_USER_PRESET_STARTUP) && EITHER(FYSETC_MINI_12864_REV_2_0, FYSETC_MINI_12864_REV_2_1) - #error "LED_USER_PRESET_STARTUP must be enabled when using FYSETC_MINI_12864 REV 2.0 and later" + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN 50 // D5 #endif #elif ENABLED(SPARK_FULL_GRAPHICS) diff --git a/Marlin/src/pins/pins_RURAMPS4D_13.h b/Marlin/src/pins/pins_RURAMPS4D_13.h index ddae87c245..c224d57820 100644 --- a/Marlin/src/pins/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/pins_RURAMPS4D_13.h @@ -219,16 +219,12 @@ #define DOGLCD_CS 64 #define DOGLCD_A0 63 - //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes problems + //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems + // results in LCD soft SPI mode 3, SD soft SPI mode 0 #define LCD_RESET_PIN 48 // Must be high or open for LCD to operate normally. - // Seems to work best if left open. - #define FYSETC_MINI_12864_REV_1_2 - //#define FYSETC_MINI_12864_REV_2_0 - //#define FYSETC_MINI_12864_REV_2_1 - #if EITHER(FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0) - #define RGB_LED + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN #define RGB_LED_R_PIN 50 // D5 #endif @@ -238,20 +234,8 @@ #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN 53 // D7 #endif - #elif defined(FYSETC_MINI_12864_REV_2_1) - #define NEOPIXEL_LED - #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 50 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) - #define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip - #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. - #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) - #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup - #else - #error "Either FYSETC_MINI_12864_REV_1_2, FYSETC_MINI_12864_REV_2_0 or FYSETC_MINI_12864_REV_2_1 must be defined" - #endif - - #if !defined(LED_USER_PRESET_STARTUP) && EITHER(FYSETC_MINI_12864_REV_2_0, FYSETC_MINI_12864_REV_2_1) - #error "LED_USER_PRESET_STARTUP must be enabled when using FYSETC_MINI_12864 REV 2.0 and later" + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN 50 // D5 #endif #elif ENABLED(MKS_MINI_12864) diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index c0e91f85c9..7d41e1b88d 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -81,7 +81,7 @@ bool SdBaseFile::addDirCluster() { // cache a file's directory entry // return pointer to cached entry or null for failure dir_t* SdBaseFile::cacheDirEntry(uint8_t action) { - if (!vol_->cacheRawBlock(dirBlock_, action)) return NULL; + if (!vol_->cacheRawBlock(dirBlock_, action)) return nullptr; return vol_->cache()->dir + dirIndex_; } @@ -841,7 +841,7 @@ bool SdBaseFile::openParent(SdBaseFile* dir) { // search for parent in '../..' do { - if (file.readDir(&entry, NULL) != 32) return false; + if (file.readDir(&entry, nullptr) != 32) return false; c = entry.firstClusterLow; c |= (uint32_t)entry.firstClusterHigh << 16; } while (c != cluster); diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 7ac21b975b..51702fa229 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -158,7 +158,7 @@ char *createFilename(char *buffer, const dir_t &p) { uint16_t nrFile_index; -void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) { +void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=nullptr*/) { dir_t p; uint8_t cnt = 0; @@ -226,7 +226,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m case LS_GetFilename: createFilename(filename, p); - if (match != NULL) { + if (match != nullptr) { if (strcasecmp(match, filename) == 0) return; } else if (cnt == nrFile_index) return; // 0 based index @@ -241,7 +241,7 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m void CardReader::ls() { lsAction = LS_SerialPrint; root.rewind(); - lsDive(NULL, root); + lsDive(nullptr, root); } #if ENABLED(LONG_FILENAME_HOST_SUPPORT) @@ -276,7 +276,7 @@ void CardReader::ls() { // Find the item, setting the long filename diveDir.rewind(); - lsDive(NULL, diveDir, segment); + lsDive(nullptr, diveDir, segment); // Print /LongNamePart to serial output SERIAL_CHAR('/'); @@ -461,7 +461,7 @@ void CardReader::openFile(char * const path, const bool read, const bool subcall stopSDPrint(); SdFile *curDir; - const char * const fname = diveToFile(curDir, path, false); + const char * const fname = diveToFile(curDir, path); if (!fname) return; if (read) { @@ -501,7 +501,7 @@ void CardReader::removeFile(const char * const name) { //stopSDPrint(); SdFile *curDir; - const char * const fname = diveToFile(curDir, name, false); + const char * const fname = diveToFile(curDir, name); if (!fname) return; if (file.remove(curDir, fname)) { @@ -528,11 +528,11 @@ void CardReader::report_status() { void CardReader::write_command(char *buf) { char* begin = buf; - char* npos = NULL; + char* npos = nullptr; char* end = buf + strlen(buf) - 1; file.writeError = false; - if ((npos = strchr(buf, 'N')) != NULL) { + if ((npos = strchr(buf, 'N')) != nullptr) { begin = strchr(npos, ' ') + 1; end = strchr(npos, '*') - 1; } @@ -566,7 +566,7 @@ void CardReader::checkautostart() { sprintf_P(autoname, PSTR("auto%c.g"), autostart_index + '0'); dir_t p; root.rewind(); - while (root.readDir(&p, NULL) > 0) { + while (root.readDir(&p, nullptr) > 0) { for (int8_t i = (int8_t)strlen((char*)p.name); i--;) p.name[i] = tolower(p.name[i]); if (p.name[9] != '~' && strncmp((char*)p.name, autoname, 5) == 0) { openAndPrintFile(autoname); @@ -602,9 +602,9 @@ void CardReader::closefile(const bool store_location) { * Get the name of a file in the current directory by index * with optional name to match. */ -void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) { +void CardReader::getfilename(uint16_t nr, const char * const match/*=nullptr*/) { #if ENABLED(SDSORT_CACHE_NAMES) - if (match != NULL) { + if (match != nullptr) { while (nr < sort_count) { if (strcasecmp(match, sortshort[nr]) == 0) break; nr++; @@ -620,14 +620,14 @@ void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/) { lsAction = LS_GetFilename; nrFile_index = nr; workDir.rewind(); - lsDive(NULL, workDir, match); + lsDive(nullptr, workDir, match); } uint16_t CardReader::getnrfilenames() { lsAction = LS_Count; nrFiles = 0; workDir.rewind(); - lsDive(NULL, workDir); + lsDive(nullptr, workDir); //SERIAL_ECHOLN(nrFiles); return nrFiles; } @@ -639,17 +639,31 @@ uint16_t CardReader::getnrfilenames() { * * Returns a pointer to the last segment (filename) of the given DOS 8.3 path. * - * A NULL result indicates an unrecoverable error. + * A nullptr result indicates an unrecoverable error. */ -const char* CardReader::diveToFile(SdFile*& curDir, const char * const path, const bool echo) { - SdFile myDir; - if (path[0] != '/') { curDir = &workDir; return path; } +const char* CardReader::diveToFile(SdFile*& curDir, const char * const path, const bool echo/*=false*/) { + // Track both parent and subfolder + static SdFile newDir1, newDir2; + SdFile *sub = &newDir1, *startDir; - curDir = &root; - const char *dirname_start = &path[1]; + const char *dirname_start = path; + if (path[0] == '/') { + curDir = &root; + workDirDepth = 0; + dirname_start++; + } + else + curDir = &workDir; + + startDir = curDir; + + // Start dive while (dirname_start) { + // Find next sub char * const dirname_end = strchr(dirname_start, '/'); if (dirname_end <= dirname_start) break; + + // Set subDirName const uint8_t len = dirname_end - dirname_start; char dosSubdirname[len + 1]; strncpy(dosSubdirname, dirname_start, len); @@ -657,11 +671,25 @@ const char* CardReader::diveToFile(SdFile*& curDir, const char * const path, con if (echo) SERIAL_ECHOLN(dosSubdirname); - if (!myDir.open(curDir, dosSubdirname, O_READ)) { + // Open curDir + if (!sub->open(curDir, dosSubdirname, O_READ)) { SERIAL_ECHOLNPAIR(MSG_SD_OPEN_FILE_FAIL, dosSubdirname, "."); - return NULL; + return nullptr; } - curDir = &myDir; + + // Close curDir if not at starting-point + if (curDir != startDir) curDir->close(); + + // curDir now subDir + curDir = sub; + + // Update workDirParents and workDirDepth + if (workDirDepth < MAX_DIR_DEPTH) workDirParents[workDirDepth++] = *curDir; + + // Point sub pointer to unused newDir + sub = (curDir != &newDir1) ? &newDir1 : &newDir2; + + // dirname_start point to next sub dirname_start = dirname_end + 1; } return dirname_start; @@ -1008,7 +1036,7 @@ void CardReader::printingHasFinished() { #if ENABLED(POWER_LOSS_RECOVERY) - constexpr char job_recovery_file_name[4] = "PLR"; + constexpr char job_recovery_file_name[5] = "/PLR"; bool CardReader::jobRecoverFileExists() { const bool exists = recovery.file.open(&root, job_recovery_file_name, O_READ); diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 9faf050574..5bdbffaf20 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -78,7 +78,7 @@ public: static void printLongPath(char *path); #endif - static void getfilename(uint16_t nr, const char* const match=NULL); + static void getfilename(uint16_t nr, const char* const match=nullptr); static uint16_t getnrfilenames(); static void getAbsFilename(char *t); @@ -88,7 +88,7 @@ public: static int8_t updir(); static void setroot(); - static const char* diveToFile(SdFile*& curDir, const char * const path, const bool echo); + static const char* diveToFile(SdFile*& curDir, const char * const path, const bool echo=false); static uint16_t get_num_Files(); @@ -144,6 +144,7 @@ public: static card_flags_t flag; static char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH]; static int8_t autostart_index; + static SdFile getroot() { return root; } #if ENABLED(BINARY_FILE_TRANSFER) #if NUM_SERIAL > 1 @@ -224,7 +225,7 @@ private: static LsAction lsAction; //stored for recursion. static uint16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory. static char *diveDirName; - static void lsDive(const char *prepend, SdFile parent, const char * const match=NULL); + static void lsDive(const char *prepend, SdFile parent, const char * const match=nullptr); #if ENABLED(SDCARD_SORT_ALPHA) static void flush_presort(); diff --git a/Marlin/src/sd/usb_flashdrive/lib/Usb.cpp b/Marlin/src/sd/usb_flashdrive/lib/Usb.cpp index 6d0f920697..4ca0b2dde3 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/Usb.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib/Usb.cpp @@ -57,7 +57,7 @@ EpInfo* USB::getEpInfoEntry(uint8_t addr, uint8_t ep) { UsbDevice *p = addrPool.GetUsbDevicePtr(addr); if (!p || !p->epinfo) - return NULL; + return nullptr; EpInfo *pep = p->epinfo; @@ -67,7 +67,7 @@ EpInfo* USB::getEpInfoEntry(uint8_t addr, uint8_t ep) { pep++; } - return NULL; + return nullptr; } /* set device table entry */ @@ -141,7 +141,7 @@ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bReque uint8_t rcode; SETUP_PKT setup_pkt; - EpInfo *pep = NULL; + EpInfo *pep = nullptr; uint16_t nak_limit = 0; rcode = SetAddress(addr, ep, &pep, &nak_limit); @@ -162,7 +162,7 @@ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bReque rcode = dispatchPkt(tokSETUP, ep, nak_limit); //dispatch packet if (rcode) return rcode; // Return HRSLT if not zero - if (dataptr != NULL) { //data stage, if present + if (dataptr != nullptr) { //data stage, if present if (direction) { //IN transfer uint16_t left = total; pep->bmRcvToggle = 1; //bmRCVTOG1; @@ -205,7 +205,7 @@ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bReque /* rcode 0 if no errors. rcode 01-0f is relayed from dispatchPkt(). Rcode f0 means RCVDAVIRQ error, fe USB xfer timeout */ uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval /*= 0*/) { - EpInfo *pep = NULL; + EpInfo *pep = nullptr; uint16_t nak_limit = 0; uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit); @@ -289,7 +289,7 @@ uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, ui /* rcode 0 if no errors. rcode 01-0f is relayed from HRSL */ uint8_t USB::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data) { - EpInfo *pep = NULL; + EpInfo *pep = nullptr; uint16_t nak_limit = 0; uint8_t rcode = SetAddress(addr, ep, &pep, &nak_limit); @@ -529,7 +529,7 @@ void USB::Task(void) { //USB state machine uint8_t USB::DefaultAddressing(uint8_t parent, uint8_t port, bool lowspeed) { //uint8_t buf[12]; uint8_t rcode; - UsbDevice *p0 = NULL, *p = NULL; + UsbDevice *p0 = nullptr, *p = nullptr; // Get pointer to pseudo device with address 0 assigned p0 = addrPool.GetUsbDevicePtr(0); @@ -649,8 +649,8 @@ uint8_t USB::Configuring(uint8_t parent, uint8_t port, bool lowspeed) { uint8_t rcode = 0; uint8_t buf[sizeof (USB_DEVICE_DESCRIPTOR)]; USB_DEVICE_DESCRIPTOR *udd = reinterpret_cast(buf); - UsbDevice *p = NULL; - EpInfo *oldep_ptr = NULL; + UsbDevice *p = nullptr; + EpInfo *oldep_ptr = nullptr; EpInfo epInfo; epInfo.epAddr = 0; @@ -749,12 +749,12 @@ uint8_t USB::ReleaseDevice(uint8_t addr) { //get device descriptor uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) { - return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, nbytes, dataptr, NULL); + return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, nbytes, dataptr, nullptr); } //get configuration descriptor uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) { - return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, nbytes, dataptr, NULL); + return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, nbytes, dataptr, nullptr); } /* Requests Configuration Descriptor. Sends two Get Conf Descr requests. The first one gets the total length of all descriptors, then the second one requests this @@ -777,21 +777,21 @@ uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint8_t conf, USBReadParser //get string descriptor uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) { - return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns, ns, dataptr, NULL); + return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns, ns, dataptr, nullptr); } //set address uint8_t USB::setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr) { - uint8_t rcode = ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL); + uint8_t rcode = ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, nullptr, nullptr); //delay(2); //per USB 2.0 sect.9.2.6.3 delay(300); // Older spec says you should wait at least 200ms return rcode; - //return ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL); + //return ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, 0x0000, nullptr, nullptr); } //set configuration uint8_t USB::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) { - return ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, 0x0000, NULL, NULL); + return ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, 0x0000, nullptr, nullptr); } #endif // defined(USB_METHODS_INLINE) diff --git a/Marlin/src/sd/usb_flashdrive/lib/UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib/UsbCore.h index 06443ffcd6..063de843f7 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/UsbCore.h +++ b/Marlin/src/sd/usb_flashdrive/lib/UsbCore.h @@ -301,12 +301,12 @@ inline uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t nuint8_ts, ui //set address inline uint8_t USB::setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr) { - return ( ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, NULL)); + return ( ctrlReq(oldaddr, ep, bmREQ_SET, USB_REQUEST_SET_ADDRESS, newaddr, 0x00, 0x0000, 0x0000, nullptr)); } //set configuration inline uint8_t USB::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) { - return ( ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, NULL)); + return ( ctrlReq(addr, ep, bmREQ_SET, USB_REQUEST_SET_CONFIGURATION, conf_value, 0x00, 0x0000, 0x0000, nullptr)); } #endif // defined(USB_METHODS_INLINE) diff --git a/Marlin/src/sd/usb_flashdrive/lib/address.h b/Marlin/src/sd/usb_flashdrive/lib/address.h index d55d896cc2..f51e43f0ea 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/address.h +++ b/Marlin/src/sd/usb_flashdrive/lib/address.h @@ -183,7 +183,7 @@ public: virtual UsbDevice* GetUsbDevicePtr(uint8_t addr) { if (!addr) return thePool; uint8_t index = FindAddressIndex(addr); - return index ? thePool + index : NULL; + return index ? thePool + index : nullptr; } // Perform an operation specified by pfunc for each addressed device diff --git a/Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp b/Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp index eac4bebe54..74a6187d56 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib/masstorage.cpp @@ -118,7 +118,7 @@ uint8_t BulkOnly::LockMedia(uint8_t lun, uint8_t lock) { Notify(PSTR("---------\r\n"), 0x80); CDB6_t cdb = CDB6_t(SCSI_CMD_PREVENT_REMOVAL, lun, (uint8_t)0, lock); - return SCSITransaction6(&cdb, (uint16_t)0, NULL, (uint8_t)MASS_CMD_DIR_IN); + return SCSITransaction6(&cdb, (uint16_t)0, nullptr, (uint8_t)MASS_CMD_DIR_IN); } /** @@ -136,7 +136,7 @@ uint8_t BulkOnly::MediaCTL(uint8_t lun, uint8_t ctl) { uint8_t rcode = MASS_ERR_UNIT_NOT_READY; if (bAddress) { CDB6_t cdb = CDB6_t(SCSI_CMD_START_STOP_UNIT, lun, ctl & 0x03, 0); - rcode = SCSITransaction6(&cdb, (uint16_t)0, NULL, (uint8_t)MASS_CMD_DIR_OUT); + rcode = SCSITransaction6(&cdb, (uint16_t)0, nullptr, (uint8_t)MASS_CMD_DIR_OUT); } else SetCurLUN(lun); @@ -255,8 +255,8 @@ uint8_t BulkOnly::ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed) { uint8_t buf[constBufSize]; USB_DEVICE_DESCRIPTOR * udd = reinterpret_cast(buf); uint8_t rcode; - UsbDevice *p = NULL; - EpInfo *oldep_ptr = NULL; + UsbDevice *p = nullptr; + EpInfo *oldep_ptr = nullptr; USBTRACE("MS ConfigureDevice\r\n"); ClearAllEP(); AddressPool &addrPool = pUsb->GetAddressPool(); @@ -668,7 +668,7 @@ uint8_t BulkOnly::Poll() { * @return */ uint8_t BulkOnly::GetMaxLUN(uint8_t *plun) { - uint8_t ret = pUsb->ctrlReq(bAddress, 0, bmREQ_MASSIN, MASS_REQ_GET_MAX_LUN, 0, 0, bIface, 1, 1, plun, NULL); + uint8_t ret = pUsb->ctrlReq(bAddress, 0, bmREQ_MASSIN, MASS_REQ_GET_MAX_LUN, 0, 0, bIface, 1, 1, plun, nullptr); if (ret == hrSTALL) *plun = 0; @@ -709,7 +709,7 @@ uint8_t BulkOnly::TestUnitReady(uint8_t lun) { Notify(PSTR("-----------------\r\n"), 0x80); CDB6_t cdb = CDB6_t(SCSI_CMD_TEST_UNIT_READY, lun, (uint8_t)0, 0); - return SCSITransaction6(&cdb, 0, NULL, (uint8_t)MASS_CMD_DIR_IN); + return SCSITransaction6(&cdb, 0, nullptr, (uint8_t)MASS_CMD_DIR_IN); } @@ -813,7 +813,7 @@ uint8_t BulkOnly::ClearEpHalt(uint8_t index) { uint8_t ret = 0; - while ((ret = (pUsb->ctrlReq(bAddress, 0, USB_SETUP_HOST_TO_DEVICE | USB_SETUP_TYPE_STANDARD | USB_SETUP_RECIPIENT_ENDPOINT, USB_REQUEST_CLEAR_FEATURE, USB_FEATURE_ENDPOINT_HALT, 0, ((index == epDataInIndex) ? (0x80 | epInfo[index].epAddr) : epInfo[index].epAddr), 0, 0, NULL, NULL)) == 0x01)) + while ((ret = (pUsb->ctrlReq(bAddress, 0, USB_SETUP_HOST_TO_DEVICE | USB_SETUP_TYPE_STANDARD | USB_SETUP_RECIPIENT_ENDPOINT, USB_REQUEST_CLEAR_FEATURE, USB_FEATURE_ENDPOINT_HALT, 0, ((index == epDataInIndex) ? (0x80 | epInfo[index].epAddr) : epInfo[index].epAddr), 0, 0, nullptr, nullptr)) == 0x01)) delay(6); if (ret) { @@ -831,7 +831,7 @@ uint8_t BulkOnly::ClearEpHalt(uint8_t index) { * */ void BulkOnly::Reset() { - while (pUsb->ctrlReq(bAddress, 0, bmREQ_MASSOUT, MASS_REQ_BOMSR, 0, 0, bIface, 0, 0, NULL, NULL) == 0x01) delay(6); + while (pUsb->ctrlReq(bAddress, 0, bmREQ_MASSOUT, MASS_REQ_BOMSR, 0, 0, bIface, 0, 0, nullptr, nullptr) == 0x01) delay(6); } /** diff --git a/Marlin/src/sd/usb_flashdrive/lib/parsetools.h b/Marlin/src/sd/usb_flashdrive/lib/parsetools.h index b075c05397..529bafbbc0 100644 --- a/Marlin/src/sd/usb_flashdrive/lib/parsetools.h +++ b/Marlin/src/sd/usb_flashdrive/lib/parsetools.h @@ -40,7 +40,7 @@ class MultiByteValueParser { public: - MultiByteValueParser() : pBuf(NULL), countDown(0), valueSize(0) { + MultiByteValueParser() : pBuf(nullptr), countDown(0), valueSize(0) { }; const uint8_t* GetBuffer() { return pBuf; } @@ -60,7 +60,7 @@ class ByteSkipper { public: - ByteSkipper() : pBuf(NULL), nStage(0), countDown(0) { + ByteSkipper() : pBuf(nullptr), nStage(0), countDown(0) { } void Initialize(MultiValueBuffer *pbuf) { @@ -119,7 +119,7 @@ public: arLenCntdn(0), lenSize(0), valSize(0), - pBuf(NULL), + pBuf(nullptr), prsMode(modeArray) { } ; @@ -141,5 +141,5 @@ public: theParser.Initialize(p); } - bool Parse(uint8_t **pp, uint16_t *pcntdn, PTP_ARRAY_EL_FUNC pf, const void *me = NULL); + bool Parse(uint8_t **pp, uint16_t *pcntdn, PTP_ARRAY_EL_FUNC pf, const void *me = nullptr); }; diff --git a/config/default/Configuration.h b/config/default/Configuration.h index bd67939356..0575d981f0 100644 --- a/config/default/Configuration.h +++ b/config/default/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/default/Configuration_adv.h b/config/default/Configuration_adv.h index 442cd948f7..a9a15211f3 100644 --- a/config/default/Configuration_adv.h +++ b/config/default/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/3DFabXYZ/Migbot/Configuration.h b/config/examples/3DFabXYZ/Migbot/Configuration.h index a97d186a22..06528ed798 100644 --- a/config/examples/3DFabXYZ/Migbot/Configuration.h +++ b/config/examples/3DFabXYZ/Migbot/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -822,7 +834,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -913,6 +932,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1021,7 +1043,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1114,7 +1136,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1140,7 +1162,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1209,7 +1231,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1236,6 +1258,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1343,17 +1366,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1432,7 +1459,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1912,6 +1939,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2014,6 +2049,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2068,7 +2104,7 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 50 #define RGB_LED_G_PIN 51 #define RGB_LED_B_PIN 52 @@ -2079,7 +2115,7 @@ //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2097,7 +2133,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h index 5c4f80b55d..4f40b80412 100644 --- a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h +++ b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2270,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2330,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/AlephObjects/TAZ4/Configuration.h b/config/examples/AlephObjects/TAZ4/Configuration.h index 99567bc800..861f17643c 100644 --- a/config/examples/AlephObjects/TAZ4/Configuration.h +++ b/config/examples/AlephObjects/TAZ4/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 7 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 7 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 250 #define HEATER_5_MAXTEMP 250 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -471,7 +483,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -836,7 +848,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -927,6 +946,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1035,7 +1057,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1128,7 +1150,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1154,7 +1176,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1223,7 +1245,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1250,6 +1272,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1357,17 +1380,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1421,7 +1448,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1901,6 +1928,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2003,6 +2038,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2057,18 +2093,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2086,7 +2122,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 384626a7fd..44227d4d0f 100644 --- a/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 4 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/AliExpress/CL-260/Configuration.h b/config/examples/AliExpress/CL-260/Configuration.h index 8611261b8b..746246625e 100644 --- a/config/examples/AliExpress/CL-260/Configuration.h +++ b/config/examples/AliExpress/CL-260/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/AliExpress/UM2pExt/Configuration.h b/config/examples/AliExpress/UM2pExt/Configuration.h index fcdcbe0818..3250a45f5c 100644 --- a/config/examples/AliExpress/UM2pExt/Configuration.h +++ b/config/examples/AliExpress/UM2pExt/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 20 #define TEMP_SENSOR_1 20 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 20 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 130 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -473,7 +485,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -827,7 +839,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -918,6 +937,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1026,7 +1048,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1119,7 +1141,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1145,7 +1167,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1214,7 +1236,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1241,6 +1263,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1348,17 +1371,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1412,7 +1439,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1892,6 +1919,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1994,6 +2029,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2048,18 +2084,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2077,7 +2113,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/AliExpress/UM2pExt/Configuration_adv.h b/config/examples/AliExpress/UM2pExt/Configuration_adv.h index f57222f5d1..160cb86f4a 100644 --- a/config/examples/AliExpress/UM2pExt/Configuration_adv.h +++ b/config/examples/AliExpress/UM2pExt/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1422,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1758,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1773,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2270,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2330,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Anet/A2/Configuration.h b/config/examples/Anet/A2/Configuration.h index b0b327d63d..b5a902bf0b 100644 --- a/config/examples/Anet/A2/Configuration.h +++ b/config/examples/Anet/A2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1883,6 +1910,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1985,6 +2020,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2039,18 +2075,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2068,7 +2104,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Anet/A2/Configuration_adv.h b/config/examples/Anet/A2/Configuration_adv.h index f30d102d0a..9ace82c328 100644 --- a/config/examples/Anet/A2/Configuration_adv.h +++ b/config/examples/Anet/A2/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Anet/A2plus/Configuration.h b/config/examples/Anet/A2plus/Configuration.h index 866ddcc489..7db8d45d0b 100644 --- a/config/examples/Anet/A2plus/Configuration.h +++ b/config/examples/Anet/A2plus/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1883,6 +1910,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1985,6 +2020,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2039,18 +2075,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2068,7 +2104,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Anet/A2plus/Configuration_adv.h b/config/examples/Anet/A2plus/Configuration_adv.h index f30d102d0a..9ace82c328 100644 --- a/config/examples/Anet/A2plus/Configuration_adv.h +++ b/config/examples/Anet/A2plus/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Anet/A6/Configuration.h b/config/examples/Anet/A6/Configuration.h index 1024d9b92e..d1a8f982cd 100644 --- a/config/examples/Anet/A6/Configuration.h +++ b/config/examples/Anet/A6/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 11 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 11 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 130 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -473,7 +485,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -863,7 +875,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -983,6 +1002,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1129,7 +1151,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1222,7 +1244,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1248,7 +1270,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 4 @@ -1341,7 +1363,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1368,6 +1390,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1489,17 +1512,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1553,7 +1580,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -2035,6 +2062,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2137,6 +2172,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2191,18 +2227,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2220,7 +2256,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Anet/A6/Configuration_adv.h b/config/examples/Anet/A6/Configuration_adv.h index ba9fec0cae..e0b52cb7b3 100644 --- a/config/examples/Anet/A6/Configuration_adv.h +++ b/config/examples/Anet/A6/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ //#define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Anet/A8/Configuration.h b/config/examples/Anet/A8/Configuration.h index 959e0652fc..394aa32a44 100644 --- a/config/examples/Anet/A8/Configuration.h +++ b/config/examples/Anet/A8/Configuration.h @@ -219,7 +219,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -250,13 +250,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -308,6 +322,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -364,11 +379,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -378,7 +395,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -397,8 +413,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -408,7 +422,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -420,7 +433,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 130 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -469,7 +481,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -829,7 +841,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -920,6 +939,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1028,7 +1050,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1121,7 +1143,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1147,7 +1169,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1216,7 +1238,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 20 #define PROBE_PT_1_Y 160 #define PROBE_PT_2_X 20 @@ -1243,6 +1265,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1350,17 +1373,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1414,7 +1441,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1896,6 +1923,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1998,6 +2033,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2052,18 +2088,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2081,7 +2117,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Anet/A8/Configuration_adv.h b/config/examples/Anet/A8/Configuration_adv.h index 349c1f6e50..083c067f0f 100644 --- a/config/examples/Anet/A8/Configuration_adv.h +++ b/config/examples/Anet/A8/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ //#define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Anet/A8plus/Configuration.h b/config/examples/Anet/A8plus/Configuration.h new file mode 100644 index 0000000000..6d6eaccce4 --- /dev/null +++ b/config/examples/Anet/A8plus/Configuration.h @@ -0,0 +1,2143 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#define CONFIGURATION_H_VERSION 020000 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// config/examples/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// config/examples/SCARA and customize for your machine. +// + +// @section info + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_CONFIG_H_AUTHOR "(Martin Zeman - Zemistr, Anet A8 Plus)" // Who made the changes. +#define SHOW_BOOTSCREEN +#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 +#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respectfully request that you retain the unmodified Marlin boot screen. + */ + +// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +//#define SHOW_CUSTOM_BOOTSCREEN + +// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +//#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 0 + +/** + * Select a secondary serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port -1 is the USB emulated serial port, if available. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +//#define SERIAL_PORT_2 -1 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 115200 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_ANET_10 +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +#define CUSTOM_MACHINE_NAME "Anet A8 plus" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5, 6] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +// The Anet A8 original extruder is designed for 1.75mm +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs + //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs +#endif + +/** + * Prusa Multi-Material Unit v2 + * + * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. + * Requires EXTRUDERS = 5 + * + * For additional configuration see Configuration_adv.h + */ +//#define PRUSA_MMU2 + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo) +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism using movements and no solenoid + * + * project : https://www.thingiverse.com/thing:3080893 + * movements : https://youtu.be/0xCEiG9VS3k + * https://youtu.be/Bqbcs0CU2FE + */ +//#define MAGNETIC_PARKING_EXTRUDER + +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #if ENABLED(PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined. + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + + #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point + #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple + #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point + #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling + + #endif + +#endif + +/** + * Switching Toolhead + * + * Support for swappable and dockable toolheads, such as + * the E3D Tool Changer. Toolheads are locked with a servo. + */ +//#define SWITCHING_TOOLHEAD + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif +#endif + +/** + * "Mixing Extruder" + * - Adds G-codes M163 and M164 to set and "commit" the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools. + * - This implementation supports up to two mixing extruders. + * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation). + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands + //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + #if ENABLED(GRADIENT_MIX) + //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias + #endif +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X {0.0, 20.00} // (mm) relative X-offset for each nozzle +//#define HOTEND_OFFSET_Y {0.0, 5.00} // (mm) relative Y-offset for each nozzle +//#define HOTEND_OFFSET_Z {0.0, 0.00} // (mm) relative Z-offset for each nozzle + +// @section machine + +/** + * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN + * + * 0 = No Power Switch + * 1 = ATX + * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) + * + * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' } + */ +#define POWER_SUPPLY 0 + +#if POWER_SUPPLY > 0 + // Enable this option to leave the PSU off at startup. + // Power to steppers and heaters will need to be turned on with M80. + //#define PS_DEFAULT_OFF + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN + #define POWER_TIMEOUT 30 + #endif + +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -4 : thermocouple with AD8495 + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 501 : 100K Zonestar (Tronxy X3A) Thermistor + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 20 : the PT100 circuit found in the Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 67 : 450C thermistor from SliceEngineering + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + */ +#define TEMP_SENSOR_0 5 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_5 0 +#define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +#define TEMP_RESIDENCY_TIME 6 // (seconds) Time to wait for hotend to "settle" in M109 +#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +#define TEMP_BED_RESIDENCY_TIME 6 // (seconds) Time to wait for bed to "settle" in M190 +#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +// Below this temperature the heater will be switched off +// because it probably indicates a broken thermistor wire. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define HEATER_5_MINTEMP 5 +#define BED_MINTEMP 5 + +// Above this temperature the heater will be switched off. +// This can protect components from overheating, but NOT from shorts and failures. +// (Use MINTEMP for thermistor short/failure protection.) +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define HEATER_5_MAXTEMP 275 +#define BED_MAXTEMP 130 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM) + //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 15 // If the temperature difference between the target temperature and the actual temperature + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Ultimaker + //#define DEFAULT_Kp 21.0 + //#define DEFAULT_Ki 1.25 + //#define DEFAULT_Kd 86.0 + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + + // ANET A8 Standard Extruder at 210 Degree Celsius and 100% Fan + //(measured after M106 S255 with M303 E0 S210 C8) + #define DEFAULT_Kp 49.19 + #define DEFAULT_Ki 6.33 + #define DEFAULT_Kd 95.60 +#endif // PIDTEMP + +//=========================================================================== +//====================== PID > Bed Temperature Control ====================== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + //#define DEFAULT_bedKp 10.00 + //#define DEFAULT_bedKi .023 + //#define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // ANET A8 + // original Bed + 0.3mm Heat conducting into 4mm borosilicate (PID-Autotune: M303 E-1 S60 C5): + #define DEFAULT_bedKp 22.20 + #define DEFAULT_bedKi 1.08 + #define DEFAULT_bedKd 114.00 + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +/** + * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP. + * Add M302 to set the minimum extrusion temperature and/or turn + * cold extrusion prevention on and off. + * + * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** + */ +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 160 // 160 guards against false tripping when the extruder fan kicks on. + +/** + * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. + * Note: For Bowden Extruders make this large enough to allow load/unload. + */ +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 200 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed +#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. + +/** + * Stepper Drivers + * + * These settings allow Marlin to tune stepper driver timing and enable advanced options for + * stepper drivers that support them. You may also override timing options in Configuration_adv.h. + * + * A4988 is assumed for unspecified drivers. + * + * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE, + * TMC5160, TMC5160_STANDALONE + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +//#define Z3_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 +//#define E5_DRIVER_TYPE A4988 + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +#define ENDSTOP_INTERRUPTS_FEATURE + +/** + * Endstop Noise Threshold + * + * Enable if your probe or endstops falsely trigger due to noise. + * + * - Higher values may affect repeatability or accuracy of some bed probes. + * - To fix noise install a 100nF ceramic capacitor inline with the switch. + * - This feature is not required for common micro-switches mounted on PCBs + * based on the Makerbot design, which already have the 100nF capacitor. + * + * :[2,3,4,5,6,7] + */ +//#define ENDSTOP_NOISE_THRESHOLD 2 + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 95 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 400, 400, 50, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 2000, 2000, 100, 10000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 400 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves + +// +// Use Junction Deviation instead of traditional Jerk Limiting +// +//#define JUNCTION_DEVIATION +#if ENABLED(JUNCTION_DEVIATION) + #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge +#endif + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#if DISABLED(JUNCTION_DEVIATION) + #define DEFAULT_XJERK 10.0 + #define DEFAULT_YJERK 10.0 + #define DEFAULT_ZJERK 0.3 +#endif + +#define DEFAULT_EJERK 5.0 // May be used by Linear Advance + +/** + * S-Curve Acceleration + * + * This option eliminates vibration during printing by fitting a Bézier + * curve to move acceleration, producing much smoother direction changes. + * + * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained + */ +//#define S_CURVE_ACCELERATION + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_PIN + * + * Define this pin if the probe is not connected to Z_MIN_PIN. + * If not defined the default pin for the selected MOTHERBOARD + * will be used. Most of the time the default is what you want. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + */ +//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +//#define PROBE_MANUALLY +//#define MANUAL_PROBE_START_Z 0.2 + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH +#if ENABLED(BLTOUCH) + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE +#endif + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice. +//#define RACK_AND_PINION_PROBE +#if ENABLED(RACK_AND_PINION_PROBE) + #define Z_PROBE_DEPLOY_X X_MIN_POS + #define Z_PROBE_RETRACT_X X_MAX_POS +#endif + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 10 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Feedrate (mm/m) for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +// The number of probes to perform at each point. +// Set to 2 for a fast/slow probe, using the second probe result. +// Set to 3 or more for slow probes, averaging the results. +//#define MULTIPLE_PROBING 2 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. + */ +#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes +//#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// Before deploy/stow pause for user confirmation +//#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR true +#define INVERT_Y_DIR true +#define INVERT_Z_DIR true + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false +#define INVERT_E5_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +#define X_BED_SIZE 300 +#define Y_BED_SIZE 300 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS -26 +#define Y_MIN_POS -6 +#define Z_MIN_POS 0 +#define X_MAX_POS 300 +#define Y_MAX_POS 297 +#define Z_MAX_POS 370 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * RAMPS-based boards use SERVO3_PIN for the first runout sensor. + * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +//#define FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) + #define FILAMENT_RUNOUT_SCRIPT "M600" + + // After a runout is detected, continue printing this length of filament + // before executing the runout script. Useful for a sensor at the end of + // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. + //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + // Enable this option to use an encoder disc that toggles the runout pin + // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM + // large enough to avoid false positives.) + //#define FILAMENT_MOTION_SENSOR + #endif +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +//#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +//#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#define G26_MESH_VALIDATION + #if ENABLED(G26_MESH_VALIDATION) + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool. + #endif + +#endif + +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE)) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE)) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + + #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment + //#define MESH_EDIT_MENU // Add a menu to edit mesh points +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// Manually set the home position. Leave these undefined for automatic settings. +// For DELTA this is the top-center of the Cartesian print volume. +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (100*60) +#define HOMING_FEEDRATE_Z (6*60) + +// Validate that endstops are triggered on homing moves +#define VALIDATE_HOMING_ENDSTOPS + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 + #endif + + // Enable this option for M852 to set skew at runtime + //#define SKEW_CORRECTION_GCODE +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_LABEL "PLA" +#define PREHEAT_1_TEMP_HOTEND 205 +#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_LABEL "PET-G" +#define PREHEAT_2_TEMP_HOTEND 240 +#define PREHEAT_2_TEMP_BED 90 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * P1 Raise the nozzle always to Z-park height. + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. + */ +#define NOZZLE_PARK_FEATURE + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z_raise } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +//#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Moves the nozzle to the initial position + #define NOZZLE_CLEAN_GOBACK +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +//#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, + * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * Info Screen Style (0:Classic, 1:Prusa) + * + * :[0:'Classic', 1:'Prusa'] + */ +#define LCD_INFO_SCREEN_STYLE 0 + +/** + * SD CARD + * + * SD Card support is disabled by default. If your controller has an SD slot, + * you must uncomment the following option or it won't work. + * + */ +#define SDSUPPORT + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +/** + * LCD Menu Items + * + * Disable all menus and only display the Status Screen, or + * just remove some extraneous menu items to recover space. + */ +//#define NO_LCD_MENUS +//#define SLIM_LCD_MENUS + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +//#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// If you have a speaker that can produce tones, enable it here. +// By default Marlin assumes you have a buzzer with a fixed frequency. +// +//#define SPEAKER + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//======================== (Character-based LCDs) ========================= +//============================================================================= + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// Original RADDS LCD Display+Encoder+SDCardReader +// http://doku.radds.org/dokumentation/lcd-display/ +// +//#define RADDS_DISPLAY + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// ANET and Tronxy 20x4 Controller +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +// +// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD. +// +//#define ULTRA_LCD + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//===================== (I2C and Shift-Register LCDs) ===================== +//============================================================================= + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// CONTROLLER TYPE: Shift register panels +// + +// +// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// 3-wire SR LCD with strobe using 74HC4094 +// https://github.com/mikeshub/SailfishLCD +// Uses the code directly from Sailfish +// +//#define FF_INTERFACEBOARD + +//============================================================================= +//======================= LCD / Controller Selection ======================= +//========================= (Graphical LCDs) ======================== +//============================================================================= + +// +// CONTROLLER TYPE: Graphical 128x64 (DOGM) +// +// IMPORTANT: The U8glib library is required for Graphical Display! +// https://github.com/olikraus/U8glib_Arduino +// + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// MKS MINI12864 with graphic controller and SD support +// http://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// ANET and Tronxy Graphical Controller +// +// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 +// A clone of the RepRapDiscount full graphics display but with +// different pins/wiring (see pins_ANET_10.h). +// +#define ANET_FULL_GRAPHICS_LCD + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// AZSMZ 12864 LCD with SD +// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html +// +//#define AZSMZ_12864 + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + +//============================================================================= +//=============================== Graphical TFTs ============================== +//============================================================================= + +// +// MKS Robin 320x240 color display +// +//#define MKS_ROBIN_TFT + +//============================================================================= +//============================ Other Controllers ============================ +//============================================================================= + +// +// CONTROLLER TYPE: Standalone / Serial +// + +// +// LCD for Malyan M200 printers. +// +//#define MALYAN_LCD + +// +// CONTROLLER TYPE: Keypad / Add-on +// + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +// Support for PCA9533 PWM LED driver +// https://github.com/mikeshub/SailfishRGB_LED +//#define PCA9533 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOSFET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Only power servos during movement, otherwise leave off to prevent jitter +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES diff --git a/config/examples/Anet/A8plus/Configuration_adv.h b/config/examples/Anet/A8plus/Configuration_adv.h new file mode 100644 index 0000000000..4b3003f979 --- /dev/null +++ b/config/examples/Anet/A8plus/Configuration_adv.h @@ -0,0 +1,2418 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#define CONFIGURATION_ADV_H_VERSION 020000 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + +// +// Hephestos 2 24V heated bed upgrade kit. +// https://store.bq.com/en/heated-bed-kit-hephestos2 +// +//#define HEPHESTOS2_HEATED_BED_KIT +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #undef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 70 + #define HEATER_BED_INVERTING true +#endif + +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too + * long (period), the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway", increase + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) + //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 + #endif + + /** + * Whenever an M104, M109, or M303 increases the target temperature, the + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and + * requires a hard reset. This test restarts with any M104/M109/M303, but only + * if the current temperature is far enough below the target for a reliable + * test. + * + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set + * below 2. + */ + #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the bed are just as above for hotends. + */ +#if ENABLED(THERMAL_PROTECTION_BED) + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius + + /** + * As described above, except for the bed (M140/M190/M303). + */ + #define WATCH_BED_TEMP_PERIOD 60 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the heated chamber. + */ +#if ENABLED(THERMAL_PROTECTION_CHAMBER) + #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius + + /** + * Heated chamber watch settings (M141/M191). + */ + #define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds + #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +//#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show extra position information in M114 +//#define M114_DETAIL + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m) + #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm) +#endif + +// @section temperature + +// Calibration for AD595 / AD8495 sensor to adjust temperature measurements. +// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET. +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 1.0 +#define TEMP_SENSOR_AD8495_OFFSET 0.0 +#define TEMP_SENSOR_AD8495_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +/** + * PWM Fan Scaling + * + * Define the min/max speeds for PWM fans (as set with M106). + * + * With these options the M106 0-255 value range is scaled to a subset + * to ensure that the fan has enough power to spin, or to run lower + * current fans with higher current. (e.g., 5V/12V fans with 12V/24V) + * Value 0 always turns off the fan. + * + * Define one or both of these to override the default 0-255 range. + */ +//#define FAN_MIN_PWM 50 +//#define FAN_MAX_PWM 128 + +/** + * FAST PWM FAN Settings + * + * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h) + * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a + * frequency as close as possible to the desired frequency. + * + * FAST_PWM_FAN_FREQUENCY [undefined by default] + * Set this to your desired frequency. + * If left undefined this defaults to F = F_CPU/(2*255*1) + * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers + * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. + * + * USE_OCR2A_AS_TOP [undefined by default] + * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: + * 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz] + * 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz] + * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of + * PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.) + * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies. + */ +#if ENABLED(FAST_PWM_FAN) + //#define FAST_PWM_FAN_FREQUENCY 31400 + //#define USE_OCR2A_AS_TOP +#endif + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * Multiple extruders can be assigned to the same pin in which case + * the fan will turn on when any selected extruder is above the threshold. + */ +#define E0_AUTO_FAN_PIN -1 +#define E1_AUTO_FAN_PIN -1 +#define E2_AUTO_FAN_PIN -1 +#define E3_AUTO_FAN_PIN -1 +#define E4_AUTO_FAN_PIN -1 +#define E5_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 +#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + #endif +#endif + +//=========================================================================== +//============================ Mechanical Settings ========================== +//=========================================================================== + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +//#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +// Employ an external closed loop controller. Override pins here if needed. +//#define EXTERNAL_CLOSED_LOOP_CONTROLLER +#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) + //#define CLOSED_LOOP_ENABLE_PIN -1 + //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1 +#endif + +/** + * Dual Steppers / Dual Endstops + * + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes. + * + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'. + * + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error + * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'. + */ + +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions + //#define X_DUAL_ENDSTOPS + #if ENABLED(X_DUAL_ENDSTOPS) + #define X2_USE_ENDSTOP _XMAX_ + #define X_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions + //#define Y_DUAL_ENDSTOPS + #if ENABLED(Y_DUAL_ENDSTOPS) + #define Y2_USE_ENDSTOP _YMAX_ + #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_DUAL_STEPPER_DRIVERS +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + //#define Z_DUAL_ENDSTOPS + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_TRIPLE_STEPPER_DRIVERS +#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) + //#define Z_TRIPLE_ENDSTOPS + #if ENABLED(Z_TRIPLE_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z3_USE_ENDSTOP _YMAX_ + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0 + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0 + #endif +#endif + +/** + * Dual X Carriage + * + * This setup has two X carriages that can move independently, each with its own hotend. + * The carriages can be used to print an object with two colors or materials, or in + * "duplication mode" it can print two identical or X-mirrored objects simultaneously. + * The inactive carriage is parked automatically to prevent oozing. + * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. + * By default the X2 stepper is assigned to the first unused E plug on the board. + * + * The following Dual X Carriage modes can be selected with M605 S: + * + * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel + * results as long as it supports dual X-carriages. (M605 S0) + * + * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so + * that additional slicer support is not required. (M605 S1) + * + * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with + * the first X-carriage and extruder, to print 2 copies of the same object at the same time. + * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S2 to initiate duplicated movement. + * + * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates + * the movement of the first except the second extruder is reversed in the X axis. + * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S3 to initiate mirrored movement. + */ +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS + #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage + #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage + #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS. + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +// Homing hits each endstop, retracts by these distances, then does a slower bump. +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing + +// When G28 is called, this option will make Y home before X +//#define HOME_Y_BEFORE_X + +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + +/** + * Z Steppers Auto-Alignment + * Add the G34 command to align multiple Z steppers using a bed probe. + */ +//#define Z_STEPPER_AUTO_ALIGN +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + // Define probe X and Y positions for Z1, Z2 [, Z3] + #define Z_STEPPER_ALIGN_X { 10, 150, 290 } + #define Z_STEPPER_ALIGN_Y { 290, 10, 290 } + // Set number of iterations to align + #define Z_STEPPER_ALIGN_ITERATIONS 3 + // Enable to restore leveling setup after operation + #define RESTORE_LEVELING_AFTER_G34 + // Use the amplification factor to de-/increase correction step. + // In case the stepper (spindle) position is further out than the test point + // Use a value > 1. NOTE: This may cause instability + #define Z_STEPPER_ALIGN_AMP 1.0 + // Stop criterion. If the accuracy is better than this stop iterating early + #define Z_STEPPER_ALIGN_ACC 0.02 +#endif + +// @section machine + +#define AXIS_RELATIVE_MODES {false, false, false, false} + +// Add a Duplicate option for well-separated conjoined nozzles +//#define MULTI_NOZZLE_DUPLICATION + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if ENABLED(ULTIPANEL) + #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel + #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions + #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder +#endif + +// @section extras + +// minimum time in microseconds that a movement needs to take if the buffer is emptied. +#define DEFAULT_MINSEGMENTTIME 20000 + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s) + +// +// Backlash Compensation +// Adds extra movement to axes on direction-changes to account for backlash. +// +//#define BACKLASH_COMPENSATION +#if ENABLED(BACKLASH_COMPENSATION) + // Define values for backlash distance and correction. + // If BACKLASH_GCODE is enabled these values are the defaults. + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments + // to reduce print artifacts. (Enabling this is costly in memory and computation!) + //#define BACKLASH_SMOOTHING_MM 3 // (mm) + + // Add runtime configuration and tuning of backlash values (M425) + //#define BACKLASH_GCODE + + #if ENABLED(BACKLASH_GCODE) + // Measure the Z backlash when probing (G29) and set with "M425 Z" + #define MEASURE_BACKLASH_WHEN_PROBING + + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT + // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION + // increments while checking for the contact to be broken. + #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m) + #endif + #endif +#endif + +/** + * Automatic backlash, position and hotend offset calibration + * + * Enable G425 to run automatic calibration using an electrically- + * conductive cube, bolt, or washer mounted on the bed. + * + * G425 uses the probe to touch the top and sides of the calibration object + * on the bed and measures and/or correct positional offsets, axis backlash + * and hotend offsets. + * + * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within + * ±5mm of true values for G425 to succeed. + */ +//#define CALIBRATION_GCODE +#if ENABLED(CALIBRATION_GCODE) + + #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm + + #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m + #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m + #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m + + // The following parameters refer to the conical section of the nozzle tip. + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm + + // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). + //#define CALIBRATION_REPORTING + + // The true location and dimension the cube/bolt/washer on the bed. + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + + // Probing at the exact top center only works if the center is flat. If + // probing on a screwhead or hollow washer, probe near the edges. + //#define CALIBRATION_MEASURE_AT_TOP_EDGES + + // Define pin which is read during calibration + #ifndef CALIBRATION_PIN + #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop + #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin + //#define CALIBRATION_PIN_PULLDOWN + #define CALIBRATION_PIN_PULLUP + #endif +#endif + +/** + * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies + * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible + * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the + * lowest stepping frequencies. + */ +//#define ADAPTIVE_STEP_SMOOTHING + +/** + * Custom Microstepping + * Override as-needed for your setup. Up to 3 MS pins are supported. + */ +//#define MICROSTEP1 LOW,LOW,LOW +//#define MICROSTEP2 HIGH,LOW,LOW +//#define MICROSTEP4 LOW,HIGH,LOW +//#define MICROSTEP8 HIGH,HIGH,LOW +//#define MICROSTEP16 LOW,LOW,HIGH +//#define MICROSTEP32 HIGH,LOW,HIGH + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) +//#define DIGIPOT_I2C +#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A) + /** + * Common slave addresses: + * + * A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5 +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +// @section lcd + +// Change values more rapidly when the encoder is rotated faster +#define ENCODER_RATE_MULTIPLIER +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed + #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed +#endif + +// Play a beep when the feedrate is changed from the Status Screen +//#define BEEP_ON_FEEDRATE_CHANGE +#if ENABLED(BEEP_ON_FEEDRATE_CHANGE) + #define FEEDRATE_CHANGE_BEEP_DURATION 10 + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 +#endif + +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + +// Scroll a longer status message into view +//#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +//#define LCD_TIMEOUT_TO_STATUS 15000 + +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + +#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing + #if ENABLED(LCD_PROGRESS_BAR) + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever) + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar + #endif +#endif + +/** + * LED Control Menu + * Enable this feature to add LED Control to the LCD menu + */ +//#define LED_CONTROL_MENU +#if ENABLED(LED_CONTROL_MENU) + #define LED_COLOR_PRESETS // Enable the Preset Color menu option + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup + #endif +#endif // LED_CONTROL_MENU + +#if ENABLED(SDSUPPORT) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + //#define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place. + + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY\nG91\nG1 F1000 Z+20\nG1 F5000 Y" STRINGIFY(Y_MAX_POS) "\nG90\nM84 X Y E" // G-code to run on Stop Print (e.g., "G28XY" or "G27") + + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + #define POWER_LOSS_RECOVERY + #if ENABLED(POWER_LOSS_RECOVERY) + //#define POWER_LOSS_PIN 44 // Pin to detect power loss (optional) + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + #endif + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. + #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. + #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // This allows hosts to request long names for files and folders with M33 + //#define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ + //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + + /** + * This option makes it easier to print the same SD Card file again. + * On print completion the LCD Menu will open with the file selected. + * You can just click to start the print, or navigate elsewhere. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + + /** + * Support for USB thumb drives using an Arduino USB Host Shield or + * equivalent MAX3421E breakout board. The USB thumb drive will appear + * to Marlin as an SD card. + * + * The MAX3421E must be assigned the same pins as the SD card reader, with + * the following pin mapping: + * + * SCLK, MOSI, MISO --> SCLK, MOSI, MISO + * INT --> SD_DETECT_PIN + * SS --> SDSS + */ + //#define USB_FLASH_DRIVE_SUPPORT + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + #endif + + /** + * When using a bootloader that supports SD-Firmware-Flashing, + * add a menu item to activate SD-FW-Update on the next reboot. + * + * Requires ATMEGA2560 (Arduino Mega) + * + * Tested with this bootloader: + * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560 + */ + //#define SD_FIRMWARE_UPDATE + #if ENABLED(SD_FIRMWARE_UPDATE) + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0 + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF + #endif + + // Add an optimized binary file transfer mode, initiated with 'M28 B1' + //#define BINARY_FILE_TRANSFER + + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + +#endif // SDSUPPORT + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if HAS_GRAPHICAL_LCD + // Show SD percentage next to the progress bar + //#define DOGM_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE + + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. + */ + #if ENABLED(U8GLIB_ST7920) + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + + /** + * Status (Info) Screen customizations + * These options may affect code size and screen render time. + * Custom status screens can forcibly override these settings. + */ + //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones + //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends) + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM) + #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating + #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating + //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap + //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap + //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames + //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE + +#endif // HAS_GRAPHICAL_LCD + +// @section safety + +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ +#define USE_WATCHDOG +#if ENABLED(USE_WATCHDOG) + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +//#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_WITHOUT_HOMING + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion. + + //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + #define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. + #if ENABLED(MOVE_Z_WHEN_IDLE) + #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. + #endif + #endif + + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif +#endif + +// @section extruder + +/** + * Linear Pressure Control v1.5 + * + * Assumption: advance [steps] = k * (delta velocity [steps/s]) + * K=0 means advance disabled. + * + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions! + * + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak. + * Larger K values will be needed for flexible filament and greater distances. + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk) + * print acceleration will be reduced during the affected moves to keep within the limit. + * + * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. + * Mention @Sebastianv650 on GitHub to alert the author of any issues. + */ +//#define LIN_ADVANCE +#if ENABLED(LIN_ADVANCE) + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. +#endif + +// @section leveling + +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) +#endif + +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +//#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +/** + * G38 Probe Target + * + * This option adds G38.2 and G38.3 (probe towards target) + * and optionally G38.4 and G38.5 (probe away from target). + * Set MULTIPLE_PROBING for G38 to probe more than once. + */ +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + //#define G38_PROBE_AWAY // Include G38.4 and G38.5 to probe away from target + #define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move. +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +/** + * Minimum delay after setting the stepper DIR (in ns) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 400 : Minimum for A5984 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_DIR_DELAY 650 + +/** + * Minimum stepper driver pulse width (in µs) + * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers + * 2 : Minimum for DRV8825 stepper drivers + * 3 : Minimum for TB6600 stepper drivers + * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_PULSE 2 + +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MAXIMUM_STEPPER_RATE 250000 + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// For debug-echo: 128 bytes for the optimal speed. +// Other output doesn't need to be that speedy. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256] +#define TX_BUFFER_SIZE 0 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +//#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + //#define SERIAL_XON_XOFF +#endif + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +//#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +//#define ADVANCED_OK + +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + +// @section extras + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT +#if ENABLED(FWRETRACT) + #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM + #if ENABLED(FWRETRACT_AUTORETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #endif + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm) + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) + #if ENABLED(MIXING_EXTRUDER) + //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously + #endif +#endif + +/** + * Universal tool change settings. + * Applies to all types of extruders except where explicitly noted. + */ +#if EXTRUDERS > 1 + // Z raise distance for tool-change, as needed for some extruders + #define TOOLCHANGE_ZRAISE 2 // (mm) + + // Retract and prime filament on tool-change + //#define TOOLCHANGE_FILAMENT_SWAP + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm) + #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm) + #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m) + #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m) + #endif + + /** + * Position to park head during tool change. + * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER + */ + //#define TOOLCHANGE_PARK + #if ENABLED(TOOLCHANGE_PARK) + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 } + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m) + #endif +#endif + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * Requires NOZZLE_PARK_FEATURE. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +//#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. + // This short retract is done immediately, before parking the nozzle. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + // Set to 0 for manual unloading. + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. + #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading. + // Set to 0 for manual extrusion. + // Filament can be extruded repeatedly from the Filament Change menu + // until extrusion is consistent, and to purge old filament. + #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. + + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. + #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change + + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) +#endif + +// @section tmc + +/** + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper + */ +#if HAS_DRIVER(TMC26X) + + #if AXIS_DRIVER_TYPE_X(TMC26X) + #define X_MAX_CURRENT 1000 // (mA) + #define X_SENSE_RESISTOR 91 // (mOhms) + #define X_MICROSTEPS 16 // Number of microsteps + #endif + + #if AXIS_DRIVER_TYPE_X2(TMC26X) + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y(TMC26X) + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y2(TMC26X) + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z(TMC26X) + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z2(TMC26X) + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z3(TMC26X) + #define Z3_MAX_CURRENT 1000 + #define Z3_SENSE_RESISTOR 91 + #define Z3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E0(TMC26X) + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E1(TMC26X) + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E2(TMC26X) + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E3(TMC26X) + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E4(TMC26X) + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E5(TMC26X) + #define E5_MAX_CURRENT 1000 + #define E5_SENSE_RESISTOR 91 + #define E5_MICROSTEPS 16 + #endif + +#endif // TMC26X + +// @section tmc_smart + +/** + * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode + * connect your SPI pins to the hardware SPI interface on your board and define + * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 + * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + * You may also use software SPI if you wish to use general purpose IO pins. + * + * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN + * to the driver side PDN_UART pin with a 1K resistor. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without + * a resistor. + * The drivers can also be used with hardware serial. + * + * TMCStepper library is required to use TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper + */ +#if HAS_TRINAMIC + + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 + + #if AXIS_IS_TMC(X) + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_MICROSTEPS 16 // 0..256 + #define X_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(X2) + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 + #define X2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Y) + #define Y_CURRENT 800 + #define Y_MICROSTEPS 16 + #define Y_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Y2) + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 + #define Y2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z) + #define Z_CURRENT 800 + #define Z_MICROSTEPS 16 + #define Z_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z2) + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 + #define Z2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z3) + #define Z3_CURRENT 800 + #define Z3_MICROSTEPS 16 + #define Z3_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E0) + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 + #define E0_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E1) + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 + #define E1_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E2) + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 + #define E2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E3) + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 + #define E3_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E4) + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 + #define E4_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E5) + #define E5_CURRENT 800 + #define E5_MICROSTEPS 16 + #define E5_RSENSE 0.11 + #endif + + /** + * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. + * The default pins can be found in your board's pins file. + */ + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + + /** + * Use software SPI for TMC2130. + * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). + * The default SW SPI pins are defined the respective pins files, + * but you can override or define them here. + */ + //#define TMC_USE_SW_SPI + //#define TMC_SW_MOSI -1 + //#define TMC_SW_MISO -1 + //#define TMC_SW_SCK -1 + + /** + * Software enable + * + * Use for drivers that do not use a dedicated enable pin, but rather handle the same + * function through a communication line such as SPI or UART. + */ + //#define SOFTWARE_DRIVER_ENABLE + + /** + * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP_XY + #define STEALTHCHOP_Z + #define STEALTHCHOP_E + + /** + * Optimize spreadCycle chopper parameters by using predefined parameter sets + * or with the help of an example included in the library. + * Provided parameter sets are + * CHOPPER_DEFAULT_12V + * CHOPPER_DEFAULT_19V + * CHOPPER_DEFAULT_24V + * CHOPPER_DEFAULT_36V + * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Prusa firmware for MK3 (24V) + * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9 + * + * Define you own with + * { , , hysteresis_start[1..8] } + */ + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + + /** + * Monitor Trinamic drivers for error conditions, + * like overtemperature and short to ground. TMC2208 requires hardware serial. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 - Report driver parameters (Requires TMC_DEBUG) + */ + //#define MONITOR_DRIVER_STATUS + + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] + #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR + #endif + + /** + * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 + #define Z3_HYBRID_THRESHOLD 3 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + #define E5_HYBRID_THRESHOLD 30 + + /** + * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only + * Use StallGuard2 to sense an obstacle and trigger an endstop. + * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. + * X, Y, and Z homing will always be done in spreadCycle mode. + * + * X/Y/Z_STALL_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y/Z_HOME_BUMP_MM to 0. + * M914 X/Y/Z to live tune the setting + */ + //#define SENSORLESS_HOMING // TMC2130 only + + /** + * Use StallGuard2 to probe the bed with the nozzle. + * + * CAUTION: This could cause damage to machines that use a lead screw or threaded rod + * to move the Z axis. Take extreme care when attempting to enable this feature. + */ + //#define SENSORLESS_PROBING // TMC2130 only + + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + #define X_STALL_SENSITIVITY 8 + #define Y_STALL_SENSITIVITY 8 + //#define Z_STALL_SENSITIVITY 8 + #endif + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMCStepper + * + * Example: + * #define TMC_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperY.interpolate(0); \ + * } + */ + #define TMC_ADV() { } + +#endif // HAS_TRINAMIC + +// @section L6470 + +/** + * L6470 Stepper Driver options + * + * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 + * + * Requires the following to be defined in your pins_YOUR_BOARD file + * L6470_CHAIN_SCK_PIN + * L6470_CHAIN_MISO_PIN + * L6470_CHAIN_MOSI_PIN + * L6470_CHAIN_SS_PIN + * L6470_RESET_CHAIN_PIN (optional) + */ +#if HAS_DRIVER(L6470) + + //#define L6470_CHITCHAT // Display additional status info + + #if AXIS_DRIVER_TYPE_X(L6470) + #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) + #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down) + #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down) + #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper + #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI + #endif + + #if AXIS_DRIVER_TYPE_X2(L6470) + #define X2_MICROSTEPS 128 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + #define X2_MAX_VOLTAGE 127 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y(L6470) + #define Y_MICROSTEPS 128 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + #define Y_MAX_VOLTAGE 127 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y2(L6470) + #define Y2_MICROSTEPS 128 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + #define Y2_MAX_VOLTAGE 127 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z(L6470) + #define Z_MICROSTEPS 128 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + #define Z_MAX_VOLTAGE 127 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z2(L6470) + #define Z2_MICROSTEPS 128 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + #define Z2_MAX_VOLTAGE 127 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z3(L6470) + #define Z3_MICROSTEPS 128 + #define Z3_OVERCURRENT 2000 + #define Z3_STALLCURRENT 1500 + #define Z3_MAX_VOLTAGE 127 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E0(L6470) + #define E0_MICROSTEPS 128 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + #define E0_MAX_VOLTAGE 127 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E1(L6470) + #define E1_MICROSTEPS 128 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + #define E1_MAX_VOLTAGE 127 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E2(L6470) + #define E2_MICROSTEPS 128 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + #define E2_MAX_VOLTAGE 127 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E3(L6470) + #define E3_MICROSTEPS 128 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + #define E3_MAX_VOLTAGE 127 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E4(L6470) + #define E4_MICROSTEPS 128 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #define E4_MAX_VOLTAGE 127 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E5(L6470) + #define E5_MICROSTEPS 128 + #define E5_OVERCURRENT 2000 + #define E5_STALLCURRENT 1500 + #define E5_MAX_VOLTAGE 127 + #define E5_CHAIN_POS 0 + #endif + + /** + * Monitor L6470 drivers for error conditions like over temperature and over current. + * In the case of over temperature Marlin can decrease the drive until the error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given. + * I not present or I0 or I1 - X, Y, Z or E0 + * I2 - X2, Y2, Z2 or E1 + * I3 - Z3 or E3 + * I4 - E4 + * I5 - E5 + * M916 - Increase drive level until get thermal warning + * M917 - Find minimum current thresholds + * M918 - Increase speed until max or error + * M122 S0/1 - Report driver parameters + */ + //#define MONITOR_L6470_DRIVER_STATUS + + #if ENABLED(MONITOR_L6470_DRIVER_STATUS) + #define KVAL_HOLD_STEP_DOWN 1 + //#define L6470_STOP_ON_ERROR + #endif + +#endif // L6470 + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Photo G-code + * Add the M240 G-code to take a photo. + * The photo can be triggered by a digital pin or a physical movement. + */ +//#define PHOTO_GCODE +#if ENABLED(PHOTO_GCODE) + // A position to move to (and raise Z) before taking the photo + //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 } // { xpos, ypos, zraise } (M240 X Y Z) + //#define PHOTO_DELAY_MS 100 // (ms) Duration to pause before moving back (M240 P) + //#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S) + + // Canon RC-1 or homebrew digital camera trigger + // Data from: http://www.doc-diy.net/photo/rc-1_hacked/ + //#define PHOTOGRAPH_PIN 23 + + // Canon Hack Development Kit + // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ + //#define CHDK_PIN 4 + + // Optional second move with delay to trigger the camera shutter + //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS } // { xpos, ypos } (M240 I J) + + // Duration to hold the switch or keep CHDK_PIN high + //#define PHOTO_SWITCH_MS 50 // (ms) (M240 D) +#endif + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_LASER_ENABLE +#if ENABLED(SPINDLE_LASER_ENABLE) + + #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed + #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop + #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction + #define SPINDLE_INVERT_DIR false + #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + + //#define SPEED_POWER_SLOPE 0.3922 + //#define SPEED_POWER_INTERCEPT 0 + //#define SPEED_POWER_MIN 10 + //#define SPEED_POWER_MAX 100 // 0-100% +#endif + +/** + * Filament Width Sensor + * + * Measures the filament width in real-time and adjusts + * flow rate to compensate for any irregularities. + * + * Also allows the measured filament diameter to set the + * extrusion rate, so the slicer only has to specify the + * volume. + * + * Only a single extruder is supported at this time. + * + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 RAMBO : Analog input 3 + * + * Note: May require analog pins to be defined for other boards. + */ +//#define FILAMENT_WIDTH_SENSOR + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4] + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber + + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM. + + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially + + // Display filament width on the LCD status line. Status messages will expire after 5 seconds. + //#define FILAMENT_LCD_DISPLAY +#endif + +/** + * CNC Coordinate Systems + * + * Enables G53 and G54-G59.3 commands to select coordinate systems + * and G92.1 to reset the workspace to native machine space. + */ +//#define CNC_COORDINATE_SYSTEMS + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Disable all Volumetric extrusion options + */ +//#define NO_VOLUMETRICS + +#if DISABLED(NO_VOLUMETRICS) + /** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ + //#define VOLUMETRIC_DEFAULT_ON +#endif + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * CNC G-code options + * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc. + * Note that G0 feedrates should be used with care for 3D printing (if used at all). + * High feedrates may cause ringing and harm print quality. + */ +//#define PAREN_COMMENTS // Support for parentheses-delimited comments +//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc. + +// Enable and set a (default) feedrate for all G0 moves +//#define G0_FEEDRATE 3000 // (mm/m) +#ifdef G0_FEEDRATE + //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode +#endif + +/** + * G-code Macros + * + * Add G-codes M810-M819 to define and run G-code macros. + * Macros are not saved to EEPROM. + */ +//#define GCODE_MACROS +#if ENABLED(GCODE_MACROS) + #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used + #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro +#endif + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + //#define CUSTOM_USER_MENU_TITLE "Custom Commands" + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. + */ +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reliabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behavior. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display. + * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 + #define MAX7219_DIN_PIN 57 + #define MAX7219_LOAD_PIN 44 + + //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix + #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral) + #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain. + #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°) + // connector at: right=0 bottom=-90 top=90 left=180 + //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC +#if ENABLED(NANODLP_Z_SYNC) + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. + // Default behavior is limited to Z axis only. +#endif + +/** + * WiFi Support (Espressif ESP32 WiFi) + */ +//#define WIFISUPPORT +#if ENABLED(WIFISUPPORT) + #define WIFI_SSID "Wifi SSID" + #define WIFI_PWD "Wifi Password" + //#define WEBSUPPORT // Start a webserver with auto-discovery + //#define OTASUPPORT // Support over-the-air firmware updates +#endif + +/** + * Prusa Multi-Material Unit v2 + * Enable in Configuration.h + */ +#if ENABLED(PRUSA_MMU2) + + // Serial port used for communication with MMU2. + // For AVR enable the UART port used for the MMU. (e.g., internalSerial) + // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2) + #define INTERNAL_SERIAL_PORT 2 + #define MMU2_SERIAL internalSerial + + // Use hardware reset for MMU if a pin is defined for it + //#define MMU2_RST_PIN 23 + + // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) + //#define MMU2_MODE_12V + + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" + + // Add an LCD menu for MMU2 + //#define MMU2_MENUS + #if ENABLED(MMU2_MENUS) + // Settings for filament load / unload from the LCD menu. + // This is for Prusa MK3-style extruders. Customize for your hardware. + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ + { 7.2, 562 }, \ + { 14.4, 871 }, \ + { 36.0, 1393 }, \ + { 14.4, 871 }, \ + { 50.0, 198 } + + #define MMU2_RAMMING_SEQUENCE \ + { 1.0, 1000 }, \ + { 1.0, 1500 }, \ + { 2.0, 2000 }, \ + { 1.5, 3000 }, \ + { 2.5, 4000 }, \ + { -15.0, 5000 }, \ + { -14.0, 1200 }, \ + { -6.0, 600 }, \ + { 10.0, 700 }, \ + { -10.0, 400 }, \ + { -50.0, 2000 } + + #endif + + //#define MMU2_DEBUG // Write debug info to serial output + +#endif // PRUSA_MMU2 + +/** + * Advanced Print Counter settings + */ +#if ENABLED(PRINTCOUNTER) + #define SERVICE_WARNING_BUZZES 3 + // Activate up to 3 service interval watchdogs + //#define SERVICE_NAME_1 "Service S" + //#define SERVICE_INTERVAL_1 100 // print hours + //#define SERVICE_NAME_2 "Service L" + //#define SERVICE_INTERVAL_2 200 // print hours + //#define SERVICE_NAME_3 "Service 3" + //#define SERVICE_INTERVAL_3 1 // print hours +#endif + +// @section develop + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +//#define PINS_DEBUGGING + +// Enable Marlin dev mode which adds some special commands +//#define MARLIN_DEV_MODE diff --git a/config/examples/Anet/E16/Configuration.h b/config/examples/Anet/E16/Configuration.h new file mode 100644 index 0000000000..b8aad3efab --- /dev/null +++ b/config/examples/Anet/E16/Configuration.h @@ -0,0 +1,2144 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#define CONFIGURATION_H_VERSION 020000 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// config/examples/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// config/examples/SCARA and customize for your machine. +// + +// @section info + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_CONFIG_H_AUTHOR "InsanityAutomation" // Who made the changes. +#define SHOW_BOOTSCREEN +#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 +#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respectfully request that you retain the unmodified Marlin boot screen. + */ + +// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +#define SHOW_CUSTOM_BOOTSCREEN + +// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT 0 + +/** + * Select a secondary serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port -1 is the USB emulated serial port, if available. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +//#define SERIAL_PORT_2 -1 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 250000 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_ANET_10 +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +#define CUSTOM_MACHINE_NAME "AnetE16V1.3" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5, 6] +#define EXTRUDERS 1 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs + //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs +#endif + +/** + * Prusa Multi-Material Unit v2 + * + * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. + * Requires EXTRUDERS = 5 + * + * For additional configuration see Configuration_adv.h + */ +//#define PRUSA_MMU2 + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo) +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism using movements and no solenoid + * + * project : https://www.thingiverse.com/thing:3080893 + * movements : https://youtu.be/0xCEiG9VS3k + * https://youtu.be/Bqbcs0CU2FE + */ +//#define MAGNETIC_PARKING_EXTRUDER + +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #if ENABLED(PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined. + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + + #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point + #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple + #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point + #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling + + #endif + +#endif + +/** + * Switching Toolhead + * + * Support for swappable and dockable toolheads, such as + * the E3D Tool Changer. Toolheads are locked with a servo. + */ +//#define SWITCHING_TOOLHEAD + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif +#endif + +/** + * "Mixing Extruder" + * - Adds G-codes M163 and M164 to set and "commit" the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools. + * - This implementation supports up to two mixing extruders. + * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation). + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands + //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + #if ENABLED(GRADIENT_MIX) + //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias + #endif +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X {0.0, 20.00} // (mm) relative X-offset for each nozzle +//#define HOTEND_OFFSET_Y {0.0, 5.00} // (mm) relative Y-offset for each nozzle +//#define HOTEND_OFFSET_Z {0.0, 0.00} // (mm) relative Z-offset for each nozzle + +// @section machine + +/** + * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN + * + * 0 = No Power Switch + * 1 = ATX + * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) + * + * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' } + */ +#define POWER_SUPPLY 0 + +#if POWER_SUPPLY > 0 + // Enable this option to leave the PSU off at startup. + // Power to steppers and heaters will need to be turned on with M80. + //#define PS_DEFAULT_OFF + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN + #define POWER_TIMEOUT 30 + #endif + +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -4 : thermocouple with AD8495 + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 501 : 100K Zonestar (Tronxy X3A) Thermistor + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 20 : the PT100 circuit found in the Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 67 : 450C thermistor from SliceEngineering + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + */ +#define TEMP_SENSOR_0 5 +#define TEMP_SENSOR_1 0 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_5 0 +#define TEMP_SENSOR_BED 5 +#define TEMP_SENSOR_CHAMBER 0 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 +#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 +#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +// Below this temperature the heater will be switched off +// because it probably indicates a broken thermistor wire. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define HEATER_5_MINTEMP 5 +#define BED_MINTEMP 5 + +// Above this temperature the heater will be switched off. +// This can protect components from overheating, but NOT from shorts and failures. +// (Use MINTEMP for thermistor short/failure protection.) +#define HEATER_0_MAXTEMP 305 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define HEATER_5_MAXTEMP 275 +#define BED_MAXTEMP 120 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM) + //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Ultimaker + //#define DEFAULT_Kp 22.2 + //#define DEFAULT_Ki 1.08 + //#define DEFAULT_Kd 114 + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + + // ANET E16 Standard Extruder at 210 Degree Celsius and 100% Fan + //(measured after M106 S255 with M303 E0 S210 C8) + #define DEFAULT_Kp 21.0 + #define DEFAULT_Ki 1.25 + #define DEFAULT_Kd 86.0 + +#endif // PIDTEMP + +//=========================================================================== +//====================== PID > Bed Temperature Control ====================== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + //#define DEFAULT_bedKp 10.00 + //#define DEFAULT_bedKi .023 + //#define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // ANET E16 + // original Bed 4mm glass plate (PID-Autotune: M303 E-1 S60 C5): + #define DEFAULT_bedKp 295.00 + #define DEFAULT_bedKi 35.65 + #define DEFAULT_bedKd 610.21 + + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +/** + * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP. + * Add M302 to set the minimum extrusion temperature and/or turn + * cold extrusion prevention on and off. + * + * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** + */ +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 170 + +/** + * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. + * Note: For Bowden Extruders make this large enough to allow load/unload. + */ +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 200 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed +#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe. + +/** + * Stepper Drivers + * + * These settings allow Marlin to tune stepper driver timing and enable advanced options for + * stepper drivers that support them. You may also override timing options in Configuration_adv.h. + * + * A4988 is assumed for unspecified drivers. + * + * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE, + * TMC5160, TMC5160_STANDALONE + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] + */ +#define X_DRIVER_TYPE A4988 +#define Y_DRIVER_TYPE A4988 +#define Z_DRIVER_TYPE A4988 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +//#define Z3_DRIVER_TYPE A4988 +#define E0_DRIVER_TYPE A4988 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 +//#define E5_DRIVER_TYPE A4988 + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +//#define ENDSTOP_INTERRUPTS_FEATURE + +/** + * Endstop Noise Threshold + * + * Enable if your probe or endstops falsely trigger due to noise. + * + * - Higher values may affect repeatability or accuracy of some bed probes. + * - To fix noise install a 100nF ceramic capacitor inline with the switch. + * - This feature is not required for common micro-switches mounted on PCBs + * based on the Makerbot design, which already have the 100nF capacitor. + * + * :[2,3,4,5,6,7] + */ +//#define ENDSTOP_NOISE_THRESHOLD 2 + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 100, 100, 400, 100 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 300, 300, 50, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 2000, 2000, 100, 10000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 1000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves + +// +// Use Junction Deviation instead of traditional Jerk Limiting +// +#define JUNCTION_DEVIATION +#if ENABLED(JUNCTION_DEVIATION) + #define JUNCTION_DEVIATION_MM 0.08 // (mm) Distance from real junction edge +#endif + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#if DISABLED(JUNCTION_DEVIATION) + #define DEFAULT_XJERK 10.0 + #define DEFAULT_YJERK 10.0 + #define DEFAULT_ZJERK 0.3 +#endif + +#define DEFAULT_EJERK 5.0 // May be used by Linear Advance + +/** + * S-Curve Acceleration + * + * This option eliminates vibration during printing by fitting a Bézier + * curve to move acceleration, producing much smoother direction changes. + * + * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained + */ +//#define S_CURVE_ACCELERATION + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_PIN + * + * Define this pin if the probe is not connected to Z_MIN_PIN. + * If not defined the default pin for the selected MOTHERBOARD + * will be used. Most of the time the default is what you want. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + */ +//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +//#define PROBE_MANUALLY +//#define MANUAL_PROBE_START_Z 0.2 + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH +#if ENABLED(BLTOUCH) + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE +#endif + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice. +//#define RACK_AND_PINION_PROBE +#if ENABLED(RACK_AND_PINION_PROBE) + #define Z_PROBE_DEPLOY_X X_MIN_POS + #define Z_PROBE_RETRACT_X X_MAX_POS +#endif + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 10 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Feedrate (mm/m) for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +// The number of probes to perform at each point. +// Set to 2 for a fast/slow probe, using the second probe result. +// Set to 3 or more for slow probes, averaging the results. +//#define MULTIPLE_PROBING 2 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. + */ +#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes +//#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// Before deploy/stow pause for user confirmation +//#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR false +#define INVERT_Y_DIR true +#define INVERT_Z_DIR true + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false +#define INVERT_E5_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +#define X_BED_SIZE 300 +#define Y_BED_SIZE 300 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS -2 +#define Y_MIN_POS -23 +#define Z_MIN_POS 0 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS 400 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * RAMPS-based boards use SERVO3_PIN for the first runout sensor. + * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +//#define FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) + #define FILAMENT_RUNOUT_SCRIPT "M600" + + // After a runout is detected, continue printing this length of filament + // before executing the runout script. Useful for a sensor at the end of + // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. + //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + // Enable this option to use an encoder disc that toggles the runout pin + // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM + // large enough to avoid false positives.) + //#define FILAMENT_MOTION_SENSOR + #endif +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +//#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + //#define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#define G26_MESH_VALIDATION + #if ENABLED(G26_MESH_VALIDATION) + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool. + #endif + +#endif + +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE)) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE)) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + + #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment + //#define MESH_EDIT_MENU // Add a menu to edit mesh points +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// Manually set the home position. Leave these undefined for automatic settings. +// For DELTA this is the top-center of the Cartesian print volume. +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_Z (4*60) + +// Validate that endstops are triggered on homing moves +#define VALIDATE_HOMING_ENDSTOPS + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 + #endif + + // Enable this option for M852 to set skew at runtime + //#define SKEW_CORRECTION_GCODE +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + #define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_LABEL "PLA" +#define PREHEAT_1_TEMP_HOTEND 180 +#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_LABEL "ABS" +#define PREHEAT_2_TEMP_HOTEND 240 +#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * P1 Raise the nozzle always to Z-park height. + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. + */ +#define NOZZLE_PARK_FEATURE + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z_raise } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MIN_POS + 10), 10 } + #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +//#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Moves the nozzle to the initial position + #define NOZZLE_CLEAN_GOBACK +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +//#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, + * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * Info Screen Style (0:Classic, 1:Prusa) + * + * :[0:'Classic', 1:'Prusa'] + */ +#define LCD_INFO_SCREEN_STYLE 0 + +/** + * SD CARD + * + * SD Card support is disabled by default. If your controller has an SD slot, + * you must uncomment the following option or it won't work. + * + */ +#define SDSUPPORT + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +/** + * LCD Menu Items + * + * Disable all menus and only display the Status Screen, or + * just remove some extraneous menu items to recover space. + */ +//#define NO_LCD_MENUS +//#define SLIM_LCD_MENUS + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +//#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +//#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// If you have a speaker that can produce tones, enable it here. +// By default Marlin assumes you have a buzzer with a fixed frequency. +// +//#define SPEAKER + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//======================== (Character-based LCDs) ========================= +//============================================================================= + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// Original RADDS LCD Display+Encoder+SDCardReader +// http://doku.radds.org/dokumentation/lcd-display/ +// +//#define RADDS_DISPLAY + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// ANET and Tronxy 20x4 Controller +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +// +// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD. +// +//#define ULTRA_LCD + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//===================== (I2C and Shift-Register LCDs) ===================== +//============================================================================= + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// CONTROLLER TYPE: Shift register panels +// + +// +// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// 3-wire SR LCD with strobe using 74HC4094 +// https://github.com/mikeshub/SailfishLCD +// Uses the code directly from Sailfish +// +//#define FF_INTERFACEBOARD + +//============================================================================= +//======================= LCD / Controller Selection ======================= +//========================= (Graphical LCDs) ======================== +//============================================================================= + +// +// CONTROLLER TYPE: Graphical 128x64 (DOGM) +// +// IMPORTANT: The U8glib library is required for Graphical Display! +// https://github.com/olikraus/U8glib_Arduino +// + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// MKS MINI12864 with graphic controller and SD support +// http://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// ANET and Tronxy Graphical Controller +// +// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 +// A clone of the RepRapDiscount full graphics display but with +// different pins/wiring (see pins_ANET_10.h). +// +//#define ANET_FULL_GRAPHICS_LCD + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// AZSMZ 12864 LCD with SD +// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html +// +//#define AZSMZ_12864 + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + +//============================================================================= +//=============================== Graphical TFTs ============================== +//============================================================================= + +// +// MKS Robin 320x240 color display +// +//#define MKS_ROBIN_TFT + +//============================================================================= +//============================ Other Controllers ============================ +//============================================================================= + +// +// CONTROLLER TYPE: Standalone / Serial +// + +// +// LCD for Malyan M200 printers. +// +//#define MALYAN_LCD + +// +// CONTROLLER TYPE: Keypad / Add-on +// + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +// Support for PCA9533 PWM LED driver +// https://github.com/mikeshub/SailfishRGB_LED +//#define PCA9533 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOSFET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300 } + +// Only power servos during movement, otherwise leave off to prevent jitter +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES diff --git a/config/examples/Anet/E16/Configuration_adv.h b/config/examples/Anet/E16/Configuration_adv.h new file mode 100644 index 0000000000..5ef03528bd --- /dev/null +++ b/config/examples/Anet/E16/Configuration_adv.h @@ -0,0 +1,2420 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#define CONFIGURATION_ADV_H_VERSION 020000 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + +// +// Hephestos 2 24V heated bed upgrade kit. +// https://store.bq.com/en/heated-bed-kit-hephestos2 +// +//#define HEPHESTOS2_HEATED_BED_KIT +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #undef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 70 + #define HEATER_BED_INVERTING true +#endif + +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too + * long (period), the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway", increase + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 12 // Degrees Celsius + + #define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) + #define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 + #endif + + /** + * Whenever an M104, M109, or M303 increases the target temperature, the + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and + * requires a hard reset. This test restarts with any M104/M109/M303, but only + * if the current temperature is far enough below the target for a reliable + * test. + * + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set + * below 2. + */ + #define WATCH_TEMP_PERIOD 30 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the bed are just as above for hotends. + */ +#if ENABLED(THERMAL_PROTECTION_BED) + #define THERMAL_PROTECTION_BED_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 5 // Degrees Celsius + + /** + * As described above, except for the bed (M140/M190/M303). + */ + #define WATCH_BED_TEMP_PERIOD 80 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the heated chamber. + */ +#if ENABLED(THERMAL_PROTECTION_CHAMBER) + #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius + + /** + * Heated chamber watch settings (M141/M191). + */ + #define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds + #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +//#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show extra position information in M114 +//#define M114_DETAIL + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m) + #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm) +#endif + +// @section temperature + +// Calibration for AD595 / AD8495 sensor to adjust temperature measurements. +// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET. +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 1.0 +#define TEMP_SENSOR_AD8495_OFFSET 0.0 +#define TEMP_SENSOR_AD8495_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +/** + * PWM Fan Scaling + * + * Define the min/max speeds for PWM fans (as set with M106). + * + * With these options the M106 0-255 value range is scaled to a subset + * to ensure that the fan has enough power to spin, or to run lower + * current fans with higher current. (e.g., 5V/12V fans with 12V/24V) + * Value 0 always turns off the fan. + * + * Define one or both of these to override the default 0-255 range. + */ +//#define FAN_MIN_PWM 50 +//#define FAN_MAX_PWM 128 + +/** + * FAST PWM FAN Settings + * + * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h) + * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a + * frequency as close as possible to the desired frequency. + * + * FAST_PWM_FAN_FREQUENCY [undefined by default] + * Set this to your desired frequency. + * If left undefined this defaults to F = F_CPU/(2*255*1) + * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers + * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. + * + * USE_OCR2A_AS_TOP [undefined by default] + * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: + * 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz] + * 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz] + * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of + * PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.) + * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies. + */ +#if ENABLED(FAST_PWM_FAN) + //#define FAST_PWM_FAN_FREQUENCY 31400 + //#define USE_OCR2A_AS_TOP +#endif + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * Multiple extruders can be assigned to the same pin in which case + * the fan will turn on when any selected extruder is above the threshold. + */ +#define E0_AUTO_FAN_PIN -1 +#define E1_AUTO_FAN_PIN -1 +#define E2_AUTO_FAN_PIN -1 +#define E3_AUTO_FAN_PIN -1 +#define E4_AUTO_FAN_PIN -1 +#define E5_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 +#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + #endif +#endif + +//=========================================================================== +//============================ Mechanical Settings ========================== +//=========================================================================== + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +//#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +// Employ an external closed loop controller. Override pins here if needed. +//#define EXTERNAL_CLOSED_LOOP_CONTROLLER +#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) + //#define CLOSED_LOOP_ENABLE_PIN -1 + //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1 +#endif + +/** + * Dual Steppers / Dual Endstops + * + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes. + * + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'. + * + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error + * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'. + */ + +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions + //#define X_DUAL_ENDSTOPS + #if ENABLED(X_DUAL_ENDSTOPS) + #define X2_USE_ENDSTOP _XMAX_ + #define X_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions + //#define Y_DUAL_ENDSTOPS + #if ENABLED(Y_DUAL_ENDSTOPS) + #define Y2_USE_ENDSTOP _YMAX_ + #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_DUAL_STEPPER_DRIVERS +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + //#define Z_DUAL_ENDSTOPS + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_TRIPLE_STEPPER_DRIVERS +#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) + //#define Z_TRIPLE_ENDSTOPS + #if ENABLED(Z_TRIPLE_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z3_USE_ENDSTOP _YMAX_ + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0 + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0 + #endif +#endif + +/** + * Dual X Carriage + * + * This setup has two X carriages that can move independently, each with its own hotend. + * The carriages can be used to print an object with two colors or materials, or in + * "duplication mode" it can print two identical or X-mirrored objects simultaneously. + * The inactive carriage is parked automatically to prevent oozing. + * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. + * By default the X2 stepper is assigned to the first unused E plug on the board. + * + * The following Dual X Carriage modes can be selected with M605 S: + * + * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel + * results as long as it supports dual X-carriages. (M605 S0) + * + * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so + * that additional slicer support is not required. (M605 S1) + * + * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with + * the first X-carriage and extruder, to print 2 copies of the same object at the same time. + * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S2 to initiate duplicated movement. + * + * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates + * the movement of the first except the second extruder is reversed in the X axis. + * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S3 to initiate mirrored movement. + */ +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS + #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage + #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage + #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS. + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +// Homing hits each endstop, retracts by these distances, then does a slower bump. +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing + +// When G28 is called, this option will make Y home before X +//#define HOME_Y_BEFORE_X + +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + +/** + * Z Steppers Auto-Alignment + * Add the G34 command to align multiple Z steppers using a bed probe. + */ +//#define Z_STEPPER_AUTO_ALIGN +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + // Define probe X and Y positions for Z1, Z2 [, Z3] + #define Z_STEPPER_ALIGN_X { 10, 150, 290 } + #define Z_STEPPER_ALIGN_Y { 290, 10, 290 } + // Set number of iterations to align + #define Z_STEPPER_ALIGN_ITERATIONS 3 + // Enable to restore leveling setup after operation + #define RESTORE_LEVELING_AFTER_G34 + // Use the amplification factor to de-/increase correction step. + // In case the stepper (spindle) position is further out than the test point + // Use a value > 1. NOTE: This may cause instability + #define Z_STEPPER_ALIGN_AMP 1.0 + // Stop criterion. If the accuracy is better than this stop iterating early + #define Z_STEPPER_ALIGN_ACC 0.02 +#endif + +// @section machine + +#define AXIS_RELATIVE_MODES {false, false, false, false} + +// Add a Duplicate option for well-separated conjoined nozzles +//#define MULTI_NOZZLE_DUPLICATION + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) + #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) + #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions + #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder +#endif + +// @section extras + +// minimum time in microseconds that a movement needs to take if the buffer is emptied. +#define DEFAULT_MINSEGMENTTIME 20000 + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s) + +// +// Backlash Compensation +// Adds extra movement to axes on direction-changes to account for backlash. +// +//#define BACKLASH_COMPENSATION +#if ENABLED(BACKLASH_COMPENSATION) + // Define values for backlash distance and correction. + // If BACKLASH_GCODE is enabled these values are the defaults. + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments + // to reduce print artifacts. (Enabling this is costly in memory and computation!) + //#define BACKLASH_SMOOTHING_MM 3 // (mm) + + // Add runtime configuration and tuning of backlash values (M425) + //#define BACKLASH_GCODE + + #if ENABLED(BACKLASH_GCODE) + // Measure the Z backlash when probing (G29) and set with "M425 Z" + #define MEASURE_BACKLASH_WHEN_PROBING + + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT + // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION + // increments while checking for the contact to be broken. + #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m) + #endif + #endif +#endif + +/** + * Automatic backlash, position and hotend offset calibration + * + * Enable G425 to run automatic calibration using an electrically- + * conductive cube, bolt, or washer mounted on the bed. + * + * G425 uses the probe to touch the top and sides of the calibration object + * on the bed and measures and/or correct positional offsets, axis backlash + * and hotend offsets. + * + * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within + * ±5mm of true values for G425 to succeed. + */ +//#define CALIBRATION_GCODE +#if ENABLED(CALIBRATION_GCODE) + + #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm + + #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m + #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m + #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m + + // The following parameters refer to the conical section of the nozzle tip. + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm + + // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). + //#define CALIBRATION_REPORTING + + // The true location and dimension the cube/bolt/washer on the bed. + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + + // Probing at the exact top center only works if the center is flat. If + // probing on a screwhead or hollow washer, probe near the edges. + //#define CALIBRATION_MEASURE_AT_TOP_EDGES + + // Define pin which is read during calibration + #ifndef CALIBRATION_PIN + #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop + #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin + //#define CALIBRATION_PIN_PULLDOWN + #define CALIBRATION_PIN_PULLUP + #endif +#endif + +/** + * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies + * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible + * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the + * lowest stepping frequencies. + */ +//#define ADAPTIVE_STEP_SMOOTHING + +/** + * Custom Microstepping + * Override as-needed for your setup. Up to 3 MS pins are supported. + */ +//#define MICROSTEP1 LOW,LOW,LOW +//#define MICROSTEP2 HIGH,LOW,LOW +//#define MICROSTEP4 LOW,HIGH,LOW +//#define MICROSTEP8 HIGH,HIGH,LOW +//#define MICROSTEP16 LOW,LOW,HIGH +//#define MICROSTEP32 HIGH,LOW,HIGH + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) +//#define DIGIPOT_I2C +#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A) + /** + * Common slave addresses: + * + * A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5 +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +// @section lcd + +// Change values more rapidly when the encoder is rotated faster +#define ENCODER_RATE_MULTIPLIER +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed + #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed +#endif + +// Play a beep when the feedrate is changed from the Status Screen +//#define BEEP_ON_FEEDRATE_CHANGE +#if ENABLED(BEEP_ON_FEEDRATE_CHANGE) + #define FEEDRATE_CHANGE_BEEP_DURATION 10 + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 +#endif + +// Include a page of printer information in the LCD Main Menu +#define LCD_INFO_MENU + +// Scroll a longer status message into view +//#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +#define LCD_TIMEOUT_TO_STATUS 15000 + +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + +#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing + #if ENABLED(LCD_PROGRESS_BAR) + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever) + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar + #endif +#endif + +/** + * LED Control Menu + * Enable this feature to add LED Control to the LCD menu + */ +//#define LED_CONTROL_MENU +#if ENABLED(LED_CONTROL_MENU) + #define LED_COLOR_PRESETS // Enable the Preset Color menu option + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup + #endif +#endif // LED_CONTROL_MENU + +#if ENABLED(SDSUPPORT) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place. + + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + //#define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") + + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + #if ENABLED(POWER_LOSS_RECOVERY) + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + #endif + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. + #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. + #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // This allows hosts to request long names for files and folders with M33 + #define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ + //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + + /** + * This option makes it easier to print the same SD Card file again. + * On print completion the LCD Menu will open with the file selected. + * You can just click to start the print, or navigate elsewhere. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + + /** + * Support for USB thumb drives using an Arduino USB Host Shield or + * equivalent MAX3421E breakout board. The USB thumb drive will appear + * to Marlin as an SD card. + * + * The MAX3421E must be assigned the same pins as the SD card reader, with + * the following pin mapping: + * + * SCLK, MOSI, MISO --> SCLK, MOSI, MISO + * INT --> SD_DETECT_PIN + * SS --> SDSS + */ + //#define USB_FLASH_DRIVE_SUPPORT + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + #endif + + /** + * When using a bootloader that supports SD-Firmware-Flashing, + * add a menu item to activate SD-FW-Update on the next reboot. + * + * Requires ATMEGA2560 (Arduino Mega) + * + * Tested with this bootloader: + * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560 + */ + //#define SD_FIRMWARE_UPDATE + #if ENABLED(SD_FIRMWARE_UPDATE) + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0 + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF + #endif + + // Add an optimized binary file transfer mode, initiated with 'M28 B1' + //#define BINARY_FILE_TRANSFER + + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + +#endif // SDSUPPORT + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if HAS_GRAPHICAL_LCD + // Show SD percentage next to the progress bar + //#define DOGM_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE + + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. + */ + #if ENABLED(U8GLIB_ST7920) + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + + /** + * Status (Info) Screen customizations + * These options may affect code size and screen render time. + * Custom status screens can forcibly override these settings. + */ + //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones + //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends) + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM) + #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating + #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating + //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap + //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap + //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames + //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + #define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE + +#endif // HAS_GRAPHICAL_LCD + +// @section safety + +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ +#define USE_WATCHDOG +#if ENABLED(USE_WATCHDOG) + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_WITHOUT_HOMING + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion. + + #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + #define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. + #if ENABLED(MOVE_Z_WHEN_IDLE) + #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. + #endif + #endif + + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets + #define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif +#endif + +// @section extruder + +/** + * Linear Pressure Control v1.5 + * + * Assumption: advance [steps] = k * (delta velocity [steps/s]) + * K=0 means advance disabled. + * + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions! + * + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak. + * Larger K values will be needed for flexible filament and greater distances. + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk) + * print acceleration will be reduced during the affected moves to keep within the limit. + * + * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. + * Mention @Sebastianv650 on GitHub to alert the author of any issues. + */ +//#define LIN_ADVANCE +#if ENABLED(LIN_ADVANCE) + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. +#endif + +// @section leveling + +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) +#endif + +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +//#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +/** + * G38 Probe Target + * + * This option adds G38.2 and G38.3 (probe towards target) + * and optionally G38.4 and G38.5 (probe away from target). + * Set MULTIPLE_PROBING for G38 to probe more than once. + */ +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + //#define G38_PROBE_AWAY // Include G38.4 and G38.5 to probe away from target + #define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move. +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +/** + * Minimum delay after setting the stepper DIR (in ns) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 400 : Minimum for A5984 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_DIR_DELAY 650 + +/** + * Minimum stepper driver pulse width (in µs) + * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers + * 2 : Minimum for DRV8825 stepper drivers + * 3 : Minimum for TB6600 stepper drivers + * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_PULSE 2 + +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MAXIMUM_STEPPER_RATE 250000 + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// For debug-echo: 128 bytes for the optimal speed. +// Other output doesn't need to be that speedy. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256] +#define TX_BUFFER_SIZE 0 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +//#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + //#define SERIAL_XON_XOFF +#endif + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +#define ADVANCED_OK + +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + +// @section extras + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT +#if ENABLED(FWRETRACT) + #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM + #if ENABLED(FWRETRACT_AUTORETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #endif + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm) + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) + #if ENABLED(MIXING_EXTRUDER) + //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously + #endif +#endif + +/** + * Universal tool change settings. + * Applies to all types of extruders except where explicitly noted. + */ +#if EXTRUDERS > 1 + // Z raise distance for tool-change, as needed for some extruders + #define TOOLCHANGE_ZRAISE 2 // (mm) + + // Retract and prime filament on tool-change + //#define TOOLCHANGE_FILAMENT_SWAP + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm) + #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm) + #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m) + #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m) + #endif + + /** + * Position to park head during tool change. + * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER + */ + //#define TOOLCHANGE_PARK + #if ENABLED(TOOLCHANGE_PARK) + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 } + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m) + #endif +#endif + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * Requires NOZZLE_PARK_FEATURE. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. + // This short retract is done immediately, before parking the nozzle. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + // Set to 0 for manual unloading. + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. + #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading. + // Set to 0 for manual extrusion. + // Filament can be extruded repeatedly from the Filament Change menu + // until extrusion is consistent, and to purge old filament. + #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + #define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. + + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. + #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change + + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) +#endif + +// @section tmc + +/** + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper + */ +#if HAS_DRIVER(TMC26X) + + #if AXIS_DRIVER_TYPE_X(TMC26X) + #define X_MAX_CURRENT 1000 // (mA) + #define X_SENSE_RESISTOR 91 // (mOhms) + #define X_MICROSTEPS 16 // Number of microsteps + #endif + + #if AXIS_DRIVER_TYPE_X2(TMC26X) + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y(TMC26X) + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y2(TMC26X) + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z(TMC26X) + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z2(TMC26X) + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z3(TMC26X) + #define Z3_MAX_CURRENT 1000 + #define Z3_SENSE_RESISTOR 91 + #define Z3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E0(TMC26X) + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E1(TMC26X) + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E2(TMC26X) + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E3(TMC26X) + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E4(TMC26X) + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E5(TMC26X) + #define E5_MAX_CURRENT 1000 + #define E5_SENSE_RESISTOR 91 + #define E5_MICROSTEPS 16 + #endif + +#endif // TMC26X + +// @section tmc_smart + +/** + * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode + * connect your SPI pins to the hardware SPI interface on your board and define + * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 + * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + * You may also use software SPI if you wish to use general purpose IO pins. + * + * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN + * to the driver side PDN_UART pin with a 1K resistor. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without + * a resistor. + * The drivers can also be used with hardware serial. + * + * TMCStepper library is required to use TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper + */ +#if HAS_TRINAMIC + + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 + + #if AXIS_IS_TMC(X) + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_MICROSTEPS 16 // 0..256 + #define X_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(X2) + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 + #define X2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Y) + #define Y_CURRENT 800 + #define Y_MICROSTEPS 16 + #define Y_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Y2) + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 + #define Y2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z) + #define Z_CURRENT 800 + #define Z_MICROSTEPS 16 + #define Z_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z2) + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 + #define Z2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z3) + #define Z3_CURRENT 800 + #define Z3_MICROSTEPS 16 + #define Z3_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E0) + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 + #define E0_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E1) + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 + #define E1_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E2) + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 + #define E2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E3) + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 + #define E3_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E4) + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 + #define E4_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E5) + #define E5_CURRENT 800 + #define E5_MICROSTEPS 16 + #define E5_RSENSE 0.11 + #endif + + /** + * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. + * The default pins can be found in your board's pins file. + */ + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + + /** + * Use software SPI for TMC2130. + * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). + * The default SW SPI pins are defined the respective pins files, + * but you can override or define them here. + */ + //#define TMC_USE_SW_SPI + //#define TMC_SW_MOSI -1 + //#define TMC_SW_MISO -1 + //#define TMC_SW_SCK -1 + + /** + * Software enable + * + * Use for drivers that do not use a dedicated enable pin, but rather handle the same + * function through a communication line such as SPI or UART. + */ + //#define SOFTWARE_DRIVER_ENABLE + + /** + * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP_XY + #define STEALTHCHOP_Z + #define STEALTHCHOP_E + + /** + * Optimize spreadCycle chopper parameters by using predefined parameter sets + * or with the help of an example included in the library. + * Provided parameter sets are + * CHOPPER_DEFAULT_12V + * CHOPPER_DEFAULT_19V + * CHOPPER_DEFAULT_24V + * CHOPPER_DEFAULT_36V + * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Prusa firmware for MK3 (24V) + * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9 + * + * Define you own with + * { , , hysteresis_start[1..8] } + */ + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + + /** + * Monitor Trinamic drivers for error conditions, + * like overtemperature and short to ground. TMC2208 requires hardware serial. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 - Report driver parameters (Requires TMC_DEBUG) + */ + //#define MONITOR_DRIVER_STATUS + + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] + #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR + #endif + + /** + * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 + #define Z3_HYBRID_THRESHOLD 3 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + #define E5_HYBRID_THRESHOLD 30 + + /** + * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only + * Use StallGuard2 to sense an obstacle and trigger an endstop. + * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. + * X, Y, and Z homing will always be done in spreadCycle mode. + * + * X/Y/Z_STALL_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y/Z_HOME_BUMP_MM to 0. + * M914 X/Y/Z to live tune the setting + */ + //#define SENSORLESS_HOMING // TMC2130 only + + /** + * Use StallGuard2 to probe the bed with the nozzle. + * + * CAUTION: This could cause damage to machines that use a lead screw or threaded rod + * to move the Z axis. Take extreme care when attempting to enable this feature. + */ + //#define SENSORLESS_PROBING // TMC2130 only + + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + #define X_STALL_SENSITIVITY 8 + #define Y_STALL_SENSITIVITY 8 + //#define Z_STALL_SENSITIVITY 8 + #endif + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMCStepper + * + * Example: + * #define TMC_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperY.interpolate(0); \ + * } + */ + #define TMC_ADV() { } + +#endif // HAS_TRINAMIC + +// @section L6470 + +/** + * L6470 Stepper Driver options + * + * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 + * + * Requires the following to be defined in your pins_YOUR_BOARD file + * L6470_CHAIN_SCK_PIN + * L6470_CHAIN_MISO_PIN + * L6470_CHAIN_MOSI_PIN + * L6470_CHAIN_SS_PIN + * L6470_RESET_CHAIN_PIN (optional) + */ +#if HAS_DRIVER(L6470) + + //#define L6470_CHITCHAT // Display additional status info + + #if AXIS_DRIVER_TYPE_X(L6470) + #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) + #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down) + #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down) + #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper + #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI + #endif + + #if AXIS_DRIVER_TYPE_X2(L6470) + #define X2_MICROSTEPS 128 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + #define X2_MAX_VOLTAGE 127 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y(L6470) + #define Y_MICROSTEPS 128 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + #define Y_MAX_VOLTAGE 127 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y2(L6470) + #define Y2_MICROSTEPS 128 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + #define Y2_MAX_VOLTAGE 127 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z(L6470) + #define Z_MICROSTEPS 128 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + #define Z_MAX_VOLTAGE 127 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z2(L6470) + #define Z2_MICROSTEPS 128 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + #define Z2_MAX_VOLTAGE 127 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z3(L6470) + #define Z3_MICROSTEPS 128 + #define Z3_OVERCURRENT 2000 + #define Z3_STALLCURRENT 1500 + #define Z3_MAX_VOLTAGE 127 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E0(L6470) + #define E0_MICROSTEPS 128 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + #define E0_MAX_VOLTAGE 127 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E1(L6470) + #define E1_MICROSTEPS 128 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + #define E1_MAX_VOLTAGE 127 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E2(L6470) + #define E2_MICROSTEPS 128 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + #define E2_MAX_VOLTAGE 127 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E3(L6470) + #define E3_MICROSTEPS 128 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + #define E3_MAX_VOLTAGE 127 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E4(L6470) + #define E4_MICROSTEPS 128 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #define E4_MAX_VOLTAGE 127 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E5(L6470) + #define E5_MICROSTEPS 128 + #define E5_OVERCURRENT 2000 + #define E5_STALLCURRENT 1500 + #define E5_MAX_VOLTAGE 127 + #define E5_CHAIN_POS 0 + #endif + + /** + * Monitor L6470 drivers for error conditions like over temperature and over current. + * In the case of over temperature Marlin can decrease the drive until the error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given. + * I not present or I0 or I1 - X, Y, Z or E0 + * I2 - X2, Y2, Z2 or E1 + * I3 - Z3 or E3 + * I4 - E4 + * I5 - E5 + * M916 - Increase drive level until get thermal warning + * M917 - Find minimum current thresholds + * M918 - Increase speed until max or error + * M122 S0/1 - Report driver parameters + */ + //#define MONITOR_L6470_DRIVER_STATUS + + #if ENABLED(MONITOR_L6470_DRIVER_STATUS) + #define KVAL_HOLD_STEP_DOWN 1 + //#define L6470_STOP_ON_ERROR + #endif + +#endif // L6470 + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Photo G-code + * Add the M240 G-code to take a photo. + * The photo can be triggered by a digital pin or a physical movement. + */ +//#define PHOTO_GCODE +#if ENABLED(PHOTO_GCODE) + // A position to move to (and raise Z) before taking the photo + //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 } // { xpos, ypos, zraise } (M240 X Y Z) + //#define PHOTO_DELAY_MS 100 // (ms) Duration to pause before moving back (M240 P) + //#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S) + + // Canon RC-1 or homebrew digital camera trigger + // Data from: http://www.doc-diy.net/photo/rc-1_hacked/ + //#define PHOTOGRAPH_PIN 23 + + // Canon Hack Development Kit + // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ + //#define CHDK_PIN 4 + + // Optional second move with delay to trigger the camera shutter + //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS } // { xpos, ypos } (M240 I J) + + // Duration to hold the switch or keep CHDK_PIN high + //#define PHOTO_SWITCH_MS 50 // (ms) (M240 D) +#endif + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_LASER_ENABLE +#if ENABLED(SPINDLE_LASER_ENABLE) + + #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed + #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop + #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction + #define SPINDLE_INVERT_DIR false + #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + + //#define SPEED_POWER_SLOPE 0.3922 + //#define SPEED_POWER_INTERCEPT 0 + //#define SPEED_POWER_MIN 10 + //#define SPEED_POWER_MAX 100 // 0-100% +#endif + +/** + * Filament Width Sensor + * + * Measures the filament width in real-time and adjusts + * flow rate to compensate for any irregularities. + * + * Also allows the measured filament diameter to set the + * extrusion rate, so the slicer only has to specify the + * volume. + * + * Only a single extruder is supported at this time. + * + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 RAMBO : Analog input 3 + * + * Note: May require analog pins to be defined for other boards. + */ +//#define FILAMENT_WIDTH_SENSOR + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4] + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber + + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM. + + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially + + // Display filament width on the LCD status line. Status messages will expire after 5 seconds. + //#define FILAMENT_LCD_DISPLAY +#endif + +/** + * CNC Coordinate Systems + * + * Enables G53 and G54-G59.3 commands to select coordinate systems + * and G92.1 to reset the workspace to native machine space. + */ +//#define CNC_COORDINATE_SYSTEMS + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Disable all Volumetric extrusion options + */ +//#define NO_VOLUMETRICS + +#if DISABLED(NO_VOLUMETRICS) + /** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ + //#define VOLUMETRIC_DEFAULT_ON +#endif + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * CNC G-code options + * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc. + * Note that G0 feedrates should be used with care for 3D printing (if used at all). + * High feedrates may cause ringing and harm print quality. + */ +//#define PAREN_COMMENTS // Support for parentheses-delimited comments +//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc. + +// Enable and set a (default) feedrate for all G0 moves +//#define G0_FEEDRATE 3000 // (mm/m) +#ifdef G0_FEEDRATE + //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode +#endif + +/** + * G-code Macros + * + * Add G-codes M810-M819 to define and run G-code macros. + * Macros are not saved to EEPROM. + */ +//#define GCODE_MACROS +#if ENABLED(GCODE_MACROS) + #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used + #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro +#endif + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + //#define CUSTOM_USER_MENU_TITLE "Custom Commands" + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. + */ +#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + #define HOST_PROMPT_SUPPORT +#endif + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reliabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behavior. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display. + * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 + #define MAX7219_DIN_PIN 57 + #define MAX7219_LOAD_PIN 44 + + //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix + #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral) + #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain. + #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°) + // connector at: right=0 bottom=-90 top=90 left=180 + //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC +#if ENABLED(NANODLP_Z_SYNC) + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. + // Default behavior is limited to Z axis only. +#endif + +/** + * WiFi Support (Espressif ESP32 WiFi) + */ +//#define WIFISUPPORT +#if ENABLED(WIFISUPPORT) + #define WIFI_SSID "Wifi SSID" + #define WIFI_PWD "Wifi Password" + //#define WEBSUPPORT // Start a webserver with auto-discovery + //#define OTASUPPORT // Support over-the-air firmware updates +#endif + +/** + * Prusa Multi-Material Unit v2 + * Enable in Configuration.h + */ +#if ENABLED(PRUSA_MMU2) + + // Serial port used for communication with MMU2. + // For AVR enable the UART port used for the MMU. (e.g., internalSerial) + // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2) + #define INTERNAL_SERIAL_PORT 2 + #define MMU2_SERIAL internalSerial + + // Use hardware reset for MMU if a pin is defined for it + //#define MMU2_RST_PIN 23 + + // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) + //#define MMU2_MODE_12V + + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" + + // Add an LCD menu for MMU2 + //#define MMU2_MENUS + #if ENABLED(MMU2_MENUS) + // Settings for filament load / unload from the LCD menu. + // This is for Prusa MK3-style extruders. Customize for your hardware. + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ + { 7.2, 562 }, \ + { 14.4, 871 }, \ + { 36.0, 1393 }, \ + { 14.4, 871 }, \ + { 50.0, 198 } + + #define MMU2_RAMMING_SEQUENCE \ + { 1.0, 1000 }, \ + { 1.0, 1500 }, \ + { 2.0, 2000 }, \ + { 1.5, 3000 }, \ + { 2.5, 4000 }, \ + { -15.0, 5000 }, \ + { -14.0, 1200 }, \ + { -6.0, 600 }, \ + { 10.0, 700 }, \ + { -10.0, 400 }, \ + { -50.0, 2000 } + + #endif + + //#define MMU2_DEBUG // Write debug info to serial output + +#endif // PRUSA_MMU2 + +/** + * Advanced Print Counter settings + */ +#if ENABLED(PRINTCOUNTER) + #define SERVICE_WARNING_BUZZES 3 + // Activate up to 3 service interval watchdogs + //#define SERVICE_NAME_1 "Service S" + //#define SERVICE_INTERVAL_1 100 // print hours + //#define SERVICE_NAME_2 "Service L" + //#define SERVICE_INTERVAL_2 200 // print hours + //#define SERVICE_NAME_3 "Service 3" + //#define SERVICE_INTERVAL_3 1 // print hours +#endif + +// @section develop + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +//#define PINS_DEBUGGING + +// Enable Marlin dev mode which adds some special commands +//#define MARLIN_DEV_MODE diff --git a/config/examples/Anet/E16/_Bootscreen.h b/config/examples/Anet/E16/_Bootscreen.h new file mode 100644 index 0000000000..f15e2d5f5f --- /dev/null +++ b/config/examples/Anet/E16/_Bootscreen.h @@ -0,0 +1,73 @@ +/** + * Made with Marlin Bitmap Converter + * http://marlinfw.org/tools/u8glib/converter.html + * + * This bitmap from the file '3dpc_tech_bootscreen.bmp' + */ +#define CUSTOM_BOOTSCREEN_BMPWIDTH 128 +const unsigned char custom_start_bmp[] PROGMEM = { + B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111, + B11111111,B00000000,B00001111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11000000,B00000000,B11111111, + B11111110,B00000000,B11111111,B11111110,B00000111,B11111111,B11111111,B00000001,B11111111,B11111111,B11100000,B00000011,B11111111,B11111000,B00000000,B01111111, + B11111110,B00000001,B11111111,B11111111,B00000111,B11111111,B11111111,B11000001,B11111111,B11111111,B11111000,B00000111,B11111111,B11111100,B00000000,B01111111, + B11111100,B00000011,B11111111,B11111111,B11000111,B11111111,B11111111,B11100001,B11111111,B11111111,B11111100,B00011111,B11111111,B11111110,B00000000,B01111111, + B11111100,B00000111,B11111111,B11111111,B11100111,B11111111,B11111111,B11110001,B11111111,B11111111,B11111110,B00011111,B11111111,B11111111,B00000000,B00111111, + B11111000,B00001111,B11111111,B11111111,B11100111,B11111111,B11111111,B11111001,B11111111,B11111111,B11111110,B00111111,B11111111,B11111111,B00000000,B00111111, + B11111000,B00001111,B11111111,B11111111,B11100111,B11111111,B11111111,B11111001,B11111111,B11111111,B11111111,B00111111,B11111111,B11111111,B10000000,B00011111, + B11111000,B00001111,B11111111,B11111111,B11110111,B11111111,B00111111,B11111001,B11111111,B11111111,B11111111,B01111111,B11111011,B11111111,B10000000,B00011111, + B11110000,B00001111,B11111100,B01111111,B11110111,B11111111,B00111111,B11111101,B11111111,B11001111,B11111111,B01111111,B11110001,B11111111,B10000000,B00011111, + B11110000,B00001111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00001111, + B11110000,B00001111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00001111, + B11110000,B00001111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00001111, + B11100000,B00001111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00001111, + B11100000,B00001111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00000111, + B11100000,B00001111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00000111, + B11100000,B00001111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00000111, + B11000000,B00001111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00000111, + B11000000,B00001111,B11111000,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110001,B11111111,B10000000,B00000111, + B11000000,B00000000,B00000000,B01111111,B11100111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110000,B00000000,B00000000,B00000111, + B11000000,B00000000,B00000001,B11111111,B11100111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00001111,B11111111,B11000111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00001111,B11111111,B10000111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00001111,B11111111,B00000111,B11111111,B00011111,B11111101,B11111111,B11000111,B11111111,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00001111,B11111111,B00000111,B11111111,B00011111,B11111101,B11111111,B11001111,B11111111,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00001111,B11111111,B10000111,B11111111,B00011111,B11111101,B11111111,B11111111,B11111111,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000111,B11111111,B11000111,B11111111,B00011111,B11111101,B11111111,B11111111,B11111111,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B11111111,B11100111,B11111111,B00011111,B11111101,B11111111,B11111111,B11111110,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00000000,B00000000,B01111111,B11100111,B11111111,B00011111,B11111101,B11111111,B11111111,B11111110,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00001111,B11111000,B01111111,B11100111,B11111111,B00011111,B11111101,B11111111,B11111111,B11111100,B01111111,B11110000,B00000000,B00000000,B00000011, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11111111,B11111000,B01111111,B11110001,B11111111,B10000000,B00000011, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11111111,B11100000,B01111111,B11110001,B11111111,B10000000,B00000011, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000011, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000011, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000011, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000011, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000011, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000111, + B11000000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000111, + B11100000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000111, + B11100000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000111, + B11100000,B00011111,B11111100,B01111111,B11110111,B11111111,B00011111,B11111101,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000111, + B11100000,B00001111,B11111111,B11111111,B11110111,B11111111,B00111111,B11111001,B11111111,B11000000,B00000000,B01111111,B11110001,B11111111,B10000000,B00000111, + B11100000,B00001111,B11111111,B11111111,B11100111,B11111111,B11111111,B11111001,B11111111,B11000000,B00000000,B01111111,B11111111,B11111111,B10000000,B00001111, + B11110000,B00001111,B11111111,B11111111,B11100111,B11111111,B11111111,B11111001,B11111111,B11000000,B00000000,B00111111,B11111111,B11111111,B10000000,B00001111, + B11110000,B00001111,B11111111,B11111111,B11100111,B11111111,B11111111,B11110001,B11111111,B11000000,B00000000,B00111111,B11111111,B11111111,B00000000,B00001111, + B11110000,B00000111,B11111111,B11111111,B11000111,B11111111,B11111111,B11100001,B11111111,B11000000,B00000000,B00011111,B11111111,B11111110,B00000000,B00011111, + B11111000,B00000011,B11111111,B11111111,B10000111,B11111111,B11111111,B11000001,B11111111,B11000000,B00000000,B00001111,B11111111,B11111100,B00000000,B00011111, + B11111000,B00000001,B11111111,B11111111,B00000111,B11111111,B11111111,B10000001,B11111111,B11000000,B00000000,B00000111,B11111111,B11111000,B00000000,B00011111, + B11111000,B00000000,B01111111,B11111100,B00000111,B11111111,B11111100,B00000001,B11111111,B11000000,B00000000,B00000001,B11111111,B11100000,B00000000,B00111111, + B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111, + B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111, + B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111, + B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10000000,B00000000,B01111111, + B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00000000,B00000000,B11000000,B00000000,B11111111, + B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00000000,B00000000,B11000000,B00000000,B11111111, + B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111100,B01111100,B01111100,B11111100,B00000001,B11111111, + B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B11001100,B11100000,B11101100,B00000001,B11111111, + B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B11000100,B11000000,B11000100,B00000011,B11111111, + B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B01100000,B11111100,B11000000,B11000100,B00000011,B11111111, + B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111000,B01100100,B11000000,B11000000,B11000100,B00000111,B11111111, + B11111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111100,B11111100,B01111100,B11000100,B00000111,B11111111, + B11111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111100,B01111100,B00111100,B10000100,B00001111,B11111111, + B11111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111 +}; diff --git a/config/examples/Anet/E16/_Statusscreen.h b/config/examples/Anet/E16/_Statusscreen.h new file mode 100644 index 0000000000..466e4843c7 --- /dev/null +++ b/config/examples/Anet/E16/_Statusscreen.h @@ -0,0 +1,82 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Custom Status Screen bitmap + * + * Place this file in the root with your configuration files + * and enable CUSTOM_STATUS_SCREEN_IMAGE in Configuration.h. + */ + +// +// Status Screen Logo bitmap +// +#define STATUS_LOGO_Y 3 +#define STATUS_LOGO_WIDTH 24 + +/** + * Made with Marlin Bitmap Converter + * http://marlinfw.org/tools/u8glib/converter.html + * + * This bitmap from the file '3dpc_tech_statusscreen.bmp' + */ +const unsigned char status_logo_bmp[] PROGMEM = { + B11111111,B11111111,B11111111, + B11111111,B00000000,B11111111, + B11111100,B00000000,B00111111, + B11110000,B00000000,B00001111, + B11100000,B00000000,B00000111, + B11100000,B00000000,B00000111, + B11000000,B00000000,B00000011, + B10011101,B11001110,B00110001, + B10010101,B10101111,B01101001, + B10010101,B10101101,B01101001, + B10000101,B10101101,B01100001, + B10001101,B10101111,B01100001, + B10010101,B10101100,B01100001, + B10010101,B10101100,B01101001, + B10010101,B10101100,B01101001, + B10011101,B11001100,B00110001, + B10000000,B00000000,B00000001, + B11000000,B00000001,B11111011, + B11100000,B00000000,B00000111, + B11100000,B00000000,B00000111, + B11110000,B00000000,B00001111, + B11111100,B00000000,B00111111, + B11111110,B01101100,B01111111, + B11111111,B11111111,B11111111 +}; + +// +// Use default bitmaps +// +#define STATUS_HOTEND_ANIM +#define STATUS_BED_ANIM +#if HOTENDS < 2 + #define STATUS_LOGO_X 8 + #define STATUS_HEATERS_X 40 + #define STATUS_BED_X 72 +#else + #define STATUS_LOGO_X 0 + #define STATUS_HEATERS_X 32 + #define STATUS_BED_X 80 +#endif diff --git a/config/examples/AnyCubic/i3/Configuration.h b/config/examples/AnyCubic/i3/Configuration.h index 2df15008f6..61b7619e2e 100644 --- a/config/examples/AnyCubic/i3/Configuration.h +++ b/config/examples/AnyCubic/i3/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -826,7 +838,14 @@ */ #define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -917,6 +936,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1025,7 +1047,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1140,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1166,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1235,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1240,6 +1262,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1347,17 +1370,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1411,7 +1438,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1891,6 +1918,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1993,6 +2028,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2047,18 +2083,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2076,7 +2112,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/AnyCubic/i3/Configuration_adv.h b/config/examples/AnyCubic/i3/Configuration_adv.h index 26f9dca629..6abd184f43 100644 --- a/config/examples/AnyCubic/i3/Configuration_adv.h +++ b/config/examples/AnyCubic/i3/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/ArmEd/Configuration.h b/config/examples/ArmEd/Configuration.h index f3cd046773..aa5fbdeb31 100644 --- a/config/examples/ArmEd/Configuration.h +++ b/config/examples/ArmEd/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 13 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -817,7 +829,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -908,6 +927,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1016,7 +1038,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1109,7 +1131,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1135,7 +1157,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1204,7 +1226,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1231,6 +1253,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1338,17 +1361,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1402,7 +1429,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1882,6 +1909,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1984,6 +2019,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2038,18 +2074,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2067,7 +2103,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/ArmEd/Configuration_adv.h b/config/examples/ArmEd/Configuration_adv.h index e71935900c..382abf1d99 100644 --- a/config/examples/ArmEd/Configuration_adv.h +++ b/config/examples/ArmEd/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + #define HEATER_BED_INVERTING true #define HEATER_0_INVERTING true #define HEATER_1_INVERTING true @@ -54,6 +105,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -82,7 +145,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -131,8 +194,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -257,7 +320,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -408,20 +471,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -460,6 +523,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -517,8 +581,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -774,8 +841,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -787,8 +857,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -891,6 +967,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -963,19 +1050,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1006,6 +1102,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1033,13 +1131,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1073,7 +1172,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1115,7 +1215,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1130,8 +1231,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1323,6 +1424,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1658,7 +1760,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1673,8 +1775,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2171,7 +2272,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2231,7 +2332,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Azteeg/X5GT/Configuration.h b/config/examples/Azteeg/X5GT/Configuration.h index df37346b38..85a1db1313 100644 --- a/config/examples/Azteeg/X5GT/Configuration.h +++ b/config/examples/Azteeg/X5GT/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration.h b/config/examples/BIBO/TouchX/cyclops/Configuration.h index 08a1a83f10..e7aaa01e1a 100644 --- a/config/examples/BIBO/TouchX/cyclops/Configuration.h +++ b/config/examples/BIBO/TouchX/cyclops/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 115 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h index 6c66eaf249..00423bcd5b 100644 --- a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/BIBO/TouchX/default/Configuration.h b/config/examples/BIBO/TouchX/default/Configuration.h index ab23313abb..38e1fce6dd 100644 --- a/config/examples/BIBO/TouchX/default/Configuration.h +++ b/config/examples/BIBO/TouchX/default/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 5 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 60 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 115 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BIBO/TouchX/default/Configuration_adv.h b/config/examples/BIBO/TouchX/default/Configuration_adv.h index 91c46b8ba4..54ffd7cbd1 100644 --- a/config/examples/BIBO/TouchX/default/Configuration_adv.h +++ b/config/examples/BIBO/TouchX/default/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/BQ/Hephestos/Configuration.h b/config/examples/BQ/Hephestos/Configuration.h index cbe651775b..66f6bf1321 100644 --- a/config/examples/BQ/Hephestos/Configuration.h +++ b/config/examples/BQ/Hephestos/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 260 #define HEATER_5_MAXTEMP 260 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -450,7 +462,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -804,7 +816,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -895,6 +914,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1003,7 +1025,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1096,7 +1118,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1122,7 +1144,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1191,7 +1213,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1218,6 +1240,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1325,17 +1348,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1389,7 +1416,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1869,6 +1896,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1971,6 +2006,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2025,18 +2061,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2054,7 +2090,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BQ/Hephestos/Configuration_adv.h b/config/examples/BQ/Hephestos/Configuration_adv.h index 2667d82822..129a6b33e9 100644 --- a/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/config/examples/BQ/Hephestos/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -770,8 +834,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +850,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +960,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1043,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1095,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1124,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1165,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1208,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1224,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1417,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1753,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1768,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2265,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2325,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/BQ/Hephestos_2/Configuration.h b/config/examples/BQ/Hephestos_2/Configuration.h index 3fcfb44ccd..03b87da3bd 100644 --- a/config/examples/BQ/Hephestos_2/Configuration.h +++ b/config/examples/BQ/Hephestos_2/Configuration.h @@ -226,7 +226,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -257,13 +257,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -315,6 +329,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -371,11 +386,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 70 #define TEMP_SENSOR_1 0 @@ -385,7 +402,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -404,8 +420,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -415,7 +429,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -427,7 +440,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 100 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -463,7 +475,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -817,7 +829,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -892,12 +911,12 @@ * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. */ -#define Z_CLEARANCE_DEPLOY_PROBE 0 // Z Clearance for Deploy/Stow -#define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points +#define Z_CLEARANCE_DEPLOY_PROBE 0 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 2 // Z Clearance between probe points #define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes -//#define Z_AFTER_PROBING 5 // Z position after probing is done +//#define Z_AFTER_PROBING 5 // Z position after probing is done -#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping // For M851 give a range for adjusting the Z probe offset #define Z_PROBE_OFFSET_RANGE_MIN -20 @@ -908,6 +927,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1016,7 +1038,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 5 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 10 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BQ/Hephestos_2/Configuration_adv.h b/config/examples/BQ/Hephestos_2/Configuration_adv.h index 0d806ce29d..e918c47ce0 100644 --- a/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 1 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X #define HOME_Y_BEFORE_X @@ -778,8 +842,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -791,8 +858,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -895,6 +968,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -967,19 +1051,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1010,6 +1103,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1037,13 +1132,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1077,7 +1173,8 @@ //#define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1119,7 +1216,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1134,8 +1232,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1327,6 +1425,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1662,7 +1761,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1677,8 +1776,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2175,7 +2273,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2235,7 +2333,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/BQ/WITBOX/Configuration.h b/config/examples/BQ/WITBOX/Configuration.h index a49f8b1166..5da0a792ec 100644 --- a/config/examples/BQ/WITBOX/Configuration.h +++ b/config/examples/BQ/WITBOX/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 260 #define HEATER_5_MAXTEMP 260 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -450,7 +462,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -804,7 +816,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -895,6 +914,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1003,7 +1025,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1096,7 +1118,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1122,7 +1144,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1191,7 +1213,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1218,6 +1240,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1325,17 +1348,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1389,7 +1416,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1869,6 +1896,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1971,6 +2006,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2025,18 +2061,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2054,7 +2090,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/BQ/WITBOX/Configuration_adv.h b/config/examples/BQ/WITBOX/Configuration_adv.h index 2667d82822..129a6b33e9 100644 --- a/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/config/examples/BQ/WITBOX/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -770,8 +834,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +850,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +960,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1043,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1095,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1124,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1165,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1208,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1224,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1417,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1753,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1768,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2265,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2325,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Cartesio/Configuration.h b/config/examples/Cartesio/Configuration.h index d40d312df9..d74b3a1d13 100644 --- a/config/examples/Cartesio/Configuration.h +++ b/config/examples/Cartesio/Configuration.h @@ -219,7 +219,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -250,13 +250,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -308,6 +322,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -364,11 +379,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_1 -1 @@ -378,7 +395,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -397,8 +413,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -408,7 +422,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -420,7 +433,6 @@ #define HEATER_4_MAXTEMP 415 #define HEATER_5_MAXTEMP 415 #define BED_MAXTEMP 165 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -463,7 +475,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -815,7 +827,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -906,6 +925,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1014,7 +1036,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1107,7 +1129,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1133,7 +1155,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1202,7 +1224,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1229,6 +1251,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1336,17 +1359,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1400,7 +1427,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1880,6 +1907,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1982,6 +2017,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2036,18 +2072,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2065,7 +2101,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Cartesio/Configuration_adv.h b/config/examples/Cartesio/Configuration_adv.h index dd9f656c33..ba2a6fb92b 100644 --- a/config/examples/Cartesio/Configuration_adv.h +++ b/config/examples/Cartesio/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X #define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Creality/CR-10/Configuration.h b/config/examples/Creality/CR-10/Configuration.h index da13fee922..7b56572bfd 100644 --- a/config/examples/Creality/CR-10/Configuration.h +++ b/config/examples/Creality/CR-10/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 120 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -826,7 +838,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -917,6 +936,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1025,7 +1047,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1140,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1166,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1235,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1240,6 +1262,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1278,7 +1301,7 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_XY (20*60) #define HOMING_FEEDRATE_Z (4*60) // Validate that endstops are triggered on homing moves @@ -1347,17 +1370,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1411,7 +1438,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1891,6 +1918,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1993,6 +2028,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2047,18 +2083,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2076,7 +2112,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-10/Configuration_adv.h b/config/examples/Creality/CR-10/Configuration_adv.h index e2b6bd732c..0af4542443 100644 --- a/config/examples/Creality/CR-10/Configuration_adv.h +++ b/config/examples/Creality/CR-10/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ //#define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2170,7 +2271,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2230,7 +2331,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Creality/CR-10S/Configuration.h b/config/examples/Creality/CR-10S/Configuration.h index 5da2cffb32..76184c285a 100644 --- a/config/examples/Creality/CR-10S/Configuration.h +++ b/config/examples/Creality/CR-10S/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 120 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1109,7 +1131,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1135,7 +1157,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1204,7 +1226,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1231,6 +1253,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1269,7 +1292,7 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_XY (20*60) #define HOMING_FEEDRATE_Z (8*60) // Validate that endstops are triggered on homing moves @@ -1338,17 +1361,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1402,7 +1429,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 3), (Y_MAX_POS - 3), 10 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1882,6 +1909,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1984,6 +2019,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2038,18 +2074,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2067,7 +2103,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-10S/Configuration_adv.h b/config/examples/Creality/CR-10S/Configuration_adv.h index 79b138134a..828dbab298 100644 --- a/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/config/examples/Creality/CR-10S/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 4 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Creality/CR-10_5S/Configuration.h b/config/examples/Creality/CR-10_5S/Configuration.h index 8d447a3854..e6639de818 100644 --- a/config/examples/Creality/CR-10_5S/Configuration.h +++ b/config/examples/Creality/CR-10_5S/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 120 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -817,7 +829,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -908,6 +927,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1017,7 +1039,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1111,7 +1133,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1137,7 +1159,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1206,7 +1228,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1233,6 +1255,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1271,7 +1294,7 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_XY (20*60) #define HOMING_FEEDRATE_Z (4*60) // Validate that endstops are triggered on homing moves @@ -1340,17 +1363,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1404,7 +1431,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 20), (Y_MAX_POS - 20), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1884,6 +1911,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1986,6 +2021,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2040,18 +2076,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2069,7 +2105,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-10_5S/Configuration_adv.h b/config/examples/Creality/CR-10_5S/Configuration_adv.h index 6ce29b4b74..e2b0462965 100644 --- a/config/examples/Creality/CR-10_5S/Configuration_adv.h +++ b/config/examples/Creality/CR-10_5S/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 10 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Creality/CR-10mini/Configuration.h b/config/examples/Creality/CR-10mini/Configuration.h index aae4b8d170..8a34bdd476 100644 --- a/config/examples/Creality/CR-10mini/Configuration.h +++ b/config/examples/Creality/CR-10mini/Configuration.h @@ -227,7 +227,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -258,13 +258,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -316,6 +330,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -372,11 +387,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -386,7 +403,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -405,8 +421,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -416,7 +430,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -428,7 +441,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 120 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -476,7 +488,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -835,7 +847,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -926,6 +945,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1034,7 +1056,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1127,7 +1149,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1153,7 +1175,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1222,7 +1244,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1249,6 +1271,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1287,7 +1310,7 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_XY (20*60) #define HOMING_FEEDRATE_Z (4*60) // Validate that endstops are triggered on homing moves @@ -1356,17 +1379,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1420,7 +1447,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1900,6 +1927,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2002,6 +2037,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2056,18 +2092,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2085,7 +2121,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-10mini/Configuration_adv.h b/config/examples/Creality/CR-10mini/Configuration_adv.h index aede1f20a9..af56eb00ab 100644 --- a/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Creality/CR-8/Configuration.h b/config/examples/Creality/CR-8/Configuration.h index 0010f5a066..545e8a22e6 100644 --- a/config/examples/Creality/CR-8/Configuration.h +++ b/config/examples/Creality/CR-8/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -826,7 +838,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -917,6 +936,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1025,7 +1047,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1140,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1166,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1235,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1240,6 +1262,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1278,7 +1301,7 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_XY (20*60) #define HOMING_FEEDRATE_Z (4*60) // Validate that endstops are triggered on homing moves @@ -1347,17 +1370,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1411,7 +1438,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1891,6 +1918,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1993,6 +2028,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2047,18 +2083,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2076,7 +2112,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/CR-8/Configuration_adv.h b/config/examples/Creality/CR-8/Configuration_adv.h index 821590c29d..cdce190345 100644 --- a/config/examples/Creality/CR-8/Configuration_adv.h +++ b/config/examples/Creality/CR-8/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Creality/Ender-2/Configuration.h b/config/examples/Creality/Ender-2/Configuration.h index 154c9ce8c5..94511fc266 100644 --- a/config/examples/Creality/Ender-2/Configuration.h +++ b/config/examples/Creality/Ender-2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 75 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -466,7 +478,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -820,7 +832,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -911,6 +930,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1019,7 +1041,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1134,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1160,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1229,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1234,6 +1256,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1272,7 +1295,7 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_XY (20*60) #define HOMING_FEEDRATE_Z (4*60) // Validate that endstops are triggered on homing moves @@ -1341,17 +1364,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1405,7 +1432,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1885,6 +1912,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1987,6 +2022,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2041,18 +2077,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2070,7 +2106,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/Ender-2/Configuration_adv.h b/config/examples/Creality/Ender-2/Configuration_adv.h index 2f0f77dea0..a38c1dc267 100644 --- a/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/config/examples/Creality/Ender-2/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 1 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -770,8 +834,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +850,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +960,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1043,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1095,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1124,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1165,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1208,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1224,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1417,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1753,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1768,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2265,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2325,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Creality/Ender-3/Configuration.h b/config/examples/Creality/Ender-3/Configuration.h index ead6464b8c..79140e24e3 100644 --- a/config/examples/Creality/Ender-3/Configuration.h +++ b/config/examples/Creality/Ender-3/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 125 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -466,7 +478,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -820,7 +832,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -911,6 +930,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1019,7 +1041,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1134,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1160,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1229,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1234,6 +1256,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1341,17 +1364,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1405,7 +1432,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1885,6 +1912,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1987,6 +2022,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2041,18 +2077,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2070,7 +2106,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/Ender-3/Configuration_adv.h b/config/examples/Creality/Ender-3/Configuration_adv.h index 68313a81da..af2e776499 100644 --- a/config/examples/Creality/Ender-3/Configuration_adv.h +++ b/config/examples/Creality/Ender-3/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -770,8 +834,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +850,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +960,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1043,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1095,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1124,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1165,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1208,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1224,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1417,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1587,7 +1686,7 @@ * Define you own with * { , , hysteresis_start[1..8] } */ - #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + #define CHOPPER_TIMING CHOPPER_DEFAULT_24V /** * Monitor Trinamic drivers for error conditions, @@ -1654,7 +1753,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1768,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2265,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2325,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Creality/Ender-4/Configuration.h b/config/examples/Creality/Ender-4/Configuration.h index 3aef1a9396..df3728bf15 100644 --- a/config/examples/Creality/Ender-4/Configuration.h +++ b/config/examples/Creality/Ender-4/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -826,7 +838,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + #define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -917,6 +936,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1025,7 +1047,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1140,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1166,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1235,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1240,6 +1262,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1278,7 +1301,7 @@ #endif // Homing speeds (mm/m) -#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_XY (20*60) #define HOMING_FEEDRATE_Z (7*60) // Validate that endstops are triggered on homing moves @@ -1347,17 +1370,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1411,7 +1438,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1891,6 +1918,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1993,6 +2028,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2047,18 +2083,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2076,7 +2112,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Creality/Ender-4/Configuration_adv.h b/config/examples/Creality/Ender-4/Configuration_adv.h index 5b5a0a16dc..b01b8fca1d 100644 --- a/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/config/examples/Creality/Ender-4/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Einstart-S/Configuration.h b/config/examples/Einstart-S/Configuration.h index 7546bcbd69..1fbeefa04d 100644 --- a/config/examples/Einstart-S/Configuration.h +++ b/config/examples/Einstart-S/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -379,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -398,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -409,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -421,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -470,7 +480,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -827,7 +837,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -917,6 +934,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1025,7 +1045,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1138,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1164,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1233,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1240,6 +1260,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1347,17 +1368,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1411,7 +1436,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1891,6 +1916,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1989,6 +2022,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2043,18 +2077,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2072,7 +2106,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Einstart-S/Configuration_adv.h b/config/examples/Einstart-S/Configuration_adv.h index 3bdda0ee65..5a15ddd21b 100644 --- a/config/examples/Einstart-S/Configuration_adv.h +++ b/config/examples/Einstart-S/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Felix/Configuration.h b/config/examples/Felix/Configuration.h index 6d819f1f10..2e8bdd3509 100644 --- a/config/examples/Felix/Configuration.h +++ b/config/examples/Felix/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -450,7 +462,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -798,7 +810,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -889,6 +908,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -997,7 +1019,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1090,7 +1112,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1116,7 +1138,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1185,7 +1207,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1212,6 +1234,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1319,17 +1342,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1383,7 +1410,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1863,6 +1890,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1965,6 +2000,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2019,18 +2055,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2048,7 +2084,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Felix/Configuration_adv.h b/config/examples/Felix/Configuration_adv.h index 0f5542dff8..03bdafa5c7 100644 --- a/config/examples/Felix/Configuration_adv.h +++ b/config/examples/Felix/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 3 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Felix/DUAL/Configuration.h b/config/examples/Felix/DUAL/Configuration.h index 2a99cbc600..dc4654bff9 100644 --- a/config/examples/Felix/DUAL/Configuration.h +++ b/config/examples/Felix/DUAL/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -450,7 +462,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -798,7 +810,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -889,6 +908,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -997,7 +1019,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1090,7 +1112,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1116,7 +1138,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1185,7 +1207,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1212,6 +1234,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1319,17 +1342,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1383,7 +1410,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1863,6 +1890,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1965,6 +2000,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2019,18 +2055,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2048,7 +2084,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/FlashForge/CreatorPro/Configuration.h b/config/examples/FlashForge/CreatorPro/Configuration.h index 77f3db9b66..5224617634 100644 --- a/config/examples/FlashForge/CreatorPro/Configuration.h +++ b/config/examples/FlashForge/CreatorPro/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -2 #define TEMP_SENSOR_1 -2 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -452,7 +464,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -808,7 +820,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -899,6 +918,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1008,7 +1030,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1101,7 +1123,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1127,7 +1149,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1196,7 +1218,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1329,17 +1351,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1393,7 +1419,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MAX_POS - 2), (Y_MAX_POS - 2), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1873,6 +1899,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1975,6 +2009,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2029,18 +2064,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2058,7 +2093,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/FlashForge/CreatorPro/Configuration_adv.h b/config/examples/FlashForge/CreatorPro/Configuration_adv.h index 0698f4b9a5..0c62be5536 100644 --- a/config/examples/FlashForge/CreatorPro/Configuration_adv.h +++ b/config/examples/FlashForge/CreatorPro/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -769,8 +833,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -782,8 +849,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -886,6 +959,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -958,19 +1042,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1001,6 +1094,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1028,13 +1123,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1068,7 +1164,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1110,7 +1207,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1125,8 +1223,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1318,6 +1416,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1653,7 +1752,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1668,8 +1767,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2166,7 +2264,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2226,7 +2324,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/FolgerTech/i3-2020/Configuration.h b/config/examples/FolgerTech/i3-2020/Configuration.h index 5af058965f..abf120a208 100644 --- a/config/examples/FolgerTech/i3-2020/Configuration.h +++ b/config/examples/FolgerTech/i3-2020/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 245 #define HEATER_5_MAXTEMP 245 #define BED_MAXTEMP 115 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -822,7 +834,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -913,6 +932,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1021,7 +1043,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1114,7 +1136,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1140,7 +1162,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1209,7 +1231,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 45 #define PROBE_PT_1_Y 170 #define PROBE_PT_2_X 45 @@ -1236,6 +1258,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1343,17 +1366,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1407,7 +1434,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1887,6 +1914,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1989,6 +2024,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2043,18 +2079,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2072,7 +2108,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 90c32f88a5..0caa02b440 100644 --- a/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2235,7 +2336,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Formbot/Raptor/Configuration.h b/config/examples/Formbot/Raptor/Configuration.h index c0b5dd37c0..a70ee8629e 100644 --- a/config/examples/Formbot/Raptor/Configuration.h +++ b/config/examples/Formbot/Raptor/Configuration.h @@ -259,7 +259,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -290,13 +290,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -348,6 +362,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -404,11 +419,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -422,7 +439,6 @@ #define TEMP_SENSOR_BED 1 #endif #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -441,8 +457,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -451,7 +465,6 @@ #define HEATER_3_MINTEMP 5 #define HEATER_4_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -466,7 +479,6 @@ #else #define BED_MAXTEMP 100 #endif -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -514,7 +526,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -899,7 +911,14 @@ */ #define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -988,6 +1007,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1110,7 +1132,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1210,7 +1232,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1236,7 +1258,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 6 @@ -1308,7 +1330,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 50 #define PROBE_PT_1_Y 350 #define PROBE_PT_2_X 50 @@ -1335,6 +1357,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1442,17 +1465,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1506,7 +1533,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { 10, 10, 20} #define NOZZLE_PARK_XY_FEEDRATE 70 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1986,6 +2013,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2088,6 +2123,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2142,18 +2178,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2171,7 +2207,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Formbot/Raptor/Configuration_adv.h b/config/examples/Formbot/Raptor/Configuration_adv.h index cbfc2be6b6..f7418ee67f 100644 --- a/config/examples/Formbot/Raptor/Configuration_adv.h +++ b/config/examples/Formbot/Raptor/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 2 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -308,11 +371,11 @@ */ #define CASE_LIGHT_ENABLE #if ENABLED(CASE_LIGHT_ENABLE) - #define CASE_LIGHT_PIN 5 + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on #define CASE_LIGHT_DEFAULT_BRIGHTNESS 255 // Set default power-up brightness (0-255, requires PWM pin) - #define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu + #define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + #define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1129,14 @@ #define LIN_ADVANCE #endif #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1170,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1213,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1229,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1422,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1758,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1773,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2171,7 +2272,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2231,7 +2332,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Formbot/T_Rex_2+/Configuration.h b/config/examples/Formbot/T_Rex_2+/Configuration.h index a3bc74103c..e16b26ec32 100644 --- a/config/examples/Formbot/T_Rex_2+/Configuration.h +++ b/config/examples/Formbot/T_Rex_2+/Configuration.h @@ -221,7 +221,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -252,13 +252,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -316,6 +330,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -372,11 +387,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -392,7 +409,6 @@ #endif #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -411,8 +427,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -422,7 +436,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -434,7 +447,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -484,7 +496,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -845,7 +857,14 @@ */ #define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif @@ -937,6 +956,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1045,7 +1067,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1138,7 +1160,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1164,7 +1186,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1238,7 +1260,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 35 #define PROBE_PT_1_Y 365 #define PROBE_PT_2_X 35 @@ -1265,6 +1287,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1372,17 +1395,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1436,7 +1463,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { 50, (Y_MIN_POS + 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1916,6 +1943,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2018,6 +2053,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2072,18 +2108,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2101,7 +2137,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif @@ -2129,3 +2165,9 @@ // Allow servo angle to be edited and saved to EEPROM //#define EDITABLE_SERVO_ANGLES + +#ifdef ROXYs_TRex + #define LED_PIN -1 + #define BEEPER_PIN -1 + #define KILL_PIN -1 +#endif diff --git a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h index 7068e6ef6d..29776b3cc1 100644 --- a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. #define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -408,20 +471,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -460,6 +523,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -517,8 +581,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -774,8 +841,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -787,8 +857,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -891,6 +967,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -963,19 +1050,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -990,8 +1086,8 @@ */ #define BABYSTEPPING #if ENABLED(BABYSTEPPING) - //#define BABYSTEP_WITHOUT_HOMING - //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_WITHOUT_HOMING + #define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way #define BABYSTEP_MULTIPLICATOR 40 // Babysteps are very small. Increase for faster motion. @@ -999,13 +1095,15 @@ #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. // Note: Extra time may be added to mitigate controller latency. - //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). + #define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. #if ENABLED(MOVE_Z_WHEN_IDLE) #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) #define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1033,13 +1131,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X 4 //#define MESH_MIN_Y MESH_INSET @@ -1073,7 +1172,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1115,7 +1215,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1130,8 +1231,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1323,6 +1424,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 0 // (mm) Unload initial retract length. @@ -1658,7 +1760,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1673,8 +1775,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2171,7 +2272,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2241,7 +2342,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Formbot/T_Rex_3/Configuration.h b/config/examples/Formbot/T_Rex_3/Configuration.h index ed9465290e..fe7fb271a6 100644 --- a/config/examples/Formbot/T_Rex_3/Configuration.h +++ b/config/examples/Formbot/T_Rex_3/Configuration.h @@ -222,7 +222,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -253,13 +253,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -311,6 +325,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -367,11 +382,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -386,7 +403,6 @@ #endif #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -405,8 +421,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -416,7 +430,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -428,7 +441,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -471,7 +483,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -832,7 +844,14 @@ */ #define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -923,6 +942,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1035,7 +1057,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1133,7 +1155,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1159,7 +1181,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1228,7 +1250,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 35 #define PROBE_PT_1_Y 365 #define PROBE_PT_2_X 35 @@ -1255,6 +1277,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1362,17 +1385,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1426,7 +1453,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { 100, (Y_MIN_POS + 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1909,6 +1936,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2011,6 +2046,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2065,18 +2101,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2094,7 +2130,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif @@ -2122,3 +2158,9 @@ // Allow servo angle to be edited and saved to EEPROM //#define EDITABLE_SERVO_ANGLES + +#ifdef ROXYs_TRex + #define LED_PIN -1 + #define BEEPER_PIN -1 + #define KILL_PIN -1 +#endif diff --git a/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/config/examples/Formbot/T_Rex_3/Configuration_adv.h index f02a878fef..5f81cfaf41 100644 --- a/config/examples/Formbot/T_Rex_3/Configuration_adv.h +++ b/config/examples/Formbot/T_Rex_3/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. #define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -408,20 +471,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -460,6 +523,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -517,8 +581,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -774,8 +841,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -787,8 +857,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -891,6 +967,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -963,19 +1050,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1006,6 +1102,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1033,13 +1131,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X 4 //#define MESH_MIN_Y MESH_INSET @@ -1073,7 +1172,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1115,7 +1215,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1130,8 +1231,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1323,6 +1424,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 0 // (mm) Unload initial retract length. @@ -1658,7 +1760,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1673,8 +1775,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2166,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2236,7 +2337,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Geeetech/A10M/Configuration.h b/config/examples/Geeetech/A10M/Configuration.h index d5faaf0128..a0a25651dd 100644 --- a/config/examples/Geeetech/A10M/Configuration.h +++ b/config/examples/Geeetech/A10M/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -452,7 +464,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -670,14 +682,14 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 80.3, 80.8, 400, 340 } +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 430 } /** * Default Max Feed Rate (mm/s) * Override with M203 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ -#define DEFAULT_MAX_FEEDRATE { 400, 400, 40, 45 } +#define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 } /** * Default Max Acceleration (change/s) change = mm/s @@ -685,7 +697,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ -#define DEFAULT_MAX_ACCELERATION { 5000, 5000, 40, 5000 } +#define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 5000 } /** * Default Acceleration (change/s) change = mm/s @@ -695,9 +707,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves // // Use Junction Deviation instead of traditional Jerk Limiting @@ -799,7 +811,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -890,6 +909,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -962,8 +984,8 @@ // @section machine // The size of the print bed -#define X_BED_SIZE 220 -#define Y_BED_SIZE 220 +#define X_BED_SIZE 230 +#define Y_BED_SIZE 230 // Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -10 @@ -998,7 +1020,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1093,7 +1115,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1119,7 +1141,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 5 @@ -1188,7 +1210,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1215,6 +1237,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1322,17 +1345,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1386,7 +1413,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { 3, 3, 10 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1866,6 +1893,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1968,6 +2003,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2022,18 +2058,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2051,7 +2087,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/A10M/Configuration_adv.h b/config/examples/Geeetech/A10M/Configuration_adv.h index 35566a2811..8f0350b529 100644 --- a/config/examples/Geeetech/A10M/Configuration_adv.h +++ b/config/examples/Geeetech/A10M/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ #define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - #define POWER_LOSS_PIN 69 // Pin to detect power loss - #define POWER_LOSS_STATE LOW // State of pin indicating power loss + #define POWER_LOSS_PIN 69 // Pin to detect power loss + #define POWER_LOSS_STATE LOW // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Geeetech/A20M/Configuration.h b/config/examples/Geeetech/A20M/Configuration.h index 6bb085ea5e..d107d2a6f7 100644 --- a/config/examples/Geeetech/A20M/Configuration.h +++ b/config/examples/Geeetech/A20M/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -452,7 +464,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -670,14 +682,14 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 80.3, 80.8, 400, 340 } +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 430 } /** * Default Max Feed Rate (mm/s) * Override with M203 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ -#define DEFAULT_MAX_FEEDRATE { 400, 400, 40, 45 } +#define DEFAULT_MAX_FEEDRATE { 500, 500, 5, 25 } /** * Default Max Acceleration (change/s) change = mm/s @@ -685,7 +697,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ -#define DEFAULT_MAX_ACCELERATION { 5000, 5000, 40, 5000 } +#define DEFAULT_MAX_ACCELERATION { 500, 500, 100, 5000 } /** * Default Acceleration (change/s) change = mm/s @@ -695,9 +707,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E acceleration for printing moves -#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 1000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves // // Use Junction Deviation instead of traditional Jerk Limiting @@ -799,7 +811,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -890,6 +909,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -962,8 +984,8 @@ // @section machine // The size of the print bed -#define X_BED_SIZE 250 -#define Y_BED_SIZE 250 +#define X_BED_SIZE 255 +#define Y_BED_SIZE 255 // Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS -10 @@ -998,7 +1020,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1093,7 +1115,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1119,7 +1141,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1188,7 +1210,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1215,6 +1237,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1322,17 +1345,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1386,7 +1413,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { 3, 3, 10 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1870,6 +1897,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1972,6 +2007,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2026,18 +2062,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2055,7 +2091,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/A20M/Configuration_adv.h b/config/examples/Geeetech/A20M/Configuration_adv.h index 85cb8f621c..656a020e27 100644 --- a/config/examples/Geeetech/A20M/Configuration_adv.h +++ b/config/examples/Geeetech/A20M/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ #define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - #define POWER_LOSS_PIN 69 // Pin to detect power loss - #define POWER_LOSS_STATE LOW // State of pin indicating power loss + #define POWER_LOSS_PIN 69 // Pin to detect power loss + #define POWER_LOSS_STATE LOW // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Geeetech/GT2560/Configuration.h b/config/examples/Geeetech/GT2560/Configuration.h index 7937be6b85..0a03d3da72 100644 --- a/config/examples/Geeetech/GT2560/Configuration.h +++ b/config/examples/Geeetech/GT2560/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -472,7 +484,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -831,7 +843,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -922,6 +941,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1030,7 +1052,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1123,7 +1145,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1149,7 +1171,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1218,7 +1240,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1245,6 +1267,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1352,17 +1375,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1416,7 +1443,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1896,6 +1923,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1998,6 +2033,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2052,18 +2088,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2081,7 +2117,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif @@ -2110,7 +2146,7 @@ /** * Customize common displays for GT2560 */ -#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(MKS_MINI_12864) +#if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, MKS_MINI_12864) #define SDSUPPORT // Force SD Card support on for these displays #elif DISABLED(LIGHTWEIGHT_UI) #define LCD_WIDTH 20 // Default is 22. For this Geeetech use 20. diff --git a/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h b/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h index 2dbef1d34d..2e9f3924c8 100644 --- a/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,7 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - #define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +919,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1030,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1123,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1149,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1218,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1245,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1353,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1421,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1901,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2011,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2066,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2095,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/MeCreator2/Configuration.h b/config/examples/Geeetech/MeCreator2/Configuration.h index 90a01126d7..c9af63dcf1 100644 --- a/config/examples/Geeetech/MeCreator2/Configuration.h +++ b/config/examples/Geeetech/MeCreator2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -466,7 +478,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -823,7 +835,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -914,6 +933,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1022,7 +1044,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1115,7 +1137,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1141,7 +1163,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1210,7 +1232,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1237,6 +1259,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1344,17 +1367,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1408,7 +1435,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1888,6 +1915,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1990,6 +2025,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2044,18 +2080,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2073,7 +2109,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/config/examples/Geeetech/MeCreator2/Configuration_adv.h index d4259c53ab..438cc2babb 100644 --- a/config/examples/Geeetech/MeCreator2/Configuration_adv.h +++ b/config/examples/Geeetech/MeCreator2/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1035,7 +1133,7 @@ // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2152,7 +2252,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2212,7 +2312,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Geeetech/Prusa i3 Pro B/README.md b/config/examples/Geeetech/Prusa i3 Pro B/README.md index ffb274caca..30fcf2e443 100644 --- a/config/examples/Geeetech/Prusa i3 Pro B/README.md +++ b/config/examples/Geeetech/Prusa i3 Pro B/README.md @@ -36,4 +36,19 @@ The skew factor must be adjusted for each printer: - Print a suitable mount to attach the sensor to the printer. The example configuration file is adjusted to http://www.geeetech.com/wiki/images/6/61/3DTouch_auto_leveling_sensor-1.zip - Unlike suggested in [geeetech.com/wiki/index.php/3DTouch_Auto_Leveling_Sensor](https://www.geeetech.com/wiki/index.php/3DTouch_Auto_Leveling_Sensor), the existing end stop switch is expected to be kept connected to Z_MIN. So, the sensor is to be connected to Z_MAX, according to Marlin's default settings. Furthermore, GT2560-A+ provides a connector for the servo next to thermistor connectors (see [GT2560](https://www.geeetech.com/wiki/images/thumb/4/45/GT2560_wiring.jpg/700px-GT2560_wiring.jpg) and [GT2560-A+](http://i.imgur.com/E0t34VU.png)). - Be careful to respect the polarity of the sensor when connecting it to the GT2560-A+. Unlike end stops, reversing the connection will prevent the sensor from working properly. -- [Test](http://www.geeetech.com/wiki/index.php/3DTouch_Auto_Leveling_Sensor#Testing) and [calibrate](https://www.geeetech.com/wiki/index.php/3DTouch_Auto_Leveling_Sensor#Calibration) the sensor. \ No newline at end of file +- [Test](http://www.geeetech.com/wiki/index.php/3DTouch_Auto_Leveling_Sensor#Testing) and [calibrate](https://www.geeetech.com/wiki/index.php/3DTouch_Auto_Leveling_Sensor#Calibration) the sensor. +- If using the GT2560-A+ and with the sensor connected to Z_MAX and an endstop connected to Z_MIN use the following calibration routine instead. + +## 3DTouch Calibration with Z_MAX + +- Home the printer with `G28` command. +- Disable the Z axis software endstop with `M211 S0 Z0` +- Reset the probe Z_OFFSET with `M851 Z0` +- Move to the center of the bed with `G1 X100 Y100` +- Move Z incrementally until the nozzle is the correct height from the bed using a shim or piece of paper, record this Z movement, for example -0.2. +- Do a single probe at the current point in the middle of the bed using `G30` and not the returned value, for example 1.9. Invert this value, i.e. -1.9, and add it to the Z offset above, i.e. -0.2 in this example giving -2.1. +- Update the probe Z_OFFSET to this value using `M851` i.e. `M851 Z-2.1`. +- Re-enable software end-stops with `M211 S1 Z0` +- Save this value to the EEPROM with `M500`. +- Update the start G-Code in your slicer software to insert a `G29` after the last `G28`. +- Carefully test that the offset is correct in the first print. diff --git a/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index 6896b383b8..3e9ab18fd3 100644 --- a/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -363,11 +377,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +393,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +411,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +420,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +431,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 125 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -472,7 +483,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -702,7 +713,12 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 78.74, 78.74, 2560, 105 } +#define PRO_B_WITH_LEADSCREW +#if ENABLED(PRO_B_WITH_LEADSCREW) // M8 leadscrew version + #define DEFAULT_AXIS_STEPS_PER_UNIT { 78.74, 78.74, 400, 105 } +#else // M8 threaded rod version + #define DEFAULT_AXIS_STEPS_PER_UNIT { 78.74, 78.74, 2560, 105 } +#endif /** * Default Max Feed Rate (mm/s) @@ -832,7 +848,14 @@ */ #define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -923,6 +946,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1031,7 +1057,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1124,7 +1150,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1150,7 +1176,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 4 @@ -1219,7 +1245,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1246,6 +1272,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1353,17 +1380,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1417,7 +1448,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1897,6 +1928,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1999,6 +2038,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2053,18 +2093,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2082,7 +2122,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index c4c8173e30..a22931c454 100644 --- a/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 125 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -472,7 +484,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -702,7 +714,12 @@ * Override with M92 * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] */ -#define DEFAULT_AXIS_STEPS_PER_UNIT { 78.74, 78.74, 2560, 105 } +#define PRO_B_WITH_LEADSCREW +#if ENABLED(PRO_B_WITH_LEADSCREW) // M8 leadscrew version + #define DEFAULT_AXIS_STEPS_PER_UNIT { 78.74, 78.74, 400, 105 } +#else // M8 threaded rod version + #define DEFAULT_AXIS_STEPS_PER_UNIT { 78.74, 78.74, 2560, 105 } +#endif /** * Default Max Feed Rate (mm/s) @@ -831,7 +848,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -922,6 +946,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1030,7 +1057,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1123,7 +1150,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1149,7 +1176,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 4 @@ -1218,7 +1245,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1245,6 +1272,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1352,17 +1380,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1416,7 +1448,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1896,6 +1928,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1998,6 +2038,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2052,18 +2093,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2081,7 +2122,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h index 9da7890f1b..580c51f872 100644 --- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h index 66ca52a3fe..072b82c5ad 100644 --- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ #define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h b/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h index dac3f22674..11d0a32572 100644 --- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h index 66ca52a3fe..072b82c5ad 100644 --- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h +++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ #define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Infitary/i3-M508/Configuration.h b/config/examples/Infitary/i3-M508/Configuration.h index 81d77f4add..da5b7adf0b 100644 --- a/config/examples/Infitary/i3-M508/Configuration.h +++ b/config/examples/Infitary/i3-M508/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 125 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -466,7 +478,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -820,7 +832,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -911,6 +930,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1019,7 +1041,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1134,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1160,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1229,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1234,6 +1256,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1341,17 +1364,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1405,7 +1432,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1885,6 +1912,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1987,6 +2022,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2041,18 +2077,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2070,7 +2106,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Infitary/i3-M508/Configuration_adv.h b/config/examples/Infitary/i3-M508/Configuration_adv.h index 3993812a34..58e91fe49b 100644 --- a/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 1 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/JGAurora/A5/Configuration.h b/config/examples/JGAurora/A5/Configuration.h index 7f84802dfb..ec26bc97dd 100644 --- a/config/examples/JGAurora/A5/Configuration.h +++ b/config/examples/JGAurora/A5/Configuration.h @@ -223,7 +223,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -254,13 +254,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -312,6 +326,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -368,11 +383,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 15 // manual calibration of thermistor in JGAurora A5 hotend #define TEMP_SENSOR_1 0 @@ -382,7 +399,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 // measured to be satisfactorily accurate on center of bed within +/- 1 degC. #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -401,8 +417,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -412,7 +426,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -424,7 +437,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 120 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -472,7 +484,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -828,7 +840,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -919,6 +938,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1027,7 +1049,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1120,7 +1142,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1146,7 +1168,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 5 @@ -1215,7 +1237,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1242,6 +1264,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1349,17 +1372,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1413,7 +1440,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1893,6 +1920,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1995,6 +2030,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2049,18 +2085,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2078,7 +2114,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/JGAurora/A5/Configuration_adv.h b/config/examples/JGAurora/A5/Configuration_adv.h index 16cb99d105..00f80ecea8 100644 --- a/config/examples/JGAurora/A5/Configuration_adv.h +++ b/config/examples/JGAurora/A5/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 10, 10, 6 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -770,8 +834,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +850,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +960,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1043,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1095,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1124,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1165,8 @@ //#define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1208,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1224,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1417,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1753,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1768,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2265,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2325,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/MakerParts/Configuration.h b/config/examples/MakerParts/Configuration.h index 2703b3f2ef..1846765d2b 100644 --- a/config/examples/MakerParts/Configuration.h +++ b/config/examples/MakerParts/Configuration.h @@ -238,7 +238,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -269,13 +269,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -327,6 +341,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -383,11 +398,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -397,7 +414,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -416,8 +432,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -427,7 +441,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -439,7 +452,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -482,7 +494,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -836,7 +848,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -927,6 +946,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1035,7 +1057,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1128,7 +1150,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1154,7 +1176,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1223,7 +1245,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1250,6 +1272,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1357,17 +1380,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1421,7 +1448,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1901,6 +1928,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2003,6 +2038,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2057,18 +2093,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2086,7 +2122,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/MakerParts/Configuration_adv.h b/config/examples/MakerParts/Configuration_adv.h index 8b111860c3..05ee019c6b 100644 --- a/config/examples/MakerParts/Configuration_adv.h +++ b/config/examples/MakerParts/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Malyan/M150/Configuration.h b/config/examples/Malyan/M150/Configuration.h index 8c9da04337..55396c055d 100644 --- a/config/examples/Malyan/M150/Configuration.h +++ b/config/examples/Malyan/M150/Configuration.h @@ -223,7 +223,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -254,13 +254,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -312,6 +326,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -368,11 +383,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -385,7 +402,6 @@ // The reasons are inconclusive so I leave at 1 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -404,8 +420,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -415,7 +429,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -427,7 +440,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -470,7 +482,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -836,7 +848,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -931,6 +950,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1039,7 +1061,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1136,7 +1158,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1162,7 +1184,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1231,7 +1253,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 50 #define PROBE_PT_1_Y 150 #define PROBE_PT_2_X 50 @@ -1258,6 +1280,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1365,17 +1388,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1429,7 +1456,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1909,6 +1936,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2011,6 +2046,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2065,18 +2101,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2094,7 +2130,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Malyan/M150/Configuration_adv.h b/config/examples/Malyan/M150/Configuration_adv.h index e8dd07fa19..4e7489990b 100644 --- a/config/examples/Malyan/M150/Configuration_adv.h +++ b/config/examples/Malyan/M150/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Malyan/M200/Configuration.h b/config/examples/Malyan/M200/Configuration.h index 8795313eda..a4d17ed268 100644 --- a/config/examples/Malyan/M200/Configuration.h +++ b/config/examples/Malyan/M200/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 11 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 11 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 100 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -461,7 +473,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -815,7 +827,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -906,6 +925,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1014,7 +1036,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1107,7 +1129,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1133,7 +1155,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1202,7 +1224,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1229,6 +1251,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1336,17 +1359,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1400,7 +1427,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1880,6 +1907,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1982,6 +2017,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2036,18 +2072,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2065,7 +2101,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Malyan/M200/Configuration_adv.h b/config/examples/Malyan/M200/Configuration_adv.h index dc1402c407..4211655178 100644 --- a/config/examples/Malyan/M200/Configuration_adv.h +++ b/config/examples/Malyan/M200/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ //#define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Micromake/C1/basic/Configuration.h b/config/examples/Micromake/C1/basic/Configuration.h index 48dbc0d766..07556feb45 100644 --- a/config/examples/Micromake/C1/basic/Configuration.h +++ b/config/examples/Micromake/C1/basic/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -820,7 +832,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -911,6 +930,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1019,7 +1041,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1134,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1160,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1229,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1234,6 +1256,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1341,17 +1364,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1405,7 +1432,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1885,6 +1912,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1987,6 +2022,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2041,18 +2077,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2070,7 +2106,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Micromake/C1/enhanced/Configuration.h b/config/examples/Micromake/C1/enhanced/Configuration.h index 7f100de739..5555d12276 100644 --- a/config/examples/Micromake/C1/enhanced/Configuration.h +++ b/config/examples/Micromake/C1/enhanced/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -820,7 +832,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -911,6 +930,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1019,7 +1041,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1134,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1160,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1229,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1234,6 +1256,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1341,17 +1364,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1405,7 +1432,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1885,6 +1912,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1987,6 +2022,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2041,18 +2077,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2070,7 +2106,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/config/examples/Micromake/C1/enhanced/Configuration_adv.h index 442cd948f7..bf159cd1fa 100644 --- a/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Mks/Robin/Configuration.h b/config/examples/Mks/Robin/Configuration.h index ba3e2814f3..0140f9b0eb 100644 --- a/config/examples/Mks/Robin/Configuration.h +++ b/config/examples/Mks/Robin/Configuration.h @@ -219,7 +219,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -250,13 +250,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -308,6 +322,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -364,11 +379,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 1 @@ -378,7 +395,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -397,8 +413,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -408,7 +422,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -420,7 +433,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -463,7 +475,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -817,7 +829,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -908,6 +927,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1016,7 +1038,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1109,7 +1131,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1135,7 +1157,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1204,7 +1226,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1231,6 +1253,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1338,17 +1361,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1402,7 +1429,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1883,6 +1910,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1985,6 +2020,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2039,18 +2075,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2068,7 +2104,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Mks/Robin/Configuration_adv.h b/config/examples/Mks/Robin/Configuration_adv.h index ec4fdb7c2a..6799d0df02 100644 --- a/config/examples/Mks/Robin/Configuration_adv.h +++ b/config/examples/Mks/Robin/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Mks/Sbase/Configuration.h b/config/examples/Mks/Sbase/Configuration.h index 1c0f9e7a31..c9e9731c52 100644 --- a/config/examples/Mks/Sbase/Configuration.h +++ b/config/examples/Mks/Sbase/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Mks/Sbase/Configuration_adv.h b/config/examples/Mks/Sbase/Configuration_adv.h index 83383a4aaa..4a672e5223 100644 --- a/config/examples/Mks/Sbase/Configuration_adv.h +++ b/config/examples/Mks/Sbase/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -771,8 +838,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -784,8 +854,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -888,6 +964,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -960,19 +1047,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1003,6 +1099,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1030,13 +1128,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1070,7 +1169,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1112,7 +1212,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1127,8 +1228,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1320,6 +1421,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1655,7 +1757,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1670,8 +1772,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2168,7 +2269,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2228,7 +2329,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Printrbot/PrintrboardG2/Configuration.h b/config/examples/Printrbot/PrintrboardG2/Configuration.h index 16c79597d5..005a576f1f 100644 --- a/config/examples/Printrbot/PrintrboardG2/Configuration.h +++ b/config/examples/Printrbot/PrintrboardG2/Configuration.h @@ -219,7 +219,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -250,13 +250,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -308,6 +322,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -364,11 +379,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -378,7 +395,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -397,8 +413,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -408,7 +422,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -420,7 +433,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -463,7 +475,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -824,7 +836,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -915,6 +934,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1023,7 +1045,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1116,7 +1138,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1142,7 +1164,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1211,7 +1233,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1238,6 +1260,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1345,17 +1368,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1409,7 +1436,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1889,6 +1916,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1991,6 +2026,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2045,18 +2081,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver #define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 20 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 20 // LED driving pin #define NEOPIXEL_PIXELS 3 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2074,7 +2110,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RapideLite/RL200/Configuration.h b/config/examples/RapideLite/RL200/Configuration.h index 68c69d1e71..7373e0ca41 100644 --- a/config/examples/RapideLite/RL200/Configuration.h +++ b/config/examples/RapideLite/RL200/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 250 #define HEATER_5_MAXTEMP 250 #define BED_MAXTEMP 120 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RapideLite/RL200/Configuration_adv.h b/config/examples/RapideLite/RL200/Configuration_adv.h index 23554df61c..18a2de5f80 100644 --- a/config/examples/RapideLite/RL200/Configuration_adv.h +++ b/config/examples/RapideLite/RL200/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/RepRapPro/Huxley/Configuration.h b/config/examples/RepRapPro/Huxley/Configuration.h index 72984acb99..3425b43a5c 100644 --- a/config/examples/RepRapPro/Huxley/Configuration.h +++ b/config/examples/RepRapPro/Huxley/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 // Sanguinololu v1.3 with 4.7kOhm pullup #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -856,7 +868,14 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -947,6 +966,9 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1064,7 +1086,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1157,7 +1179,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1183,7 +1205,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1252,7 +1274,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1279,6 +1301,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1386,17 +1409,21 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1450,7 +1477,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE DEFAULT_MAX_Z_FEEDRATE // (mm/s) Z axis feedrate (not used for delta printers) @@ -1930,6 +1957,14 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2032,6 +2067,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2086,18 +2122,18 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2115,7 +2151,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RepRapWorld/Megatronics/Configuration.h b/config/examples/RepRapWorld/Megatronics/Configuration.h index e931fd2993..31df888e75 100644 --- a/config/examples/RepRapWorld/Megatronics/Configuration.h +++ b/config/examples/RepRapWorld/Megatronics/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RigidBot/Configuration.h b/config/examples/RigidBot/Configuration.h index 26cfbc9c4e..eb423d5ab1 100644 --- a/config/examples/RigidBot/Configuration.h +++ b/config/examples/RigidBot/Configuration.h @@ -221,7 +221,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -252,13 +252,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -310,6 +324,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -366,11 +381,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 // DGlass3D = 5; RigidBot = 1; 3DSv6 = 5 #define TEMP_SENSOR_1 0 @@ -380,7 +397,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -399,8 +415,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -410,7 +424,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -422,7 +435,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -465,7 +477,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -814,7 +826,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -905,6 +924,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1013,7 +1035,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1106,7 +1128,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1132,7 +1154,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1201,7 +1223,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1228,6 +1250,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1335,17 +1358,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1399,7 +1426,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/RigidBot/Configuration_adv.h b/config/examples/RigidBot/Configuration_adv.h index c9ea2d442a..a9858fd38e 100644 --- a/config/examples/RigidBot/Configuration_adv.h +++ b/config/examples/RigidBot/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/SCARA/Configuration.h b/config/examples/SCARA/Configuration.h index e639d8277f..4f1d49111b 100644 --- a/config/examples/SCARA/Configuration.h +++ b/config/examples/SCARA/Configuration.h @@ -70,7 +70,7 @@ #define MORGAN_SCARA //#define MAKERARM_SCARA -#if ENABLED(MORGAN_SCARA) || ENABLED(MAKERARM_SCARA) +#if EITHER(MORGAN_SCARA, MAKERARM_SCARA) //#define DEBUG_SCARA_KINEMATICS #define SCARA_FEEDRATE_SCALING // Convert XY feedrate from mm/s to degrees/s on the fly @@ -249,7 +249,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -280,13 +280,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -338,6 +352,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -394,11 +409,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -408,7 +425,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -427,8 +443,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -438,7 +452,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -450,7 +463,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -481,7 +493,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -829,7 +841,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -920,6 +939,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1028,7 +1050,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1121,7 +1143,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1147,7 +1169,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1216,7 +1238,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1243,6 +1265,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1350,17 +1373,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1414,7 +1441,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1894,6 +1921,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1996,6 +2031,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2050,18 +2086,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2079,7 +2115,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/SCARA/Configuration_adv.h b/config/examples/SCARA/Configuration_adv.h index c1da974fa0..b58848792c 100644 --- a/config/examples/SCARA/Configuration_adv.h +++ b/config/examples/SCARA/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 3000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 3 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -770,8 +834,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + //#define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +850,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +960,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1043,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1095,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1124,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1165,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1208,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1224,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1417,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1753,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1768,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2265,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2325,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/STM32/Black_STM32F407VET6/Configuration.h b/config/examples/STM32/Black_STM32F407VET6/Configuration.h new file mode 100644 index 0000000000..eb5af29aa3 --- /dev/null +++ b/config/examples/STM32/Black_STM32F407VET6/Configuration.h @@ -0,0 +1,2132 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Configuration.h + * + * Basic settings such as: + * + * - Type of electronics + * - Type of temperature sensor + * - Printer geometry + * - Endstop configuration + * - LCD controller + * - Extra features + * + * Advanced settings can be found in Configuration_adv.h + * + */ +#define CONFIGURATION_H_VERSION 020000 + +//=========================================================================== +//============================= Getting Started ============================= +//=========================================================================== + +/** + * Here are some standard links for getting your machine calibrated: + * + * http://reprap.org/wiki/Calibration + * http://youtu.be/wAL9d7FgInk + * http://calculator.josefprusa.cz + * http://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * http://www.thingiverse.com/thing:5573 + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * http://www.thingiverse.com/thing:298812 + */ + +//=========================================================================== +//============================= DELTA Printer =============================== +//=========================================================================== +// For a Delta printer start with one of the configuration files in the +// config/examples/delta directory and customize for your machine. +// + +//=========================================================================== +//============================= SCARA Printer =============================== +//=========================================================================== +// For a SCARA printer start with the configuration files in +// config/examples/SCARA and customize for your machine. +// + +// @section info + +// User-specified version info of this build to display in [Pronterface, etc] terminal window during +// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this +// build by the user have been successfully uploaded into firmware. +#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes. +#define SHOW_BOOTSCREEN +#define STRING_SPLASH_LINE1 SHORT_BUILD_VERSION // will be shown during bootup in line 1 +#define STRING_SPLASH_LINE2 WEBSITE_URL // will be shown during bootup in line 2 + +/** + * *** VENDORS PLEASE READ *** + * + * Marlin allows you to add a custom boot image for Graphical LCDs. + * With this option Marlin will first show your custom screen followed + * by the standard Marlin logo with version number and web URL. + * + * We encourage you to take advantage of this new feature and we also + * respectfully request that you retain the unmodified Marlin boot screen. + */ + +// Enable to show the bitmap in Marlin/_Bootscreen.h on startup. +//#define SHOW_CUSTOM_BOOTSCREEN + +// Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. +//#define CUSTOM_STATUS_SCREEN_IMAGE + +// @section machine + +/** + * Select the serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT -1 + +/** + * Select a secondary serial port on the board to use for communication with the host. + * This allows the connection of wireless adapters (for instance) to non-default port pins. + * Serial port -1 is the USB emulated serial port, if available. + * + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +#define SERIAL_PORT_2 1 + +/** + * This setting determines the communication speed of the printer. + * + * 250000 works in most cases, but you might try a lower speed if + * you commonly experience drop-outs during host printing. + * You may try up to 1000000 to speed up SD file transfer. + * + * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] + */ +#define BAUDRATE 250000 + +// Enable the Bluetooth serial interface on AT90USB devices +//#define BLUETOOTH + +// The following define selects which electronics board you have. +// Please choose the name from boards.h that matches your setup +#ifndef MOTHERBOARD + #define MOTHERBOARD BOARD_BLACK_STM32F407VE +#endif + +// Optional custom name for your RepStrap or other custom machine +// Displayed in the LCD "Ready" message +//#define CUSTOM_MACHINE_NAME "3D Printer" + +// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines) +// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4) +//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" + +// @section extruder + +// This defines the number of extruders +// :[1, 2, 3, 4, 5, 6] +#define EXTRUDERS 2 + +// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. +#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 + +// For Cyclops or any "multi-extruder" that shares a single nozzle. +//#define SINGLENOZZLE + +/** + * Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants. + * + * This device allows one stepper driver on a control board to drive + * two to eight stepper motors, one at a time, in a manner suitable + * for extruders. + * + * This option only allows the multiplexer to switch on tool-change. + * Additional options to configure custom E moves are pending. + */ +//#define MK2_MULTIPLEXER +#if ENABLED(MK2_MULTIPLEXER) + // Override the default DIO selector pins here, if needed. + // Some pins files may provide defaults for these pins. + //#define E_MUX0_PIN 40 // Always Required + //#define E_MUX1_PIN 42 // Needed for 3 to 8 inputs + //#define E_MUX2_PIN 44 // Needed for 5 to 8 inputs +#endif + +/** + * Prusa Multi-Material Unit v2 + * + * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. + * Requires EXTRUDERS = 5 + * + * For additional configuration see Configuration_adv.h + */ +//#define PRUSA_MMU2 + +// A dual extruder that uses a single stepper motor +//#define SWITCHING_EXTRUDER +#if ENABLED(SWITCHING_EXTRUDER) + #define SWITCHING_EXTRUDER_SERVO_NR 0 + #define SWITCHING_EXTRUDER_SERVO_ANGLES { 0, 90 } // Angles for E0, E1[, E2, E3] + #if EXTRUDERS > 3 + #define SWITCHING_EXTRUDER_E23_SERVO_NR 1 + #endif +#endif + +// A dual-nozzle that uses a servomotor to raise/lower one (or both) of the nozzles +//#define SWITCHING_NOZZLE +#if ENABLED(SWITCHING_NOZZLE) + #define SWITCHING_NOZZLE_SERVO_NR 0 + //#define SWITCHING_NOZZLE_E1_SERVO_NR 1 // If two servos are used, the index of the second + #define SWITCHING_NOZZLE_SERVO_ANGLES { 0, 90 } // Angles for E0, E1 (single servo) or lowered/raised (dual servo) +#endif + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN. + */ +//#define PARKING_EXTRUDER + +/** + * Two separate X-carriages with extruders that connect to a moving part + * via a magnetic docking mechanism using movements and no solenoid + * + * project : https://www.thingiverse.com/thing:3080893 + * movements : https://youtu.be/0xCEiG9VS3k + * https://youtu.be/Bqbcs0CU2FE + */ +//#define MAGNETIC_PARKING_EXTRUDER + +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders + #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #if ENABLED(PARKING_EXTRUDER) + + #define PARKING_EXTRUDER_SOLENOIDS_INVERT // If enabled, the solenoid is NOT magnetized with applied voltage + #define PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE LOW // LOW or HIGH pin signal energizes the coil + #define PARKING_EXTRUDER_SOLENOIDS_DELAY 250 // (ms) Delay for magnetic field. No delay if 0 or not defined. + //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 + + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + + #define MPE_FAST_SPEED 9000 // (mm/m) Speed for travel before last distance point + #define MPE_SLOW_SPEED 4500 // (mm/m) Speed for last distance travel to park and couple + #define MPE_TRAVEL_DISTANCE 10 // (mm) Last distance point + #define MPE_COMPENSATION 0 // Offset Compensation -1 , 0 , 1 (multiplier) only for coupling + + #endif + +#endif + +/** + * Switching Toolhead + * + * Support for swappable and dockable toolheads, such as + * the E3D Tool Changer. Toolheads are locked with a servo. + */ +//#define SWITCHING_TOOLHEAD + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif +#endif + +/** + * "Mixing Extruder" + * - Adds G-codes M163 and M164 to set and "commit" the current mix factors. + * - Extends the stepping routines to move multiple steppers in proportion to the mix. + * - Optional support for Repetier Firmware's 'M164 S' supporting virtual tools. + * - This implementation supports up to two mixing extruders. + * - Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation). + */ +//#define MIXING_EXTRUDER +#if ENABLED(MIXING_EXTRUDER) + #define MIXING_STEPPERS 2 // Number of steppers in your mixing extruder + #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 + //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands + //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + #if ENABLED(GRADIENT_MIX) + //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias + #endif +#endif + +// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing). +// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). +// For the other hotends it is their distance from the extruder 0 hotend. +//#define HOTEND_OFFSET_X {0.0, 20.00} // (mm) relative X-offset for each nozzle +//#define HOTEND_OFFSET_Y {0.0, 5.00} // (mm) relative Y-offset for each nozzle +//#define HOTEND_OFFSET_Z {0.0, 0.00} // (mm) relative Z-offset for each nozzle + +// @section machine + +/** + * Select your power supply here. Use 0 if you haven't connected the PS_ON_PIN + * + * 0 = No Power Switch + * 1 = ATX + * 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC) + * + * :{ 0:'No power switch', 1:'ATX', 2:'X-Box 360' } + */ +#define POWER_SUPPLY 0 + +#if POWER_SUPPLY > 0 + // Enable this option to leave the PSU off at startup. + // Power to steppers and heaters will need to be turned on with M80. + //#define PS_DEFAULT_OFF + + //#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin + #if ENABLED(AUTO_POWER_CONTROL) + #define AUTO_POWER_FANS // Turn on PSU if fans need power + #define AUTO_POWER_E_FANS + #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN + #define POWER_TIMEOUT 30 + #endif + +#endif + +// @section temperature + +//=========================================================================== +//============================= Thermal Settings ============================ +//=========================================================================== + +/** + * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * + * Temperature sensors available: + * + * -4 : thermocouple with AD8495 + * -3 : thermocouple with MAX31855 (only for sensor 0) + * -2 : thermocouple with MAX6675 (only for sensor 0) + * -1 : thermocouple with AD595 + * 0 : not used + * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) + * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) + * 3 : Mendel-parts thermistor (4.7k pullup) + * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! + * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) + * 501 : 100K Zonestar (Tronxy X3A) Thermistor + * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) + * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) + * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) + * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) + * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) + * 10 : 100k RS thermistor 198-961 (4.7k pullup) + * 11 : 100k beta 3950 1% thermistor (4.7k pullup) + * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) + * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" + * 15 : 100k thermistor calibration for JGAurora A5 hotend + * 20 : the PT100 circuit found in the Ultimainboard V2.x + * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 + * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup + * 66 : 4.7M High Temperature thermistor from Dyze Design + * 67 : 450C thermistor from SliceEngineering + * 70 : the 100K thermistor found in the bq Hephestos 2 + * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor + * + * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. + * (but gives greater accuracy and more stable PID) + * 51 : 100k thermistor - EPCOS (1k pullup) + * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) + * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) + * + * 1047 : Pt1000 with 4k7 pullup + * 1010 : Pt1000 with 1k pullup (non standard) + * 147 : Pt100 with 4k7 pullup + * 110 : Pt100 with 1k pullup (non standard) + * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * + * Use these for Testing or Development purposes. NEVER for production machine. + * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. + * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } + */ +#define TEMP_SENSOR_0 1 +#define TEMP_SENSOR_1 1 +#define TEMP_SENSOR_2 0 +#define TEMP_SENSOR_3 0 +#define TEMP_SENSOR_4 0 +#define TEMP_SENSOR_5 0 +#define TEMP_SENSOR_BED 1 +#define TEMP_SENSOR_CHAMBER 1 + +// Dummy thermistor constant temperature readings, for use with 998 and 999 +#define DUMMY_THERMISTOR_998_VALUE 25 +#define DUMMY_THERMISTOR_999_VALUE 100 + +// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings +// from the two sensors differ too much the print will be aborted. +//#define TEMP_SENSOR_1_AS_REDUNDANT +#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 + +#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 +#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 +#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +// Below this temperature the heater will be switched off +// because it probably indicates a broken thermistor wire. +#define HEATER_0_MINTEMP 5 +#define HEATER_1_MINTEMP 5 +#define HEATER_2_MINTEMP 5 +#define HEATER_3_MINTEMP 5 +#define HEATER_4_MINTEMP 5 +#define HEATER_5_MINTEMP 5 +#define BED_MINTEMP 5 + +// Above this temperature the heater will be switched off. +// This can protect components from overheating, but NOT from shorts and failures. +// (Use MINTEMP for thermistor short/failure protection.) +#define HEATER_0_MAXTEMP 275 +#define HEATER_1_MAXTEMP 275 +#define HEATER_2_MAXTEMP 275 +#define HEATER_3_MAXTEMP 275 +#define HEATER_4_MAXTEMP 275 +#define HEATER_5_MAXTEMP 275 +#define BED_MAXTEMP 150 + +//=========================================================================== +//============================= PID Settings ================================ +//=========================================================================== +// PID Tuning Guide here: http://reprap.org/wiki/PID_Tuning + +// Comment the following line to disable PID and enable bang-bang. +#define PIDTEMP +#define BANG_MAX 255 // Limits current to nozzle while in bang-bang mode; 255=full current +#define PID_MAX BANG_MAX // Limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current +#define PID_K1 0.95 // Smoothing factor within any PID loop +#if ENABLED(PIDTEMP) + //#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM) + //#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM) + //#define PID_DEBUG // Sends debug data to the serial port. + //#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX + //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay + //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders) + // Set/get with gcode: M301 E[extruder number, 0-2] + #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature + // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max. + + // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it + + // Ultimaker + #define DEFAULT_Kp 22.2 + #define DEFAULT_Ki 1.08 + #define DEFAULT_Kd 114 + + // MakerGear + //#define DEFAULT_Kp 7.0 + //#define DEFAULT_Ki 0.1 + //#define DEFAULT_Kd 12 + + // Mendel Parts V9 on 12V + //#define DEFAULT_Kp 63.0 + //#define DEFAULT_Ki 2.25 + //#define DEFAULT_Kd 440 + +#endif // PIDTEMP + +//=========================================================================== +//====================== PID > Bed Temperature Control ====================== +//=========================================================================== + +/** + * PID Bed Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use bed PID until someone else verifies that your hardware works. + */ +//#define PIDTEMPBED + +//#define BED_LIMIT_SWITCHING + +/** + * Max Bed Power + * Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the bed that acts like a divider + * so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED) + */ +#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current + +#if ENABLED(PIDTEMPBED) + + //#define PID_BED_DEBUG // Sends debug data to the serial port. + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) + #define DEFAULT_bedKp 10.00 + #define DEFAULT_bedKi .023 + #define DEFAULT_bedKd 305.4 + + //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) + //from pidautotune + //#define DEFAULT_bedKp 97.1 + //#define DEFAULT_bedKi 1.41 + //#define DEFAULT_bedKd 1675.16 + + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. +#endif // PIDTEMPBED + +// @section extruder + +/** + * Prevent extrusion if the temperature is below EXTRUDE_MINTEMP. + * Add M302 to set the minimum extrusion temperature and/or turn + * cold extrusion prevention on and off. + * + * *** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! *** + */ +#define PREVENT_COLD_EXTRUSION +#define EXTRUDE_MINTEMP 170 + +/** + * Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. + * Note: For Bowden Extruders make this large enough to allow load/unload. + */ +#define PREVENT_LENGTHY_EXTRUDE +#define EXTRUDE_MAXLENGTH 200 + +//=========================================================================== +//======================== Thermal Runaway Protection ======================= +//=========================================================================== + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * If you get "Thermal Runaway" or "Heating failed" errors the + * details can be tuned in Configuration_adv.h + */ + +#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders +#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed +#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber + +//=========================================================================== +//============================= Mechanical Settings ========================= +//=========================================================================== + +// @section machine + +// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics +// either in the usual order or reversed +//#define COREXY +//#define COREXZ +//#define COREYZ +//#define COREYX +//#define COREZX +//#define COREZY + +//=========================================================================== +//============================== Endstop Settings =========================== +//=========================================================================== + +// @section homing + +// Specify here all the endstop connectors that are connected to any endstop or probe. +// Almost all printers will be using one per axis. Probes will use one or more of the +// extra connectors. Leave undefined any used for non-endstop and non-probe purposes. +#define USE_XMIN_PLUG +#define USE_YMIN_PLUG +#define USE_ZMIN_PLUG +//#define USE_XMAX_PLUG +//#define USE_YMAX_PLUG +//#define USE_ZMAX_PLUG + +// Enable pullup for all endstops to prevent a floating state +#define ENDSTOPPULLUPS +#if DISABLED(ENDSTOPPULLUPS) + // Disable ENDSTOPPULLUPS to set pullups individually + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_XMIN + //#define ENDSTOPPULLUP_YMIN + //#define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_ZMIN_PROBE +#endif + +// Enable pulldown for all endstops to prevent a floating state +//#define ENDSTOPPULLDOWNS +#if DISABLED(ENDSTOPPULLDOWNS) + // Disable ENDSTOPPULLDOWNS to set pulldowns individually + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_XMIN + //#define ENDSTOPPULLDOWN_YMIN + //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_ZMIN_PROBE +#endif + +// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). +#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop. +#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe. + +/** + * Stepper Drivers + * + * These settings allow Marlin to tune stepper driver timing and enable advanced options for + * stepper drivers that support them. You may also override timing options in Configuration_adv.h. + * + * A4988 is assumed for unspecified drivers. + * + * Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, + * TMC2130, TMC2130_STANDALONE, TMC2208, TMC2208_STANDALONE, + * TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, + * TMC2160, TMC2160_STANDALONE, TMC5130, TMC5130_STANDALONE, + * TMC5160, TMC5160_STANDALONE + * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] + */ +//#define X_DRIVER_TYPE A4988 +//#define Y_DRIVER_TYPE A4988 +//#define Z_DRIVER_TYPE A4988 +//#define X2_DRIVER_TYPE A4988 +//#define Y2_DRIVER_TYPE A4988 +//#define Z2_DRIVER_TYPE A4988 +//#define Z3_DRIVER_TYPE A4988 +//#define E0_DRIVER_TYPE A4988 +//#define E1_DRIVER_TYPE A4988 +//#define E2_DRIVER_TYPE A4988 +//#define E3_DRIVER_TYPE A4988 +//#define E4_DRIVER_TYPE A4988 +//#define E5_DRIVER_TYPE A4988 + +// Enable this feature if all enabled endstop pins are interrupt-capable. +// This will remove the need to poll the interrupt pins, saving many CPU cycles. +#define ENDSTOP_INTERRUPTS_FEATURE + +/** + * Endstop Noise Threshold + * + * Enable if your probe or endstops falsely trigger due to noise. + * + * - Higher values may affect repeatability or accuracy of some bed probes. + * - To fix noise install a 100nF ceramic capacitor inline with the switch. + * - This feature is not required for common micro-switches mounted on PCBs + * based on the Makerbot design, which already have the 100nF capacitor. + * + * :[2,3,4,5,6,7] + */ +//#define ENDSTOP_NOISE_THRESHOLD 2 + +//============================================================================= +//============================== Movement Settings ============================ +//============================================================================= +// @section motion + +/** + * Default Settings + * + * These settings can be reset by M502 + * + * Note that if EEPROM is enabled, saved values will override these. + */ + +/** + * With this option each E stepper can have its own factors for the + * following movement settings. If fewer factors are given than the + * total number of extruders, the last value applies to the rest. + */ +//#define DISTINCT_E_FACTORS + +/** + * Default Axis Steps Per Unit (steps/mm) + * Override with M92 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 4000, 500 } + +/** + * Default Max Feed Rate (mm/s) + * Override with M203 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_FEEDRATE { 300, 300, 5, 25 } + +/** + * Default Max Acceleration (change/s) change = mm/s + * (Maximum start speed for accelerated moves) + * Override with M201 + * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] + */ +#define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 10000 } + +/** + * Default Acceleration (change/s) change = mm/s + * Override with M204 + * + * M204 P Acceleration + * M204 R Retract Acceleration + * M204 T Travel Acceleration + */ +#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts +#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves + +// +// Use Junction Deviation instead of traditional Jerk Limiting +// +//#define JUNCTION_DEVIATION +#if ENABLED(JUNCTION_DEVIATION) + #define JUNCTION_DEVIATION_MM 0.02 // (mm) Distance from real junction edge +#endif + +/** + * Default Jerk (mm/s) + * Override with M205 X Y Z E + * + * "Jerk" specifies the minimum speed change that requires acceleration. + * When changing speed and direction, if the difference is less than the + * value set here, it may happen instantaneously. + */ +#if DISABLED(JUNCTION_DEVIATION) + #define DEFAULT_XJERK 10.0 + #define DEFAULT_YJERK 10.0 + #define DEFAULT_ZJERK 0.3 +#endif + +#define DEFAULT_EJERK 5.0 // May be used by Linear Advance + +/** + * S-Curve Acceleration + * + * This option eliminates vibration during printing by fitting a Bézier + * curve to move acceleration, producing much smoother direction changes. + * + * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained + */ +//#define S_CURVE_ACCELERATION + +//=========================================================================== +//============================= Z Probe Options ============================= +//=========================================================================== +// @section probes + +// +// See http://marlinfw.org/docs/configuration/probes.html +// + +/** + * Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + * + * Enable this option for a probe connected to the Z Min endstop pin. + */ +#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN + +/** + * Z_MIN_PROBE_PIN + * + * Define this pin if the probe is not connected to Z_MIN_PIN. + * If not defined the default pin for the selected MOTHERBOARD + * will be used. Most of the time the default is what you want. + * + * - The simplest option is to use a free endstop connector. + * - Use 5V for powered (usually inductive) sensors. + * + * - RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin: + * - For simple switches connect... + * - normally-closed switches to GND and D32. + * - normally-open switches to 5V and D32. + * + */ +//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default + +/** + * Probe Type + * + * Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. + * Activate one of these to use Auto Bed Leveling below. + */ + +/** + * The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. + * Use G29 repeatedly, adjusting the Z height at each point with movement commands + * or (with LCD_BED_LEVELING) the LCD controller. + */ +//#define PROBE_MANUALLY +//#define MANUAL_PROBE_START_Z 0.2 + +/** + * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. + * (e.g., an inductive probe or a nozzle-based probe-switch.) + */ +//#define FIX_MOUNTED_PROBE + +/** + * Z Servo Probe, such as an endstop switch on a rotating arm. + */ +//#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector. +//#define Z_SERVO_ANGLES {70,0} // Z Servo Deploy and Stow angles + +/** + * The BLTouch probe uses a Hall effect sensor and emulates a servo. + */ +//#define BLTOUCH +#if ENABLED(BLTOUCH) + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE +#endif + +// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) +//#define SOLENOID_PROBE + +// A sled-mounted probe like those designed by Charles Bell. +//#define Z_PROBE_SLED +//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like. + +// A probe deployed by moving the x-axis, such as the Wilson II's rack-and-pinion probe designed by Marty Rice. +//#define RACK_AND_PINION_PROBE +#if ENABLED(RACK_AND_PINION_PROBE) + #define Z_PROBE_DEPLOY_X X_MIN_POS + #define Z_PROBE_RETRACT_X X_MAX_POS +#endif + +// +// For Z_PROBE_ALLEN_KEY see the Delta example configurations. +// + +/** + * Z Probe to nozzle (X,Y) offset, relative to (0, 0). + * X and Y offsets must be integers. + * + * In the following example the X and Y offsets are both positive: + * #define X_PROBE_OFFSET_FROM_EXTRUDER 10 + * #define Y_PROBE_OFFSET_FROM_EXTRUDER 10 + * + * +-- BACK ---+ + * | | + * L | (+) P | R <-- probe (20,20) + * E | | I + * F | (-) N (+) | G <-- nozzle (10,10) + * T | | H + * | (-) | T + * | | + * O-- FRONT --+ + * (0,0) + */ +#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle] +#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle] +#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle] + +// Certain types of probes need to stay away from edges +#define MIN_PROBE_EDGE 10 + +// X and Y axis travel speed (mm/m) between probes +#define XY_PROBE_SPEED 8000 + +// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2) +#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z + +// Feedrate (mm/m) for the "accurate" probe of each point +#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) + +// The number of probes to perform at each point. +// Set to 2 for a fast/slow probe, using the second probe result. +// Set to 3 or more for slow probes, averaging the results. +//#define MULTIPLE_PROBING 2 + +/** + * Z probes require clearance when deploying, stowing, and moving between + * probe points to avoid hitting the bed and other hardware. + * Servo-mounted probes require extra space for the arm to rotate. + * Inductive probes need space to keep from triggering early. + * + * Use these settings to specify the distance (mm) to raise the probe (or + * lower the bed). The values set here apply over and above any (negative) + * probe Z Offset set with Z_PROBE_OFFSET_FROM_EXTRUDER, M851, or the LCD. + * Only integer values >= 1 are valid here. + * + * Example: `M851 Z-5` with a CLEARANCE of 4 => 9mm from bed to nozzle. + * But: `M851 Z+1` with a CLEARANCE of 2 => 2mm from bed to nozzle. + */ +#define Z_CLEARANCE_DEPLOY_PROBE 10 // Z Clearance for Deploy/Stow +#define Z_CLEARANCE_BETWEEN_PROBES 5 // Z Clearance between probe points +#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes +//#define Z_AFTER_PROBING 5 // Z position after probing is done + +#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping + +// For M851 give a range for adjusting the Z probe offset +#define Z_PROBE_OFFSET_RANGE_MIN -20 +#define Z_PROBE_OFFSET_RANGE_MAX 20 + +// Enable the M48 repeatability test to test probe accuracy +//#define Z_MIN_PROBE_REPEATABILITY_TEST + +// Before deploy/stow pause for user confirmation +//#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif + +/** + * Enable one or more of the following if probing seems unreliable. + * Heaters and/or fans can be disabled during probing to minimize electrical + * noise. A delay can also be added to allow noise and vibration to settle. + * These options are most useful for the BLTouch probe, but may also improve + * readings with inductive probes and piezo sensors. + */ +//#define PROBING_HEATERS_OFF // Turn heaters off when probing +#if ENABLED(PROBING_HEATERS_OFF) + //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) +#endif +//#define PROBING_FANS_OFF // Turn fans off when probing +//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing +//#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors + +// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1 +// :{ 0:'Low', 1:'High' } +#define X_ENABLE_ON 0 +#define Y_ENABLE_ON 0 +#define Z_ENABLE_ON 0 +#define E_ENABLE_ON 0 // For all extruders + +// Disables axis stepper immediately when it's not being used. +// WARNING: When motors turn off there is a chance of losing position accuracy! +#define DISABLE_X false +#define DISABLE_Y false +#define DISABLE_Z false + +// Warn on display about possibly reduced accuracy +//#define DISABLE_REDUCED_ACCURACY_WARNING + +// @section extruder + +#define DISABLE_E false // For all extruders +#define DISABLE_INACTIVE_EXTRUDER // Keep only the active extruder enabled + +// @section machine + +// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. +#define INVERT_X_DIR false +#define INVERT_Y_DIR true +#define INVERT_Z_DIR false + +// @section extruder + +// For direct drive extruder v9 set to true, for geared extruder set to false. +#define INVERT_E0_DIR false +#define INVERT_E1_DIR false +#define INVERT_E2_DIR false +#define INVERT_E3_DIR false +#define INVERT_E4_DIR false +#define INVERT_E5_DIR false + +// @section homing + +//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed + +//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... + // Be sure you have this distance over your Z_MAX_POS in case. + +// Direction of endstops when homing; 1=MAX, -1=MIN +// :[-1,1] +#define X_HOME_DIR -1 +#define Y_HOME_DIR -1 +#define Z_HOME_DIR -1 + +// @section machine + +// The size of the print bed +#define X_BED_SIZE 200 +#define Y_BED_SIZE 200 + +// Travel limits (mm) after homing, corresponding to endstop positions. +#define X_MIN_POS 0 +#define Y_MIN_POS 0 +#define Z_MIN_POS 0 +#define X_MAX_POS X_BED_SIZE +#define Y_MAX_POS Y_BED_SIZE +#define Z_MAX_POS 200 + +/** + * Software Endstops + * + * - Prevent moves outside the set machine bounds. + * - Individual axes can be disabled, if desired. + * - X and Y only apply to Cartesian robots. + * - Use 'M211' to set software endstops on/off or report current state + */ + +// Min software endstops constrain movement within minimum coordinate bounds +#define MIN_SOFTWARE_ENDSTOPS +#if ENABLED(MIN_SOFTWARE_ENDSTOPS) + #define MIN_SOFTWARE_ENDSTOP_X + #define MIN_SOFTWARE_ENDSTOP_Y + #define MIN_SOFTWARE_ENDSTOP_Z +#endif + +// Max software endstops constrain movement within maximum coordinate bounds +#define MAX_SOFTWARE_ENDSTOPS +#if ENABLED(MAX_SOFTWARE_ENDSTOPS) + #define MAX_SOFTWARE_ENDSTOP_X + #define MAX_SOFTWARE_ENDSTOP_Y + #define MAX_SOFTWARE_ENDSTOP_Z +#endif + +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) + //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD +#endif + +/** + * Filament Runout Sensors + * Mechanical or opto endstops are used to check for the presence of filament. + * + * RAMPS-based boards use SERVO3_PIN for the first runout sensor. + * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. + * By default the firmware assumes HIGH=FILAMENT PRESENT. + */ +//#define FILAMENT_RUNOUT_SENSOR +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. + #define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor. + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + + // Set one or more commands to execute on filament runout. + // (After 'M412 H' Marlin will ask the host to handle the process.) + #define FILAMENT_RUNOUT_SCRIPT "M600" + + // After a runout is detected, continue printing this length of filament + // before executing the runout script. Useful for a sensor at the end of + // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. + //#define FILAMENT_RUNOUT_DISTANCE_MM 25 + + #ifdef FILAMENT_RUNOUT_DISTANCE_MM + // Enable this option to use an encoder disc that toggles the runout pin + // as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM + // large enough to avoid false positives.) + //#define FILAMENT_MOTION_SENSOR + #endif +#endif + +//=========================================================================== +//=============================== Bed Leveling ============================== +//=========================================================================== +// @section calibrate + +/** + * Choose one of the options below to enable G29 Bed Leveling. The parameters + * and behavior of G29 will change depending on your selection. + * + * If using a Probe for Z Homing, enable Z_SAFE_HOMING also! + * + * - AUTO_BED_LEVELING_3POINT + * Probe 3 arbitrary points on the bed (that aren't collinear) + * You specify the XY coordinates of all 3 points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_LINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a single tilted plane. Best for a flat bed. + * + * - AUTO_BED_LEVELING_BILINEAR + * Probe several points in a grid. + * You specify the rectangle and the density of sample points. + * The result is a mesh, best for large or uneven beds. + * + * - AUTO_BED_LEVELING_UBL (Unified Bed Leveling) + * A comprehensive bed leveling system combining the features and benefits + * of other systems. UBL also includes integrated Mesh Generation, Mesh + * Validation and Mesh Editing systems. + * + * - MESH_BED_LEVELING + * Probe a grid manually + * The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) + * For machines without a probe, Mesh Bed Leveling provides a method to perform + * leveling in steps so you can manually adjust the Z height at each grid-point. + * With an LCD controller the process is guided step-by-step. + */ +//#define AUTO_BED_LEVELING_3POINT +//#define AUTO_BED_LEVELING_LINEAR +//#define AUTO_BED_LEVELING_BILINEAR +//#define AUTO_BED_LEVELING_UBL +//#define MESH_BED_LEVELING + +/** + * Normally G28 leaves leveling disabled on completion. Enable + * this option to have G28 restore the prior leveling state. + */ +//#define RESTORE_LEVELING_AFTER_G28 + +/** + * Enable detailed logging of G28, G29, M48, etc. + * Turn on with the command 'M111 S32'. + * NOTE: Requires a lot of PROGMEM! + */ +//#define DEBUG_LEVELING_FEATURE + +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) + // Gradually reduce leveling correction until a set height is reached, + // at which point movement will be level to the machine's XY plane. + // The height can be set with M420 Z + #define ENABLE_LEVELING_FADE_HEIGHT + + // For Cartesian machines, instead of dividing moves on mesh boundaries, + // split up moves into short segments like a Delta. This follows the + // contours of the bed more closely than edge-to-edge straight moves. + #define SEGMENT_LEVELED_MOVES + #define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one) + + /** + * Enable the G26 Mesh Validation Pattern tool. + */ + //#define G26_MESH_VALIDATION + #if ENABLED(G26_MESH_VALIDATION) + #define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle. + #define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool. + #define MESH_TEST_HOTEND_TEMP 205 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool. + #define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for the G26 Mesh Validation Tool. + #define G26_XY_FEEDRATE 20 // (mm/s) Feedrate for XY Moves for the G26 Mesh Validation Tool. + #endif + +#endif + +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + + // Set the number of grid points per dimension. + #define GRID_MAX_POINTS_X 3 + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + // Set the boundaries for probing (where the probe can reach). + //#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - (MIN_PROBE_EDGE)) + //#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE + //#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - (MIN_PROBE_EDGE)) + + // Probe along the Y axis, advancing X after each column + //#define PROBE_Y_FIRST + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + // Beyond the probed grid, continue the implied tilt? + // Default is to maintain the height of the nearest edge. + //#define EXTRAPOLATE_BEYOND_GRID + + // + // Experimental Subdivision of the grid by Catmull-Rom method. + // Synthesizes intermediate points to produce a more detailed mesh. + // + //#define ABL_BILINEAR_SUBDIVISION + #if ENABLED(ABL_BILINEAR_SUBDIVISION) + // Number of subdivisions between probe points + #define BILINEAR_SUBDIVISIONS 3 + #endif + + #endif + +#elif ENABLED(AUTO_BED_LEVELING_UBL) + + //=========================================================================== + //========================= Unified Bed Leveling ============================ + //=========================================================================== + + //#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + + #define MESH_INSET 1 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle + #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 + + //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used + // as the Z-Height correction value. + +#elif ENABLED(MESH_BED_LEVELING) + + //=========================================================================== + //=================================== Mesh ================================== + //=========================================================================== + + #define MESH_INSET 10 // Set Mesh bounds as an inset region of the bed + #define GRID_MAX_POINTS_X 3 // Don't use more than 7 points per axis, implementation limited. + #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + + //#define MESH_G28_REST_ORIGIN // After homing all axes ('G28' or 'G28 XYZ') rest Z at Z_MIN_POS + +#endif // BED_LEVELING + +/** + * Points to probe for all 3-point Leveling procedures. + * Override if the automatically selected points are inadequate. + */ +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) + //#define PROBE_PT_1_X 15 + //#define PROBE_PT_1_Y 180 + //#define PROBE_PT_2_X 15 + //#define PROBE_PT_2_Y 20 + //#define PROBE_PT_3_X 170 + //#define PROBE_PT_3_Y 20 +#endif + +/** + * Add a bed leveling sub-menu for ABL or MBL. + * Include a guided procedure if manual probing is enabled. + */ +//#define LCD_BED_LEVELING + +#if ENABLED(LCD_BED_LEVELING) + #define MESH_EDIT_Z_STEP 0.025 // (mm) Step size while manually probing Z axis. + #define LCD_PROBE_Z_RANGE 4 // (mm) Z Range centered on Z_MIN_POS for LCD Z adjustment + //#define MESH_EDIT_MENU // Add a menu to edit mesh points +#endif + +// Add a menu item to move between bed corners for manual bed adjustment +//#define LEVEL_BED_CORNERS + +#if ENABLED(LEVEL_BED_CORNERS) + #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points + //#define LEVEL_CENTER_TOO // Move to the center after the last corner +#endif + +/** + * Commands to execute at the end of G29 probing. + * Useful to retract or move the Z probe out of the way. + */ +//#define Z_PROBE_END_SCRIPT "G1 Z10 F12000\nG1 X15 Y330\nG1 Z0.5\nG1 Z10" + + +// @section homing + +// The center of the bed is at (X=0, Y=0) +//#define BED_CENTER_AT_0_0 + +// Manually set the home position. Leave these undefined for automatic settings. +// For DELTA this is the top-center of the Cartesian print volume. +//#define MANUAL_X_HOME_POS 0 +//#define MANUAL_Y_HOME_POS 0 +//#define MANUAL_Z_HOME_POS 0 + +// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. +// +// With this feature enabled: +// +// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. +// - If stepper drivers time out, it will need X and Y homing again before Z homing. +// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28). +// - Prevent Z homing when the Z probe is outside bed area. +// +//#define Z_SAFE_HOMING + +#if ENABLED(Z_SAFE_HOMING) + #define Z_SAFE_HOMING_X_POINT ((X_BED_SIZE) / 2) // X point for Z homing when homing all axes (G28). + #define Z_SAFE_HOMING_Y_POINT ((Y_BED_SIZE) / 2) // Y point for Z homing when homing all axes (G28). +#endif + +// Homing speeds (mm/m) +#define HOMING_FEEDRATE_XY (50*60) +#define HOMING_FEEDRATE_Z (4*60) + +// Validate that endstops are triggered on homing moves +#define VALIDATE_HOMING_ENDSTOPS + +// @section calibrate + +/** + * Bed Skew Compensation + * + * This feature corrects for misalignment in the XYZ axes. + * + * Take the following steps to get the bed skew in the XY plane: + * 1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185) + * 2. For XY_DIAG_AC measure the diagonal A to C + * 3. For XY_DIAG_BD measure the diagonal B to D + * 4. For XY_SIDE_AD measure the edge A to D + * + * Marlin automatically computes skew factors from these measurements. + * Skew factors may also be computed and set manually: + * + * - Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2 + * - XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD))) + * + * If desired, follow the same procedure for XZ and YZ. + * Use these diagrams for reference: + * + * Y Z Z + * ^ B-------C ^ B-------C ^ B-------C + * | / / | / / | / / + * | / / | / / | / / + * | A-------D | A-------D | A-------D + * +-------------->X +-------------->X +-------------->Y + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR + */ +//#define SKEW_CORRECTION + +#if ENABLED(SKEW_CORRECTION) + // Input all length measurements here: + #define XY_DIAG_AC 282.8427124746 + #define XY_DIAG_BD 282.8427124746 + #define XY_SIDE_AD 200 + + // Or, set the default skew factors directly here + // to override the above measurements: + #define XY_SKEW_FACTOR 0.0 + + //#define SKEW_CORRECTION_FOR_Z + #if ENABLED(SKEW_CORRECTION_FOR_Z) + #define XZ_DIAG_AC 282.8427124746 + #define XZ_DIAG_BD 282.8427124746 + #define YZ_DIAG_AC 282.8427124746 + #define YZ_DIAG_BD 282.8427124746 + #define YZ_SIDE_AD 200 + #define XZ_SKEW_FACTOR 0.0 + #define YZ_SKEW_FACTOR 0.0 + #endif + + // Enable this option for M852 to set skew at runtime + //#define SKEW_CORRECTION_GCODE +#endif + +//============================================================================= +//============================= Additional Features =========================== +//============================================================================= + +// @section extras + +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif + +// +// Host Keepalive +// +// When enabled Marlin will send a busy status message to the host +// every couple of seconds when it can't accept commands. +// +#define HOST_KEEPALIVE_FEATURE // Disable this if your host doesn't like keepalive messages +#define DEFAULT_KEEPALIVE_INTERVAL 2 // Number of seconds between "busy" messages. Set with M113. +#define BUSY_WHILE_HEATING // Some hosts require "busy" messages even during heating + +// +// M100 Free Memory Watcher +// +//#define M100_FREE_MEMORY_WATCHER // Add M100 (Free Memory Watcher) to debug memory usage + +// +// G20/G21 Inch mode support +// +//#define INCH_MODE_SUPPORT + +// +// M149 Set temperature units support +// +//#define TEMPERATURE_UNITS_SUPPORT + +// @section temperature + +// Preheat Constants +#define PREHEAT_1_LABEL "PLA" +#define PREHEAT_1_TEMP_HOTEND 180 +#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 + +#define PREHEAT_2_LABEL "ABS" +#define PREHEAT_2_TEMP_HOTEND 240 +#define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 + +/** + * Nozzle Park + * + * Park the nozzle at the given XYZ position on idle or G27. + * + * The "P" parameter controls the action applied to the Z axis: + * + * P0 (Default) If Z is below park Z raise the nozzle. + * P1 Raise the nozzle always to Z-park height. + * P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. + */ +//#define NOZZLE_PARK_FEATURE + +#if ENABLED(NOZZLE_PARK_FEATURE) + // Specify a park position as { X, Y, Z_raise } + #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } + #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) + #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) +#endif + +/** + * Clean Nozzle Feature -- EXPERIMENTAL + * + * Adds the G12 command to perform a nozzle cleaning process. + * + * Parameters: + * P Pattern + * S Strokes / Repetitions + * T Triangles (P1 only) + * + * Patterns: + * P0 Straight line (default). This process requires a sponge type material + * at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) + * between the start / end points. + * + * P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the + * number of zig-zag triangles to do. "S" defines the number of strokes. + * Zig-zags are done in whichever is the narrower dimension. + * For example, "G12 P1 S1 T3" will execute: + * + * -- + * | (X0, Y1) | /\ /\ /\ | (X1, Y1) + * | | / \ / \ / \ | + * A | | / \ / \ / \ | + * | | / \ / \ / \ | + * | (X0, Y0) | / \/ \/ \ | (X1, Y0) + * -- +--------------------------------+ + * |________|_________|_________| + * T1 T2 T3 + * + * P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. + * "R" specifies the radius. "S" specifies the stroke count. + * Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT. + * + * Caveats: The ending Z should be the same as starting Z. + * Attention: EXPERIMENTAL. G-code arguments may change. + * + */ +//#define NOZZLE_CLEAN_FEATURE + +#if ENABLED(NOZZLE_CLEAN_FEATURE) + // Default number of pattern repetitions + #define NOZZLE_CLEAN_STROKES 12 + + // Default number of triangles + #define NOZZLE_CLEAN_TRIANGLES 3 + + // Specify positions as { X, Y, Z } + #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)} + #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)} + + // Circular pattern radius + #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5 + // Circular pattern circle fragments number + #define NOZZLE_CLEAN_CIRCLE_FN 10 + // Middle point of circle + #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT + + // Moves the nozzle to the initial position + #define NOZZLE_CLEAN_GOBACK +#endif + +/** + * Print Job Timer + * + * Automatically start and stop the print job timer on M104/M109/M190. + * + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * + * The timer can also be controlled with the following commands: + * + * M75 - Start the print job timer + * M76 - Pause the print job timer + * M77 - Stop the print job timer + */ +#define PRINTJOB_TIMER_AUTOSTART + +/** + * Print Counter + * + * Track statistical data such as: + * + * - Total print jobs + * - Total successful print jobs + * - Total failed print jobs + * - Total time printing + * + * View the current statistics with M78. + */ +//#define PRINTCOUNTER + +//============================================================================= +//============================= LCD and SD support ============================ +//============================================================================= + +// @section lcd + +/** + * LCD LANGUAGE + * + * Select the language to display on the LCD. These languages are available: + * + * en, an, bg, ca, cz, da, de, el, el-gr, es, eu, fi, fr, gl, hr, it, + * jp-kana, ko_KR, nl, pl, pt, pt-br, ru, sk, tr, uk, zh_CN, zh_TW, test + * + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp-kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' } + */ +#define LCD_LANGUAGE en + +/** + * LCD Character Set + * + * Note: This option is NOT applicable to Graphical Displays. + * + * All character-based LCDs provide ASCII plus one of these + * language extensions: + * + * - JAPANESE ... the most common + * - WESTERN ... with more accented characters + * - CYRILLIC ... for the Russian language + * + * To determine the language extension installed on your controller: + * + * - Compile and upload with LCD_LANGUAGE set to 'test' + * - Click the controller to view the LCD menu + * - The LCD will display Japanese, Western, or Cyrillic text + * + * See http://marlinfw.org/docs/development/lcd_language.html + * + * :['JAPANESE', 'WESTERN', 'CYRILLIC'] + */ +#define DISPLAY_CHARSET_HD44780 JAPANESE + +/** + * Info Screen Style (0:Classic, 1:Prusa) + * + * :[0:'Classic', 1:'Prusa'] + */ +#define LCD_INFO_SCREEN_STYLE 0 + +/** + * SD CARD + * + * SD Card support is disabled by default. If your controller has an SD slot, + * you must uncomment the following option or it won't work. + * + */ +//#define SDSUPPORT + +/** + * SD CARD: SPI SPEED + * + * Enable one of the following items for a slower SPI transfer speed. + * This may be required to resolve "volume init" errors. + */ +//#define SPI_SPEED SPI_HALF_SPEED +//#define SPI_SPEED SPI_QUARTER_SPEED +//#define SPI_SPEED SPI_EIGHTH_SPEED + +/** + * SD CARD: ENABLE CRC + * + * Use CRC checks and retries on the SD communication. + */ +//#define SD_CHECK_AND_RETRY + +/** + * LCD Menu Items + * + * Disable all menus and only display the Status Screen, or + * just remove some extraneous menu items to recover space. + */ +//#define NO_LCD_MENUS +//#define SLIM_LCD_MENUS + +// +// ENCODER SETTINGS +// +// This option overrides the default number of encoder pulses needed to +// produce one step. Should be increased for high-resolution encoders. +// +//#define ENCODER_PULSES_PER_STEP 4 + +// +// Use this option to override the number of step signals required to +// move between next/prev menu items. +// +//#define ENCODER_STEPS_PER_MENU_ITEM 1 + +/** + * Encoder Direction Options + * + * Test your encoder's behavior first with both options disabled. + * + * Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. + * Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. + * Reversed Value Editing only? Enable BOTH options. + */ + +// +// This option reverses the encoder direction everywhere. +// +// Set this option if CLOCKWISE causes values to DECREASE +// +//#define REVERSE_ENCODER_DIRECTION + +// +// This option reverses the encoder direction for navigating LCD menus. +// +// If CLOCKWISE normally moves DOWN this makes it go UP. +// If CLOCKWISE normally moves UP this makes it go DOWN. +// +//#define REVERSE_MENU_DIRECTION + +// +// Individual Axis Homing +// +// Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. +// +//#define INDIVIDUAL_AXIS_HOMING_MENU + +// +// SPEAKER/BUZZER +// +// If you have a speaker that can produce tones, enable it here. +// By default Marlin assumes you have a buzzer with a fixed frequency. +// +//#define SPEAKER + +// +// The duration and frequency for the UI feedback sound. +// Set these to 0 to disable audio feedback in the LCD menus. +// +// Note: Test audio output with the G-Code: +// M300 S P +// +//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 +//#define LCD_FEEDBACK_FREQUENCY_HZ 5000 + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//======================== (Character-based LCDs) ========================= +//============================================================================= + +// +// RepRapDiscount Smart Controller. +// http://reprap.org/wiki/RepRapDiscount_Smart_Controller +// +// Note: Usually sold with a white PCB. +// +//#define REPRAP_DISCOUNT_SMART_CONTROLLER + +// +// Original RADDS LCD Display+Encoder+SDCardReader +// http://doku.radds.org/dokumentation/lcd-display/ +// +//#define RADDS_DISPLAY + +// +// ULTIMAKER Controller. +// +//#define ULTIMAKERCONTROLLER + +// +// ULTIPANEL as seen on Thingiverse. +// +//#define ULTIPANEL + +// +// PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3) +// http://reprap.org/wiki/PanelOne +// +//#define PANEL_ONE + +// +// GADGETS3D G3D LCD/SD Controller +// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel +// +// Note: Usually sold with a blue PCB. +// +//#define G3D_PANEL + +// +// RigidBot Panel V1.0 +// http://www.inventapart.com/ +// +//#define RIGIDBOT_PANEL + +// +// Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller +// https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html +// +//#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602 + +// +// ANET and Tronxy 20x4 Controller +// +//#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin. + // This LCD is known to be susceptible to electrical interference + // which scrambles the display. Pressing any button clears it up. + // This is a LCD2004 display with 5 analog buttons. + +// +// Generic 16x2, 16x4, 20x2, or 20x4 character-based LCD. +// +//#define ULTRA_LCD + +//============================================================================= +//======================== LCD / Controller Selection ========================= +//===================== (I2C and Shift-Register LCDs) ===================== +//============================================================================= + +// +// CONTROLLER TYPE: I2C +// +// Note: These controllers require the installation of Arduino's LiquidCrystal_I2C +// library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C +// + +// +// Elefu RA Board Control Panel +// http://www.elefu.com/index.php?route=product/product&product_id=53 +// +//#define RA_CONTROL_PANEL + +// +// Sainsmart (YwRobot) LCD Displays +// +// These require F.Malpartida's LiquidCrystal_I2C library +// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home +// +//#define LCD_SAINSMART_I2C_1602 +//#define LCD_SAINSMART_I2C_2004 + +// +// Generic LCM1602 LCD adapter +// +//#define LCM1602 + +// +// PANELOLU2 LCD with status LEDs, +// separate encoder and click inputs. +// +// Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later. +// For more info: https://github.com/lincomatic/LiquidTWI2 +// +// Note: The PANELOLU2 encoder click input can either be directly connected to +// a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). +// +//#define LCD_I2C_PANELOLU2 + +// +// Panucatt VIKI LCD with status LEDs, +// integrated click & L/R/U/D buttons, separate encoder inputs. +// +//#define LCD_I2C_VIKI + +// +// CONTROLLER TYPE: Shift register panels +// + +// +// 2-wire Non-latching LCD SR from https://goo.gl/aJJ4sH +// LCD configuration: http://reprap.org/wiki/SAV_3D_LCD +// +//#define SAV_3DLCD + +// +// 3-wire SR LCD with strobe using 74HC4094 +// https://github.com/mikeshub/SailfishLCD +// Uses the code directly from Sailfish +// +//#define FF_INTERFACEBOARD + +//============================================================================= +//======================= LCD / Controller Selection ======================= +//========================= (Graphical LCDs) ======================== +//============================================================================= + +// +// CONTROLLER TYPE: Graphical 128x64 (DOGM) +// +// IMPORTANT: The U8glib library is required for Graphical Display! +// https://github.com/olikraus/U8glib_Arduino +// + +// +// RepRapDiscount FULL GRAPHIC Smart Controller +// http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller +// +//#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER + +// +// ReprapWorld Graphical LCD +// https://reprapworld.com/?products_details&products_id/1218 +// +//#define REPRAPWORLD_GRAPHICAL_LCD + +// +// Activate one of these if you have a Panucatt Devices +// Viki 2.0 or mini Viki with Graphic LCD +// http://panucatt.com +// +//#define VIKI2 +//#define miniVIKI + +// +// MakerLab Mini Panel with graphic +// controller and SD support - http://reprap.org/wiki/Mini_panel +// +//#define MINIPANEL + +// +// MaKr3d Makr-Panel with graphic controller and SD support. +// http://reprap.org/wiki/MaKr3d_MaKrPanel +// +//#define MAKRPANEL + +// +// Adafruit ST7565 Full Graphic Controller. +// https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/ +// +//#define ELB_FULL_GRAPHIC_CONTROLLER + +// +// BQ LCD Smart Controller shipped by +// default with the BQ Hephestos 2 and Witbox 2. +// +//#define BQ_LCD_SMART_CONTROLLER + +// +// Cartesio UI +// http://mauk.cc/webshop/cartesio-shop/electronics/user-interface +// +//#define CARTESIO_UI + +// +// LCD for Melzi Card with Graphical LCD +// +//#define LCD_FOR_MELZI + +// +// SSD1306 OLED full graphics generic display +// +//#define U8GLIB_SSD1306 + +// +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + +// +// Original Ulticontroller from Ultimaker 2 printer with SSD1309 I2C display and encoder +// https://github.com/Ultimaker/Ultimaker2/tree/master/1249_Ulticontroller_Board_(x1) +// +//#define ULTI_CONTROLLER + +// +// TinyBoy2 128x64 OLED / Encoder Panel +// +//#define OLED_PANEL_TINYBOY2 + +// +// MKS MINI12864 with graphic controller and SD support +// http://reprap.org/wiki/MKS_MINI_12864 +// +//#define MKS_MINI_12864 + +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + +// +// Factory display for Creality CR-10 +// https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html +// +// This is RAMPS-compatible using a single 10-pin connector. +// (For CR-10 owners who want to replace the Melzi Creality board but retain the display) +// +//#define CR10_STOCKDISPLAY + +// +// ANET and Tronxy Graphical Controller +// +// Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6 +// A clone of the RepRapDiscount full graphics display but with +// different pins/wiring (see pins_ANET_10.h). +// +//#define ANET_FULL_GRAPHICS_LCD + +// +// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER +// http://reprap.org/wiki/MKS_12864OLED +// +// Tiny, but very sharp OLED display +// +//#define MKS_12864OLED // Uses the SH1106 controller (default) +//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller + +// +// AZSMZ 12864 LCD with SD +// https://www.aliexpress.com/store/product/3D-printer-smart-controller-SMART-RAMPS-OR-RAMPS-1-4-LCD-12864-LCD-control-panel-green/2179173_32213636460.html +// +//#define AZSMZ_12864 + +// +// Silvergate GLCD controller +// http://github.com/android444/Silvergate +// +//#define SILVER_GATE_GLCD_CONTROLLER + +// +// Extensible UI +// +// Enable third-party or vendor customized user interfaces that aren't +// packaged with Marlin. Source code for the user interface will need to +// be placed in "src/lcd/extensible_ui/lib" +// +//#define EXTENSIBLE_UI + +//============================================================================= +//=============================== Graphical TFTs ============================== +//============================================================================= + +// +// MKS Robin 320x240 color display +// +//#define MKS_ROBIN_TFT + +//============================================================================= +//============================ Other Controllers ============================ +//============================================================================= + +// +// CONTROLLER TYPE: Standalone / Serial +// + +// +// LCD for Malyan M200 printers. +// +//#define MALYAN_LCD + +// +// CONTROLLER TYPE: Keypad / Add-on +// + +// +// RepRapWorld REPRAPWORLD_KEYPAD v1.1 +// http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626 +// +// REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key +// is pressed, a value of 10.0 means 10mm per click. +// +//#define REPRAPWORLD_KEYPAD +//#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 + +//============================================================================= +//=============================== Extra Features ============================== +//============================================================================= + +// @section extras + +// Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino +//#define FAST_PWM_FAN + +// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency +// which is not as annoying as with the hardware PWM. On the other hand, if this frequency +// is too low, you should also increment SOFT_PWM_SCALE. +//#define FAN_SOFT_PWM + +// Incrementing this by 1 will double the software PWM frequency, +// affecting heaters, and the fan if FAN_SOFT_PWM is enabled. +// However, control resolution will be halved for each increment; +// at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] +#define SOFT_PWM_SCALE 0 + +// If SOFT_PWM_SCALE is set to a value higher than 0, dithering can +// be used to mitigate the associated resolution loss. If enabled, +// some of the PWM cycles are stretched so on average the desired +// duty cycle is attained. +//#define SOFT_PWM_DITHER + +// Temperature status LEDs that display the hotend and bed temperature. +// If all hotends, bed temperature, and target temperature are under 54C +// then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis) +//#define TEMP_STAT_LEDS + +// SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure +//#define SF_ARC_FIX + +// Support for the BariCUDA Paste Extruder +//#define BARICUDA + +// Support for BlinkM/CyzRgb +//#define BLINKM + +// Support for PCA9632 PWM LED driver +//#define PCA9632 + +// Support for PCA9533 PWM LED driver +// https://github.com/mikeshub/SailfishRGB_LED +//#define PCA9533 + +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * For Neopixel LED an overall brightness parameter is also available. + * + * *** CAUTION *** + * LED Strips require a MOSFET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * NOTE: A separate 5V power supply is required! The Neopixel LED needs + * more current than the Arduino 5V linear regulator can produce. + * *** CAUTION *** + * + * LED Type. Enable only one of the following two options. + * + */ +//#define RGB_LED +//#define RGBW_LED + +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 +#endif + +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_LED +#if ENABLED(NEOPIXEL_LED) + #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) + #define NEOPIXEL_PIN 4 // LED driving pin + #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip + #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. + #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - Change to green once print has finished + * - Turn off after the print has finished and the user has pushed a button + */ +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) + #define PRINTER_EVENT_LEDS +#endif + +/** + * R/C SERVO support + * Sponsored by TrinityLabs, Reworked by codexmas + */ + +/** + * Number of servos + * + * For some servo-related options NUM_SERVOS will be set automatically. + * Set this manually if there are extra servos needing manual control. + * Leave undefined or set to 0 to entirely disable the servo subsystem. + */ +#define NUM_SERVOS 2 // Servo index starts with 0 for M280 command + +// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle. +// 300ms is a good value but you can try less delay. +// If the servo can't reach the requested position, increase it. +#define SERVO_DELAY { 300, 300 } + +// Only power servos during movement, otherwise leave off to prevent jitter +//#define DEACTIVATE_SERVOS_AFTER_MOVE + +// Allow servo angle to be edited and saved to EEPROM +//#define EDITABLE_SERVO_ANGLES diff --git a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h new file mode 100644 index 0000000000..1a978afade --- /dev/null +++ b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h @@ -0,0 +1,2415 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (C) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Configuration_adv.h + * + * Advanced settings. + * Only change these if you know exactly what you're doing. + * Some of these settings can damage your printer if improperly set! + * + * Basic settings can be found in Configuration.h + * + */ +#define CONFIGURATION_ADV_H_VERSION 020000 + +// @section temperature + +//=========================================================================== +//=============================Thermal Settings ============================ +//=========================================================================== + +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + +// +// Hephestos 2 24V heated bed upgrade kit. +// https://store.bq.com/en/heated-bed-kit-hephestos2 +// +//#define HEPHESTOS2_HEATED_BED_KIT +#if ENABLED(HEPHESTOS2_HEATED_BED_KIT) + #undef TEMP_SENSOR_BED + #define TEMP_SENSOR_BED 70 + #define HEATER_BED_INVERTING true +#endif + +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + +#if DISABLED(PIDTEMPBED) + #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control + #if ENABLED(BED_LIMIT_SWITCHING) + #define BED_HYSTERESIS 2 // Only disable heating if T>target+BED_HYSTERESIS and enable heating if T>target-BED_HYSTERESIS + #endif +#endif + +/** + * Thermal Protection provides additional protection to your printer from damage + * and fire. Marlin always includes safe min and max temperature ranges which + * protect against a broken or disconnected thermistor wire. + * + * The issue: If a thermistor falls out, it will report the much lower + * temperature of the air in the room, and the the firmware will keep + * the heater on. + * + * The solution: Once the temperature reaches the target, start observing. + * If the temperature stays too far below the target (hysteresis) for too + * long (period), the firmware will halt the machine as a safety precaution. + * + * If you get false positives for "Thermal Runaway", increase + * THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD + */ +#if ENABLED(THERMAL_PROTECTION_HOTENDS) + #define THERMAL_PROTECTION_PERIOD 40 // Seconds + #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius + + //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) + //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 + #endif + + /** + * Whenever an M104, M109, or M303 increases the target temperature, the + * firmware will wait for the WATCH_TEMP_PERIOD to expire. If the temperature + * hasn't increased by WATCH_TEMP_INCREASE degrees, the machine is halted and + * requires a hard reset. This test restarts with any M104/M109/M303, but only + * if the current temperature is far enough below the target for a reliable + * test. + * + * If you get false positives for "Heating failed", increase WATCH_TEMP_PERIOD + * and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set + * below 2. + */ + #define WATCH_TEMP_PERIOD 20 // Seconds + #define WATCH_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the bed are just as above for hotends. + */ +#if ENABLED(THERMAL_PROTECTION_BED) + #define THERMAL_PROTECTION_BED_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius + + /** + * As described above, except for the bed (M140/M190/M303). + */ + #define WATCH_BED_TEMP_PERIOD 60 // Seconds + #define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius +#endif + +/** + * Thermal Protection parameters for the heated chamber. + */ +#if ENABLED(THERMAL_PROTECTION_CHAMBER) + #define THERMAL_PROTECTION_CHAMBER_PERIOD 20 // Seconds + #define THERMAL_PROTECTION_CHAMBER_HYSTERESIS 2 // Degrees Celsius + + /** + * Heated chamber watch settings (M141/M191). + */ + #define WATCH_CHAMBER_TEMP_PERIOD 60 // Seconds + #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius +#endif + +#if ENABLED(PIDTEMP) + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. + //#define PID_EXTRUSION_SCALING + #if ENABLED(PID_EXTRUSION_SCALING) + #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) + #define LPQ_MAX_LEN 50 + #endif +#endif + +/** + * Automatic Temperature: + * The hotend target temperature is calculated by all the buffered lines of gcode. + * The maximum buffered steps/sec of the extruder motor is called "se". + * Start autotemp mode with M109 S B F + * The target temperature is set to mintemp+factor*se[steps/sec] and is limited by + * mintemp and maxtemp. Turn this off by executing M109 without F* + * Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp. + * On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode + */ +#define AUTOTEMP +#if ENABLED(AUTOTEMP) + #define AUTOTEMP_OLDWEIGHT 0.98 +#endif + +// Show extra position information in M114 +//#define M114_DETAIL + +// Show Temperature ADC value +// Enable for M105 to include ADC values read from temperature sensors. +//#define SHOW_TEMP_ADC_VALUES + +/** + * High Temperature Thermistor Support + * + * Thermistors able to support high temperature tend to have a hard time getting + * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * will probably be caught when the heating element first turns on during the + * preheating process, which will trigger a min_temp_error as a safety measure + * and force stop everything. + * To circumvent this limitation, we allow for a preheat time (during which, + * min_temp_error won't be triggered) and add a min_temp buffer to handle + * aberrant readings. + * + * If you want to enable this feature for your hotend thermistor(s) + * uncomment and set values > 0 in the constants below + */ + +// The number of consecutive low temperature errors that can occur +// before a min_temp_error is triggered. (Shouldn't be more than 10.) +//#define MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED 0 + +// The number of milliseconds a hotend will preheat before starting to check +// the temperature. This value should NOT be set to the time it takes the +// hot end to reach the target temperature, but the time it takes to reach +// the minimum temperature your thermistor can read. The lower the better/safer. +// This shouldn't need to be more than 30 seconds (30000) +//#define MILLISECONDS_PREHEAT_TIME 0 + +// @section extruder + +// Extruder runout prevention. +// If the machine is idle and the temperature over MINTEMP +// then extrude some filament every couple of SECONDS. +//#define EXTRUDER_RUNOUT_PREVENT +#if ENABLED(EXTRUDER_RUNOUT_PREVENT) + #define EXTRUDER_RUNOUT_MINTEMP 190 + #define EXTRUDER_RUNOUT_SECONDS 30 + #define EXTRUDER_RUNOUT_SPEED 1500 // (mm/m) + #define EXTRUDER_RUNOUT_EXTRUDE 5 // (mm) +#endif + +// @section temperature + +// Calibration for AD595 / AD8495 sensor to adjust temperature measurements. +// The final temperature is calculated as (measuredTemp * GAIN) + OFFSET. +#define TEMP_SENSOR_AD595_OFFSET 0.0 +#define TEMP_SENSOR_AD595_GAIN 1.0 +#define TEMP_SENSOR_AD8495_OFFSET 0.0 +#define TEMP_SENSOR_AD8495_GAIN 1.0 + +/** + * Controller Fan + * To cool down the stepper drivers and MOSFETs. + * + * The fan will turn on automatically whenever any stepper is enabled + * and turn off after a set period after all steppers are turned off. + */ +//#define USE_CONTROLLER_FAN +#if ENABLED(USE_CONTROLLER_FAN) + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + #define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled + #define CONTROLLERFAN_SPEED 255 // 255 == full speed +#endif + +// When first starting the main fan, run it at full speed for the +// given number of milliseconds. This gets the fan spinning reliably +// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu) +//#define FAN_KICKSTART_TIME 100 + +/** + * PWM Fan Scaling + * + * Define the min/max speeds for PWM fans (as set with M106). + * + * With these options the M106 0-255 value range is scaled to a subset + * to ensure that the fan has enough power to spin, or to run lower + * current fans with higher current. (e.g., 5V/12V fans with 12V/24V) + * Value 0 always turns off the fan. + * + * Define one or both of these to override the default 0-255 range. + */ +//#define FAN_MIN_PWM 50 +//#define FAN_MAX_PWM 128 + +/** + * FAST PWM FAN Settings + * + * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h) + * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a + * frequency as close as possible to the desired frequency. + * + * FAST_PWM_FAN_FREQUENCY [undefined by default] + * Set this to your desired frequency. + * If left undefined this defaults to F = F_CPU/(2*255*1) + * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers + * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. + * + * USE_OCR2A_AS_TOP [undefined by default] + * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: + * 16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz] + * 20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz] + * A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of + * PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.) + * USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies. + */ +#if ENABLED(FAST_PWM_FAN) + //#define FAST_PWM_FAN_FREQUENCY 31400 + //#define USE_OCR2A_AS_TOP +#endif + +// @section extruder + +/** + * Extruder cooling fans + * + * Extruder auto fans automatically turn on when their extruders' + * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. + * + * Your board's pins file specifies the recommended pins. Override those here + * or set to -1 to disable completely. + * + * Multiple extruders can be assigned to the same pin in which case + * the fan will turn on when any selected extruder is above the threshold. + */ +#define E0_AUTO_FAN_PIN FAN1_PIN +#define E1_AUTO_FAN_PIN FAN2_PIN +#define E2_AUTO_FAN_PIN -1 +#define E3_AUTO_FAN_PIN -1 +#define E4_AUTO_FAN_PIN -1 +#define E5_AUTO_FAN_PIN -1 +#define CHAMBER_AUTO_FAN_PIN -1 +#define EXTRUDER_AUTO_FAN_TEMPERATURE 50 +#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed + +/** + * Part-Cooling Fan Multiplexer + * + * This feature allows you to digitally multiplex the fan output. + * The multiplexer is automatically switched at tool-change. + * Set FANMUX[012]_PINs below for up to 2, 4, or 8 multiplexed fans. + */ +#define FANMUX0_PIN -1 +#define FANMUX1_PIN -1 +#define FANMUX2_PIN -1 + +/** + * M355 Case Light on-off / brightness + */ +//#define CASE_LIGHT_ENABLE +#if ENABLED(CASE_LIGHT_ENABLE) + //#define CASE_LIGHT_PIN 4 // Override the default pin if needed + #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW + #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on + #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) + //#define MENU_ITEM_CASE_LIGHT // Add a Case Light option to the LCD main menu + //#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED. + #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) + #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + #endif +#endif + +//=========================================================================== +//============================ Mechanical Settings ========================== +//=========================================================================== + +// @section homing + +// If you want endstops to stay on (by default) even when not homing +// enable this option. Override at any time with M120, M121. +//#define ENDSTOPS_ALWAYS_ON_DEFAULT + +// @section extras + +//#define Z_LATE_ENABLE // Enable Z the last moment. Needed if your Z driver overheats. + +// Employ an external closed loop controller. Override pins here if needed. +//#define EXTERNAL_CLOSED_LOOP_CONTROLLER +#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) + //#define CLOSED_LOOP_ENABLE_PIN -1 + //#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1 +#endif + +/** + * Dual Steppers / Dual Endstops + * + * This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes. + * + * For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to + * spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop + * set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug + * that should be used for the second endstop. Extra endstops will appear in the output of 'M119'. + * + * Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors + * this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error + * in X2. Dual endstop offsets can be set at runtime with 'M666 X Y Z'. + */ + +//#define X_DUAL_STEPPER_DRIVERS +#if ENABLED(X_DUAL_STEPPER_DRIVERS) + #define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions + //#define X_DUAL_ENDSTOPS + #if ENABLED(X_DUAL_ENDSTOPS) + #define X2_USE_ENDSTOP _XMAX_ + #define X_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Y_DUAL_STEPPER_DRIVERS +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) + #define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions + //#define Y_DUAL_ENDSTOPS + #if ENABLED(Y_DUAL_ENDSTOPS) + #define Y2_USE_ENDSTOP _YMAX_ + #define Y_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_DUAL_STEPPER_DRIVERS +#if ENABLED(Z_DUAL_STEPPER_DRIVERS) + //#define Z_DUAL_ENDSTOPS + #if ENABLED(Z_DUAL_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z_DUAL_ENDSTOPS_ADJUSTMENT 0 + #endif +#endif + +//#define Z_TRIPLE_STEPPER_DRIVERS +#if ENABLED(Z_TRIPLE_STEPPER_DRIVERS) + //#define Z_TRIPLE_ENDSTOPS + #if ENABLED(Z_TRIPLE_ENDSTOPS) + #define Z2_USE_ENDSTOP _XMAX_ + #define Z3_USE_ENDSTOP _YMAX_ + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT2 0 + #define Z_TRIPLE_ENDSTOPS_ADJUSTMENT3 0 + #endif +#endif + +/** + * Dual X Carriage + * + * This setup has two X carriages that can move independently, each with its own hotend. + * The carriages can be used to print an object with two colors or materials, or in + * "duplication mode" it can print two identical or X-mirrored objects simultaneously. + * The inactive carriage is parked automatically to prevent oozing. + * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. + * By default the X2 stepper is assigned to the first unused E plug on the board. + * + * The following Dual X Carriage modes can be selected with M605 S: + * + * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel + * results as long as it supports dual X-carriages. (M605 S0) + * + * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so + * that additional slicer support is not required. (M605 S1) + * + * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with + * the first X-carriage and extruder, to print 2 copies of the same object at the same time. + * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S2 to initiate duplicated movement. + * + * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates + * the movement of the first except the second extruder is reversed in the X axis. + * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and + * follow with M605 S3 to initiate mirrored movement. + */ +//#define DUAL_X_CARRIAGE +#if ENABLED(DUAL_X_CARRIAGE) + #define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS + #define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage + #define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage + #define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed + #define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position + #define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS. + // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software + // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops + // without modifying the firmware (through the "M218 T1 X???" command). + // Remember: you should set the second extruder x-offset to 0 in your slicer. + + // This is the default power-up mode which can be later using M605. + #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE + + // Default x offset in duplication mode (typically set to half print bed width) + #define DEFAULT_DUPLICATION_X_OFFSET 100 + +#endif // DUAL_X_CARRIAGE + +// Activate a solenoid on the active extruder with M380. Disable all with M381. +// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid. +//#define EXT_SOLENOID + +// @section homing + +// Homing hits each endstop, retracts by these distances, then does a slower bump. +#define X_HOME_BUMP_MM 5 +#define Y_HOME_BUMP_MM 5 +#define Z_HOME_BUMP_MM 2 +#define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) +//#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing + +// When G28 is called, this option will make Y home before X +//#define HOME_Y_BEFORE_X + +// Enable this if X or Y can't home without homing the other axis first. +//#define CODEPENDENT_XY_HOMING + +/** + * Z Steppers Auto-Alignment + * Add the G34 command to align multiple Z steppers using a bed probe. + */ +//#define Z_STEPPER_AUTO_ALIGN +#if ENABLED(Z_STEPPER_AUTO_ALIGN) + // Define probe X and Y positions for Z1, Z2 [, Z3] + #define Z_STEPPER_ALIGN_X { 10, 150, 290 } + #define Z_STEPPER_ALIGN_Y { 290, 10, 290 } + // Set number of iterations to align + #define Z_STEPPER_ALIGN_ITERATIONS 3 + // Enable to restore leveling setup after operation + #define RESTORE_LEVELING_AFTER_G34 + // Use the amplification factor to de-/increase correction step. + // In case the stepper (spindle) position is further out than the test point + // Use a value > 1. NOTE: This may cause instability + #define Z_STEPPER_ALIGN_AMP 1.0 + // Stop criterion. If the accuracy is better than this stop iterating early + #define Z_STEPPER_ALIGN_ACC 0.02 +#endif + +// @section machine + +#define AXIS_RELATIVE_MODES {false, false, false, false} + +// Add a Duplicate option for well-separated conjoined nozzles +//#define MULTI_NOZZLE_DUPLICATION + +// By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step. +#define INVERT_X_STEP_PIN false +#define INVERT_Y_STEP_PIN false +#define INVERT_Z_STEP_PIN false +#define INVERT_E_STEP_PIN false + +// Default stepper release if idle. Set to 0 to deactivate. +// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true. +// Time can be set by M18 and M84. +#define DEFAULT_STEPPER_DEACTIVE_TIME 120 +#define DISABLE_INACTIVE_X true +#define DISABLE_INACTIVE_Y true +#define DISABLE_INACTIVE_Z true // set to false if the nozzle will fall down on your printed part when print has finished. +#define DISABLE_INACTIVE_E true + +#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate +#define DEFAULT_MINTRAVELFEEDRATE 0.0 + +//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated + +// @section lcd + +#if ENABLED(ULTIPANEL) + #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel + #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions + #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder +#endif + +// @section extras + +// minimum time in microseconds that a movement needs to take if the buffer is emptied. +#define DEFAULT_MINSEGMENTTIME 20000 + +// If defined the movements slow down when the look ahead buffer is only half full +#define SLOWDOWN + +// Frequency limit +// See nophead's blog for more info +// Not working O +//#define XY_FREQUENCY_LIMIT 15 + +// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end +// of the buffer and all stops. This should not be much greater than zero and should only be changed +// if unwanted behavior is observed on a user's machine when running at very slow speeds. +#define MINIMUM_PLANNER_SPEED 0.05 // (mm/s) + +// +// Backlash Compensation +// Adds extra movement to axes on direction-changes to account for backlash. +// +//#define BACKLASH_COMPENSATION +#if ENABLED(BACKLASH_COMPENSATION) + // Define values for backlash distance and correction. + // If BACKLASH_GCODE is enabled these values are the defaults. + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments + // to reduce print artifacts. (Enabling this is costly in memory and computation!) + //#define BACKLASH_SMOOTHING_MM 3 // (mm) + + // Add runtime configuration and tuning of backlash values (M425) + //#define BACKLASH_GCODE + + #if ENABLED(BACKLASH_GCODE) + // Measure the Z backlash when probing (G29) and set with "M425 Z" + #define MEASURE_BACKLASH_WHEN_PROBING + + #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) + // When measuring, the probe will move up to BACKLASH_MEASUREMENT_LIMIT + // mm away from point of contact in BACKLASH_MEASUREMENT_RESOLUTION + // increments while checking for the contact to be broken. + #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) + #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/m) + #endif + #endif +#endif + +/** + * Automatic backlash, position and hotend offset calibration + * + * Enable G425 to run automatic calibration using an electrically- + * conductive cube, bolt, or washer mounted on the bed. + * + * G425 uses the probe to touch the top and sides of the calibration object + * on the bed and measures and/or correct positional offsets, axis backlash + * and hotend offsets. + * + * Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within + * ±5mm of true values for G425 to succeed. + */ +//#define CALIBRATION_GCODE +#if ENABLED(CALIBRATION_GCODE) + + #define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm + + #define CALIBRATION_FEEDRATE_SLOW 60 // mm/m + #define CALIBRATION_FEEDRATE_FAST 1200 // mm/m + #define CALIBRATION_FEEDRATE_TRAVEL 3000 // mm/m + + // The following parameters refer to the conical section of the nozzle tip. + #define CALIBRATION_NOZZLE_TIP_HEIGHT 1.0 // mm + #define CALIBRATION_NOZZLE_OUTER_DIAMETER 2.0 // mm + + // Uncomment to enable reporting (required for "G425 V", but consumes PROGMEM). + //#define CALIBRATION_REPORTING + + // The true location and dimension the cube/bolt/washer on the bed. + #define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm + #define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm + + // Comment out any sides which are unreachable by the probe. For best + // auto-calibration results, all sides must be reachable. + #define CALIBRATION_MEASURE_RIGHT + #define CALIBRATION_MEASURE_FRONT + #define CALIBRATION_MEASURE_LEFT + #define CALIBRATION_MEASURE_BACK + + // Probing at the exact top center only works if the center is flat. If + // probing on a screwhead or hollow washer, probe near the edges. + //#define CALIBRATION_MEASURE_AT_TOP_EDGES + + // Define pin which is read during calibration + #ifndef CALIBRATION_PIN + #define CALIBRATION_PIN -1 // Override in pins.h or set to -1 to use your Z endstop + #define CALIBRATION_PIN_INVERTING false // set to true to invert the pin + //#define CALIBRATION_PIN_PULLDOWN + #define CALIBRATION_PIN_PULLUP + #endif +#endif + +/** + * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies + * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible + * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the + * lowest stepping frequencies. + */ +//#define ADAPTIVE_STEP_SMOOTHING + +/** + * Custom Microstepping + * Override as-needed for your setup. Up to 3 MS pins are supported. + */ +//#define MICROSTEP1 LOW,LOW,LOW +//#define MICROSTEP2 HIGH,LOW,LOW +//#define MICROSTEP4 LOW,HIGH,LOW +//#define MICROSTEP8 HIGH,HIGH,LOW +//#define MICROSTEP16 LOW,LOW,HIGH +//#define MICROSTEP32 HIGH,LOW,HIGH + +// Microstep setting (Only functional when stepper driver microstep pins are connected to MCU. +#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16] + +/** + * @section stepper motor current + * + * Some boards have a means of setting the stepper motor current via firmware. + * + * The power on motor currents are set by: + * PWM_MOTOR_CURRENT - used by MINIRAMBO & ULTIMAIN_2 + * known compatible chips: A4982 + * DIGIPOT_MOTOR_CURRENT - used by BQ_ZUM_MEGA_3D, RAMBO & SCOOVO_X9H + * known compatible chips: AD5206 + * DAC_MOTOR_CURRENT_DEFAULT - used by PRINTRBOARD_REVF & RIGIDBOARD_V2 + * known compatible chips: MCP4728 + * DIGIPOT_I2C_MOTOR_CURRENTS - used by 5DPRINT, AZTEEG_X3_PRO, AZTEEG_X5_MINI_WIFI, MIGHTYBOARD_REVE + * known compatible chips: MCP4451, MCP4018 + * + * Motor currents can also be set by M907 - M910 and by the LCD. + * M907 - applies to all. + * M908 - BQ_ZUM_MEGA_3D, RAMBO, PRINTRBOARD_REVF, RIGIDBOARD_V2 & SCOOVO_X9H + * M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2 + */ +//#define PWM_MOTOR_CURRENT { 1300, 1300, 1250 } // Values in milliamps +//#define DIGIPOT_MOTOR_CURRENT { 135,135,135,135,135 } // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A) +//#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis + +// Use an I2C based DIGIPOT (e.g., Azteeg X3 Pro) +//#define DIGIPOT_I2C +#if ENABLED(DIGIPOT_I2C) && !defined(DIGIPOT_I2C_ADDRESS_A) + /** + * Common slave addresses: + * + * A (A shifted) B (B shifted) IC + * Smoothie 0x2C (0x58) 0x2D (0x5A) MCP4451 + * AZTEEG_X3_PRO 0x2C (0x58) 0x2E (0x5C) MCP4451 + * AZTEEG_X5_MINI_WIFI 0x58 0x5C MCP4451 + * MIGHTYBOARD_REVE 0x2F (0x5E) MCP4018 + */ + #define DIGIPOT_I2C_ADDRESS_A 0x2C // unshifted slave address for first DIGIPOT + #define DIGIPOT_I2C_ADDRESS_B 0x2D // unshifted slave address for second DIGIPOT +#endif + +//#define DIGIPOT_MCP4018 // Requires library from https://github.com/stawel/SlowSoftI2CMaster +#define DIGIPOT_I2C_NUM_CHANNELS 8 // 5DPRINT: 4 AZTEEG_X3_PRO: 8 MKS SBASE: 5 +// Actual motor currents in Amps. The number of entries must match DIGIPOT_I2C_NUM_CHANNELS. +// These correspond to the physical drivers, so be mindful if the order is changed. +#define DIGIPOT_I2C_MOTOR_CURRENTS { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 } // AZTEEG_X3_PRO + +//=========================================================================== +//=============================Additional Features=========================== +//=========================================================================== + +// @section lcd + +// Change values more rapidly when the encoder is rotated faster +#define ENCODER_RATE_MULTIPLIER +#if ENABLED(ENCODER_RATE_MULTIPLIER) + #define ENCODER_10X_STEPS_PER_SEC 30 // (steps/s) Encoder rate for 10x speed + #define ENCODER_100X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 100x speed +#endif + +// Play a beep when the feedrate is changed from the Status Screen +//#define BEEP_ON_FEEDRATE_CHANGE +#if ENABLED(BEEP_ON_FEEDRATE_CHANGE) + #define FEEDRATE_CHANGE_BEEP_DURATION 10 + #define FEEDRATE_CHANGE_BEEP_FREQUENCY 440 +#endif + +// Include a page of printer information in the LCD Main Menu +//#define LCD_INFO_MENU + +// Scroll a longer status message into view +//#define STATUS_MESSAGE_SCROLLING + +// On the Info Screen, display XY with one decimal place when possible +//#define LCD_DECIMAL_SMALL_XY + +// The timeout (in ms) to return to the status screen from sub-menus +//#define LCD_TIMEOUT_TO_STATUS 15000 + +// Add an 'M73' G-code to set the current percentage +//#define LCD_SET_PROGRESS_MANUALLY + +#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS + //#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing + #if ENABLED(LCD_PROGRESS_BAR) + #define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar + #define PROGRESS_BAR_MSG_TIME 3000 // (ms) Amount of time to show the status message + #define PROGRESS_MSG_EXPIRE 0 // (ms) Amount of time to retain the status message (0=forever) + //#define PROGRESS_MSG_ONCE // Show the message for MSG_TIME then clear it + //#define LCD_PROGRESS_BAR_TEST // Add a menu item to test the progress bar + #endif +#endif + +/** + * LED Control Menu + * Enable this feature to add LED Control to the LCD menu + */ +//#define LED_CONTROL_MENU +#if ENABLED(LED_CONTROL_MENU) + #define LED_COLOR_PRESETS // Enable the Preset Color menu option + #if ENABLED(LED_COLOR_PRESETS) + #define LED_USER_PRESET_RED 255 // User defined RED value + #define LED_USER_PRESET_GREEN 128 // User defined GREEN value + #define LED_USER_PRESET_BLUE 0 // User defined BLUE value + #define LED_USER_PRESET_WHITE 255 // User defined WHITE value + #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity + //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup + #endif +#endif // LED_CONTROL_MENU + +#if ENABLED(SDSUPPORT) + + // Some RAMPS and other boards don't detect when an SD card is inserted. You can work + // around this by connecting a push button or single throw switch to the pin defined + // as SD_DETECT_PIN in your board's pins definitions. + // This setting should be disabled unless you are using a push button, pulling the pin to ground. + // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER). + #define SD_DETECT_INVERTED + + #define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished + #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place. + + // Reverse SD sort to show "more recent" files first, according to the card's FAT. + // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. + #define SDCARD_RATHERRECENTFIRST + + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") + + /** + * Continue after Power-Loss (Creality3D) + * + * Store the current state to the SD Card at the start of each layer + * during SD printing. If the recovery file is found at boot time, present + * an option on the LCD screen to continue the print from the last-known + * point in the file. + */ + //#define POWER_LOSS_RECOVERY + #if ENABLED(POWER_LOSS_RECOVERY) + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + #endif + + /** + * Sort SD file listings in alphabetical order. + * + * With this option enabled, items on SD cards will be sorted + * by name for easier navigation. + * + * By default... + * + * - Use the slowest -but safest- method for sorting. + * - Folders are sorted to the top. + * - The sort key is statically allocated. + * - No added G-code (M34) support. + * - 40 item sorting limit. (Items after the first 40 are unsorted.) + * + * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the + * compiler to calculate the worst-case usage and throw an error if the SRAM + * limit is exceeded. + * + * - SDSORT_USES_RAM provides faster sorting via a static directory buffer. + * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer. + * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!) + * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!) + */ + //#define SDCARD_SORT_ALPHA + + // SD Card Sorting options + #if ENABLED(SDCARD_SORT_ALPHA) + #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each. + #define FOLDER_SORTING -1 // -1=above 0=none 1=below + #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. + #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting. + #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) + #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. + #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! + #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting. + // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM. + #endif + + // This allows hosts to request long names for files and folders with M33 + //#define LONG_FILENAME_HOST_SUPPORT + + // Enable this option to scroll long filenames in the SD card menu + //#define SCROLL_LONG_FILENAMES + + /** + * This option allows you to abort SD printing when any endstop is triggered. + * This feature must be enabled with "M540 S1" or from the LCD menu. + * To have any effect, endstops must be enabled during SD printing. + */ + //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED + + /** + * This option makes it easier to print the same SD Card file again. + * On print completion the LCD Menu will open with the file selected. + * You can just click to start the print, or navigate elsewhere. + */ + //#define SD_REPRINT_LAST_SELECTED_FILE + + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + + /** + * Support for USB thumb drives using an Arduino USB Host Shield or + * equivalent MAX3421E breakout board. The USB thumb drive will appear + * to Marlin as an SD card. + * + * The MAX3421E must be assigned the same pins as the SD card reader, with + * the following pin mapping: + * + * SCLK, MOSI, MISO --> SCLK, MOSI, MISO + * INT --> SD_DETECT_PIN + * SS --> SDSS + */ + //#define USB_FLASH_DRIVE_SUPPORT + #if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #define USB_CS_PIN SDSS + #define USB_INTR_PIN SD_DETECT_PIN + #endif + + /** + * When using a bootloader that supports SD-Firmware-Flashing, + * add a menu item to activate SD-FW-Update on the next reboot. + * + * Requires ATMEGA2560 (Arduino Mega) + * + * Tested with this bootloader: + * https://github.com/FleetProbe/MicroBridge-Arduino-ATMega2560 + */ + //#define SD_FIRMWARE_UPDATE + #if ENABLED(SD_FIRMWARE_UPDATE) + #define SD_FIRMWARE_UPDATE_EEPROM_ADDR 0x1FF + #define SD_FIRMWARE_UPDATE_ACTIVE_VALUE 0xF0 + #define SD_FIRMWARE_UPDATE_INACTIVE_VALUE 0xFF + #endif + + // Add an optimized binary file transfer mode, initiated with 'M28 B1' + //#define BINARY_FILE_TRANSFER + + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + +#endif // SDSUPPORT + +/** + * Additional options for Graphical Displays + * + * Use the optimizations here to improve printing performance, + * which can be adversely affected by graphical display drawing, + * especially when doing several short moves, and when printing + * on DELTA and SCARA machines. + * + * Some of these options may result in the display lagging behind + * controller events, as there is a trade-off between reliable + * printing performance versus fast display updates. + */ +#if HAS_GRAPHICAL_LCD + // Show SD percentage next to the progress bar + //#define DOGM_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on the Info Screen + #define XYZ_HOLLOW_FRAME + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_BIG_EDIT_FONT + + // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM. + // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. + //#define USE_SMALL_INFOFONT + + // Enable this option and reduce the value to optimize screen updates. + // The normal delay is 10µs. Use the lowest value that still gives a reliable display. + //#define DOGM_SPI_DELAY_US 5 + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE + + /** + * ST7920-based LCDs can emulate a 16 x 4 character display using + * the ST7920 character-generator for very fast screen updates. + * Enable LIGHTWEIGHT_UI to use this special display mode. + * + * Since LIGHTWEIGHT_UI has limited space, the position and status + * message occupy the same line. Set STATUS_EXPIRE_SECONDS to the + * length of time to display the status message before clearing. + * + * Set STATUS_EXPIRE_SECONDS to zero to never clear the status. + * This will prevent position updates from being displayed. + */ + #if ENABLED(U8GLIB_ST7920) + //#define LIGHTWEIGHT_UI + #if ENABLED(LIGHTWEIGHT_UI) + #define STATUS_EXPIRE_SECONDS 20 + #endif + #endif + + /** + * Status (Info) Screen customizations + * These options may affect code size and screen render time. + * Custom status screens can forcibly override these settings. + */ + //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones + //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends) + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM) + #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating + #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating + //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap + //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap + //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames + //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE + +#endif // HAS_GRAPHICAL_LCD + +// @section safety + +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ +#define USE_WATCHDOG +#if ENABLED(USE_WATCHDOG) + //#define WATCHDOG_RESET_MANUAL +#endif + +// @section lcd + +/** + * Babystepping enables movement of the axes by tiny increments without changing + * the current position values. This feature is used primarily to adjust the Z + * axis in the first layer of a print in real-time. + * + * Warning: Does not respect endstops! + */ +//#define BABYSTEPPING +#if ENABLED(BABYSTEPPING) + //#define BABYSTEP_WITHOUT_HOMING + //#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA! + #define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way + #define BABYSTEP_MULTIPLICATOR 1 // Babysteps are very small. Increase for faster motion. + + //#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping. + #if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING) + #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds. + // Note: Extra time may be added to mitigate controller latency. + //#define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). + //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. + #if ENABLED(MOVE_Z_WHEN_IDLE) + #define MOVE_Z_IDLE_MULTIPLICATOR 1 // Multiply 1mm by this factor for the move step size. + #endif + #endif + + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets + //#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif +#endif + +// @section extruder + +/** + * Linear Pressure Control v1.5 + * + * Assumption: advance [steps] = k * (delta velocity [steps/s]) + * K=0 means advance disabled. + * + * NOTE: K values for LIN_ADVANCE 1.5 differ from earlier versions! + * + * Set K around 0.22 for 3mm PLA Direct Drive with ~6.5cm between the drive gear and heatbreak. + * Larger K values will be needed for flexible filament and greater distances. + * If this algorithm produces a higher speed offset than the extruder can handle (compared to E jerk) + * print acceleration will be reduced during the affected moves to keep within the limit. + * + * See http://marlinfw.org/docs/features/lin_advance.html for full instructions. + * Mention @Sebastianv650 on GitHub to alert the author of any issues. + */ +//#define LIN_ADVANCE +#if ENABLED(LIN_ADVANCE) + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. +#endif + +// @section leveling + +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + // Override the mesh area if the automatic (max) area is too large + //#define MESH_MIN_X MESH_INSET + //#define MESH_MIN_Y MESH_INSET + //#define MESH_MAX_X X_BED_SIZE - (MESH_INSET) + //#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET) +#endif + +/** + * Repeatedly attempt G29 leveling until it succeeds. + * Stop after G29_MAX_RETRIES attempts. + */ +//#define G29_RETRY_AND_RECOVER +#if ENABLED(G29_RETRY_AND_RECOVER) + #define G29_MAX_RETRIES 3 + #define G29_HALT_ON_FAILURE + /** + * Specify the GCODE commands that will be executed when leveling succeeds, + * between attempts, and after the maximum number of retries have been tried. + */ + #define G29_SUCCESS_COMMANDS "M117 Bed leveling done." + #define G29_RECOVER_COMMANDS "M117 Probe failed. Rewiping.\nG28\nG12 P0 S12 T0" + #define G29_FAILURE_COMMANDS "M117 Bed leveling failed.\nG0 Z10\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nM300 P25 S880\nM300 P50 S0\nG4 S1" + +#endif + +// @section extras + +// +// G2/G3 Arc Support +// +#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#if ENABLED(ARC_SUPPORT) + #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes +#endif + +// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. +//#define BEZIER_CURVE_SUPPORT + +/** + * G38 Probe Target + * + * This option adds G38.2 and G38.3 (probe towards target) + * and optionally G38.4 and G38.5 (probe away from target). + * Set MULTIPLE_PROBING for G38 to probe more than once. + */ +//#define G38_PROBE_TARGET +#if ENABLED(G38_PROBE_TARGET) + //#define G38_PROBE_AWAY // Include G38.4 and G38.5 to probe away from target + #define G38_MINIMUM_MOVE 0.0275 // (mm) Minimum distance that will produce a move. +#endif + +// Moves (or segments) with fewer steps than this will be joined with the next move +#define MIN_STEPS_PER_SEGMENT 6 + +/** + * Minimum delay after setting the stepper DIR (in ns) + * 0 : No delay (Expect at least 10µS since one Stepper ISR must transpire) + * 20 : Minimum for TMC2xxx drivers + * 200 : Minimum for A4988 drivers + * 400 : Minimum for A5984 drivers + * 500 : Minimum for LV8729 drivers (guess, no info in datasheet) + * 650 : Minimum for DRV8825 drivers + * 1500 : Minimum for TB6600 drivers (guess, no info in datasheet) + * 15000 : Minimum for TB6560 drivers (guess, no info in datasheet) + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_DIR_DELAY 650 + +/** + * Minimum stepper driver pulse width (in µs) + * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers + * 2 : Minimum for DRV8825 stepper drivers + * 3 : Minimum for TB6600 stepper drivers + * 30 : Minimum for TB6560 stepper drivers + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MINIMUM_STEPPER_PULSE 2 + +/** + * Maximum stepping rate (in Hz) the stepper driver allows + * If undefined, defaults to 1MHz / (2 * MINIMUM_STEPPER_PULSE) + * 500000 : Maximum for A4988 stepper driver + * 400000 : Maximum for TMC2xxx stepper drivers + * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver + * 150000 : Maximum for TB6600 stepper driver + * 15000 : Maximum for TB6560 stepper driver + * + * Override the default value based on the driver type set in Configuration.h. + */ +//#define MAXIMUM_STEPPER_RATE 250000 + +// @section temperature + +// Control heater 0 and heater 1 in parallel. +//#define HEATERS_PARALLEL + +//=========================================================================== +//================================= Buffers ================================= +//=========================================================================== + +// @section hidden + +// The number of linear motions that can be in the plan at any give time. +// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering. +#if ENABLED(SDSUPPORT) + #define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller +#else + #define BLOCK_BUFFER_SIZE 16 // maximize block buffer +#endif + +// @section serial + +// The ASCII buffer for serial input +#define MAX_CMD_SIZE 96 +#define BUFSIZE 4 + +// Transmission to Host Buffer Size +// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0. +// To buffer a simple "ok" you need 4 bytes. +// For ADVANCED_OK (M105) you need 32 bytes. +// For debug-echo: 128 bytes for the optimal speed. +// Other output doesn't need to be that speedy. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256] +#define TX_BUFFER_SIZE 0 + +// Host Receive Buffer Size +// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough. +// To use flow control, set this buffer size to at least 1024 bytes. +// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] +//#define RX_BUFFER_SIZE 1024 + +#if RX_BUFFER_SIZE >= 1024 + // Enable to have the controller send XON/XOFF control characters to + // the host to signal the RX buffer is becoming full. + //#define SERIAL_XON_XOFF +#endif + +#if ENABLED(SDSUPPORT) + // Enable this option to collect and display the maximum + // RX queue usage after transferring a file to SD. + //#define SERIAL_STATS_MAX_RX_QUEUED + + // Enable this option to collect and display the number + // of dropped bytes after a file transfer to SD. + //#define SERIAL_STATS_DROPPED_RX +#endif + +// Enable an emergency-command parser to intercept certain commands as they +// enter the serial receive buffer, so they cannot be blocked. +// Currently handles M108, M112, M410 +// Does not work on boards using AT90USB (USBCON) processors! +//#define EMERGENCY_PARSER + +// Bad Serial-connections can miss a received command by sending an 'ok' +// Therefore some clients abort after 30 seconds in a timeout. +// Some other clients start sending commands while receiving a 'wait'. +// This "wait" is only sent when the buffer is empty. 1 second is a good value here. +//#define NO_TIMEOUTS 1000 // Milliseconds + +// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary. +//#define ADVANCED_OK + +// Printrun may have trouble receiving long strings all at once. +// This option inserts short delays between lines of serial output. +#define SERIAL_OVERRUN_PROTECTION + +// @section extras + +/** + * Extra Fan Speed + * Adds a secondary fan speed for each print-cooling fan. + * 'M106 P T3-255' : Set a secondary speed for + * 'M106 P T2' : Use the set secondary speed + * 'M106 P T1' : Restore the previous fan speed + */ +//#define EXTRA_FAN_SPEED + +/** + * Firmware-based and LCD-controlled retract + * + * Add G10 / G11 commands for automatic firmware-based retract / recover. + * Use M207 and M208 to define parameters for retract / recover. + * + * Use M209 to enable or disable auto-retract. + * With auto-retract enabled, all G1 E moves within the set range + * will be converted to firmware-based retract/recover moves. + * + * Be sure to turn off auto-retract during filament change. + * + * Note that M207 / M208 / M209 settings are saved to EEPROM. + * + */ +//#define FWRETRACT +#if ENABLED(FWRETRACT) + #define FWRETRACT_AUTORETRACT // costs ~500 bytes of PROGMEM + #if ENABLED(FWRETRACT_AUTORETRACT) + #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over + #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion + #endif + #define RETRACT_LENGTH 3 // Default retract length (positive mm) + #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change + #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s) + #define RETRACT_ZRAISE 0 // Default retract Z-raise (mm) + #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering) + #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change) + #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s) + #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s) + #if ENABLED(MIXING_EXTRUDER) + //#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously + #endif +#endif + +/** + * Universal tool change settings. + * Applies to all types of extruders except where explicitly noted. + */ +#if EXTRUDERS > 1 + // Z raise distance for tool-change, as needed for some extruders + #define TOOLCHANGE_ZRAISE 2 // (mm) + + // Retract and prime filament on tool-change + //#define TOOLCHANGE_FILAMENT_SWAP + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + #define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm) + #define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm) + #define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m) + #define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m) + #endif + + /** + * Position to park head during tool change. + * Doesn't apply to SWITCHING_TOOLHEAD, DUAL_X_CARRIAGE, or PARKING_EXTRUDER + */ + //#define TOOLCHANGE_PARK + #if ENABLED(TOOLCHANGE_PARK) + #define TOOLCHANGE_PARK_XY { X_MIN_POS + 10, Y_MIN_POS + 10 } + #define TOOLCHANGE_PARK_XY_FEEDRATE 6000 // (mm/m) + #endif +#endif + +/** + * Advanced Pause + * Experimental feature for filament change support and for parking the nozzle when paused. + * Adds the GCode M600 for initiating filament change. + * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * + * Requires an LCD display. + * Requires NOZZLE_PARK_FEATURE. + * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + */ +//#define ADVANCED_PAUSE_FEATURE +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate. + #define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract. + // This short retract is done immediately, before parking the nozzle. + #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + // Set to 0 for manual unloading. + #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load. + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material. + // 0 to disable start loading and skip to fast load only + #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast. + #define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 0 // (mm) Load length of filament, from extruder gear to nozzle. + // For Bowden, the full length of the tube and nozzle. + // For direct drive, the full length of the nozzle. + //#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted. + #define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate. + #define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading. + // Set to 0 for manual extrusion. + // Filament can be extruded repeatedly from the Filament Change menu + // until extrusion is consistent, and to purge old filament. + #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. + + // Filament Unload does a Retract, Delay, and Purge first: + #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. + #define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract. + #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. + + #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. + #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. + #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + + //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. + //#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change + + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) +#endif + +// @section tmc + +/** + * TMC26X Stepper Driver options + * + * The TMC26XStepper library is required for this stepper driver. + * https://github.com/trinamic/TMC26XStepper + */ +#if HAS_DRIVER(TMC26X) + + #if AXIS_DRIVER_TYPE_X(TMC26X) + #define X_MAX_CURRENT 1000 // (mA) + #define X_SENSE_RESISTOR 91 // (mOhms) + #define X_MICROSTEPS 16 // Number of microsteps + #endif + + #if AXIS_DRIVER_TYPE_X2(TMC26X) + #define X2_MAX_CURRENT 1000 + #define X2_SENSE_RESISTOR 91 + #define X2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y(TMC26X) + #define Y_MAX_CURRENT 1000 + #define Y_SENSE_RESISTOR 91 + #define Y_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Y2(TMC26X) + #define Y2_MAX_CURRENT 1000 + #define Y2_SENSE_RESISTOR 91 + #define Y2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z(TMC26X) + #define Z_MAX_CURRENT 1000 + #define Z_SENSE_RESISTOR 91 + #define Z_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z2(TMC26X) + #define Z2_MAX_CURRENT 1000 + #define Z2_SENSE_RESISTOR 91 + #define Z2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_Z3(TMC26X) + #define Z3_MAX_CURRENT 1000 + #define Z3_SENSE_RESISTOR 91 + #define Z3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E0(TMC26X) + #define E0_MAX_CURRENT 1000 + #define E0_SENSE_RESISTOR 91 + #define E0_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E1(TMC26X) + #define E1_MAX_CURRENT 1000 + #define E1_SENSE_RESISTOR 91 + #define E1_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E2(TMC26X) + #define E2_MAX_CURRENT 1000 + #define E2_SENSE_RESISTOR 91 + #define E2_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E3(TMC26X) + #define E3_MAX_CURRENT 1000 + #define E3_SENSE_RESISTOR 91 + #define E3_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E4(TMC26X) + #define E4_MAX_CURRENT 1000 + #define E4_SENSE_RESISTOR 91 + #define E4_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_E5(TMC26X) + #define E5_MAX_CURRENT 1000 + #define E5_SENSE_RESISTOR 91 + #define E5_MICROSTEPS 16 + #endif + +#endif // TMC26X + +// @section tmc_smart + +/** + * To use TMC2130, TMC2160, TMC2660, TMC5130, TMC5160 stepper drivers in SPI mode + * connect your SPI pins to the hardware SPI interface on your board and define + * the required CS pins in your `pins_MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 + * pins `X_CS_PIN 53`, `Y_CS_PIN 49`, etc.). + * You may also use software SPI if you wish to use general purpose IO pins. + * + * To use TMC2208 stepper UART-configurable stepper drivers connect #_SERIAL_TX_PIN + * to the driver side PDN_UART pin with a 1K resistor. + * To use the reading capabilities, also connect #_SERIAL_RX_PIN to PDN_UART without + * a resistor. + * The drivers can also be used with hardware serial. + * + * TMCStepper library is required to use TMC stepper drivers. + * https://github.com/teemuatlut/TMCStepper + */ +#if HAS_TRINAMIC + + #define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current + #define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256 + + #if AXIS_IS_TMC(X) + #define X_CURRENT 800 // (mA) RMS current. Multiply by 1.414 for peak current. + #define X_MICROSTEPS 16 // 0..256 + #define X_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(X2) + #define X2_CURRENT 800 + #define X2_MICROSTEPS 16 + #define X2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Y) + #define Y_CURRENT 800 + #define Y_MICROSTEPS 16 + #define Y_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Y2) + #define Y2_CURRENT 800 + #define Y2_MICROSTEPS 16 + #define Y2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z) + #define Z_CURRENT 800 + #define Z_MICROSTEPS 16 + #define Z_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z2) + #define Z2_CURRENT 800 + #define Z2_MICROSTEPS 16 + #define Z2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(Z3) + #define Z3_CURRENT 800 + #define Z3_MICROSTEPS 16 + #define Z3_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E0) + #define E0_CURRENT 800 + #define E0_MICROSTEPS 16 + #define E0_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E1) + #define E1_CURRENT 800 + #define E1_MICROSTEPS 16 + #define E1_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E2) + #define E2_CURRENT 800 + #define E2_MICROSTEPS 16 + #define E2_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E3) + #define E3_CURRENT 800 + #define E3_MICROSTEPS 16 + #define E3_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E4) + #define E4_CURRENT 800 + #define E4_MICROSTEPS 16 + #define E4_RSENSE 0.11 + #endif + + #if AXIS_IS_TMC(E5) + #define E5_CURRENT 800 + #define E5_MICROSTEPS 16 + #define E5_RSENSE 0.11 + #endif + + /** + * Override default SPI pins for TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160 drivers here. + * The default pins can be found in your board's pins file. + */ + //#define X_CS_PIN -1 + //#define Y_CS_PIN -1 + //#define Z_CS_PIN -1 + //#define X2_CS_PIN -1 + //#define Y2_CS_PIN -1 + //#define Z2_CS_PIN -1 + //#define Z3_CS_PIN -1 + //#define E0_CS_PIN -1 + //#define E1_CS_PIN -1 + //#define E2_CS_PIN -1 + //#define E3_CS_PIN -1 + //#define E4_CS_PIN -1 + //#define E5_CS_PIN -1 + + /** + * Use software SPI for TMC2130. + * Software option for SPI driven drivers (TMC2130, TMC2160, TMC2660, TMC5130 and TMC5160). + * The default SW SPI pins are defined the respective pins files, + * but you can override or define them here. + */ + //#define TMC_USE_SW_SPI + //#define TMC_SW_MOSI -1 + //#define TMC_SW_MISO -1 + //#define TMC_SW_SCK -1 + + /** + * Software enable + * + * Use for drivers that do not use a dedicated enable pin, but rather handle the same + * function through a communication line such as SPI or UART. + */ + //#define SOFTWARE_DRIVER_ENABLE + + /** + * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only + * Use Trinamic's ultra quiet stepping mode. + * When disabled, Marlin will use spreadCycle stepping mode. + */ + #define STEALTHCHOP_XY + #define STEALTHCHOP_Z + #define STEALTHCHOP_E + + /** + * Optimize spreadCycle chopper parameters by using predefined parameter sets + * or with the help of an example included in the library. + * Provided parameter sets are + * CHOPPER_DEFAULT_12V + * CHOPPER_DEFAULT_19V + * CHOPPER_DEFAULT_24V + * CHOPPER_DEFAULT_36V + * CHOPPER_PRUSAMK3_24V // Imported parameters from the official Prusa firmware for MK3 (24V) + * CHOPPER_MARLIN_119 // Old defaults from Marlin v1.1.9 + * + * Define you own with + * { , , hysteresis_start[1..8] } + */ + #define CHOPPER_TIMING CHOPPER_DEFAULT_12V + + /** + * Monitor Trinamic drivers for error conditions, + * like overtemperature and short to ground. TMC2208 requires hardware serial. + * In the case of overtemperature Marlin can decrease the driver current until error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. + * M911 - Report stepper driver overtemperature pre-warn condition. + * M912 - Clear stepper driver overtemperature pre-warn condition flag. + * M122 - Report driver parameters (Requires TMC_DEBUG) + */ + //#define MONITOR_DRIVER_STATUS + + #if ENABLED(MONITOR_DRIVER_STATUS) + #define CURRENT_STEP_DOWN 50 // [mA] + #define REPORT_CURRENT_CHANGE + #define STOP_ON_ERROR + #endif + + /** + * TMC2130, TMC2160, TMC2208, TMC5130 and TMC5160 only + * The driver will switch to spreadCycle when stepper speed is over HYBRID_THRESHOLD. + * This mode allows for faster movements at the expense of higher noise levels. + * STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD. + * M913 X/Y/Z/E to live tune the setting + */ + //#define HYBRID_THRESHOLD + + #define X_HYBRID_THRESHOLD 100 // [mm/s] + #define X2_HYBRID_THRESHOLD 100 + #define Y_HYBRID_THRESHOLD 100 + #define Y2_HYBRID_THRESHOLD 100 + #define Z_HYBRID_THRESHOLD 3 + #define Z2_HYBRID_THRESHOLD 3 + #define Z3_HYBRID_THRESHOLD 3 + #define E0_HYBRID_THRESHOLD 30 + #define E1_HYBRID_THRESHOLD 30 + #define E2_HYBRID_THRESHOLD 30 + #define E3_HYBRID_THRESHOLD 30 + #define E4_HYBRID_THRESHOLD 30 + #define E5_HYBRID_THRESHOLD 30 + + /** + * TMC2130, TMC2160, TMC2660, TMC5130, and TMC5160 only + * Use StallGuard2 to sense an obstacle and trigger an endstop. + * Connect the stepper driver's DIAG1 pin to the X/Y endstop pin. + * X, Y, and Z homing will always be done in spreadCycle mode. + * + * X/Y/Z_STALL_SENSITIVITY is used for tuning the trigger sensitivity. + * Higher values make the system LESS sensitive. + * Lower value make the system MORE sensitive. + * Too low values can lead to false positives, while too high values will collide the axis without triggering. + * It is advised to set X/Y/Z_HOME_BUMP_MM to 0. + * M914 X/Y/Z to live tune the setting + */ + //#define SENSORLESS_HOMING // TMC2130 only + + /** + * Use StallGuard2 to probe the bed with the nozzle. + * + * CAUTION: This could cause damage to machines that use a lead screw or threaded rod + * to move the Z axis. Take extreme care when attempting to enable this feature. + */ + //#define SENSORLESS_PROBING // TMC2130 only + + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + #define X_STALL_SENSITIVITY 8 + #define Y_STALL_SENSITIVITY 8 + //#define Z_STALL_SENSITIVITY 8 + #endif + + /** + * Enable M122 debugging command for TMC stepper drivers. + * M122 S0/1 will enable continous reporting. + */ + //#define TMC_DEBUG + + /** + * You can set your own advanced settings by filling in predefined functions. + * A list of available functions can be found on the library github page + * https://github.com/teemuatlut/TMCStepper + * + * Example: + * #define TMC_ADV() { \ + * stepperX.diag0_temp_prewarn(1); \ + * stepperY.interpolate(0); \ + * } + */ + #define TMC_ADV() { } + +#endif // HAS_TRINAMIC + +// @section L6470 + +/** + * L6470 Stepper Driver options + * + * Arduino-L6470 library (0.7.0 or higher) is required for this stepper driver. + * https://github.com/ameyer/Arduino-L6470 + * + * Requires the following to be defined in your pins_YOUR_BOARD file + * L6470_CHAIN_SCK_PIN + * L6470_CHAIN_MISO_PIN + * L6470_CHAIN_MOSI_PIN + * L6470_CHAIN_SS_PIN + * L6470_RESET_CHAIN_PIN (optional) + */ +#if HAS_DRIVER(L6470) + + //#define L6470_CHITCHAT // Display additional status info + + #if AXIS_DRIVER_TYPE_X(L6470) + #define X_MICROSTEPS 128 // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) + #define X_OVERCURRENT 2000 // (mA) Current where the driver detects an over current (VALID: 375 x (1 - 16) - 6A max - rounds down) + #define X_STALLCURRENT 1500 // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) - 4A max - rounds down) + #define X_MAX_VOLTAGE 127 // 0-255, Maximum effective voltage seen by stepper + #define X_CHAIN_POS 0 // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI + #endif + + #if AXIS_DRIVER_TYPE_X2(L6470) + #define X2_MICROSTEPS 128 + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + #define X2_MAX_VOLTAGE 127 + #define X2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y(L6470) + #define Y_MICROSTEPS 128 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + #define Y_MAX_VOLTAGE 127 + #define Y_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Y2(L6470) + #define Y2_MICROSTEPS 128 + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + #define Y2_MAX_VOLTAGE 127 + #define Y2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z(L6470) + #define Z_MICROSTEPS 128 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + #define Z_MAX_VOLTAGE 127 + #define Z_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z2(L6470) + #define Z2_MICROSTEPS 128 + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + #define Z2_MAX_VOLTAGE 127 + #define Z2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_Z3(L6470) + #define Z3_MICROSTEPS 128 + #define Z3_OVERCURRENT 2000 + #define Z3_STALLCURRENT 1500 + #define Z3_MAX_VOLTAGE 127 + #define Z3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E0(L6470) + #define E0_MICROSTEPS 128 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + #define E0_MAX_VOLTAGE 127 + #define E0_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E1(L6470) + #define E1_MICROSTEPS 128 + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + #define E1_MAX_VOLTAGE 127 + #define E1_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E2(L6470) + #define E2_MICROSTEPS 128 + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + #define E2_MAX_VOLTAGE 127 + #define E2_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E3(L6470) + #define E3_MICROSTEPS 128 + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + #define E3_MAX_VOLTAGE 127 + #define E3_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E4(L6470) + #define E4_MICROSTEPS 128 + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #define E4_MAX_VOLTAGE 127 + #define E4_CHAIN_POS 0 + #endif + + #if AXIS_DRIVER_TYPE_E5(L6470) + #define E5_MICROSTEPS 128 + #define E5_OVERCURRENT 2000 + #define E5_STALLCURRENT 1500 + #define E5_MAX_VOLTAGE 127 + #define E5_CHAIN_POS 0 + #endif + + /** + * Monitor L6470 drivers for error conditions like over temperature and over current. + * In the case of over temperature Marlin can decrease the drive until the error condition clears. + * Other detected conditions can be used to stop the current print. + * Relevant g-codes: + * M906 - I1/2/3/4/5 Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given. + * I not present or I0 or I1 - X, Y, Z or E0 + * I2 - X2, Y2, Z2 or E1 + * I3 - Z3 or E3 + * I4 - E4 + * I5 - E5 + * M916 - Increase drive level until get thermal warning + * M917 - Find minimum current thresholds + * M918 - Increase speed until max or error + * M122 S0/1 - Report driver parameters + */ + //#define MONITOR_L6470_DRIVER_STATUS + + #if ENABLED(MONITOR_L6470_DRIVER_STATUS) + #define KVAL_HOLD_STEP_DOWN 1 + //#define L6470_STOP_ON_ERROR + #endif + +#endif // L6470 + +/** + * TWI/I2C BUS + * + * This feature is an EXPERIMENTAL feature so it shall not be used on production + * machines. Enabling this will allow you to send and receive I2C data from slave + * devices on the bus. + * + * ; Example #1 + * ; This macro send the string "Marlin" to the slave device with address 0x63 (99) + * ; It uses multiple M260 commands with one B arg + * M260 A99 ; Target slave address + * M260 B77 ; M + * M260 B97 ; a + * M260 B114 ; r + * M260 B108 ; l + * M260 B105 ; i + * M260 B110 ; n + * M260 S1 ; Send the current buffer + * + * ; Example #2 + * ; Request 6 bytes from slave device with address 0x63 (99) + * M261 A99 B5 + * + * ; Example #3 + * ; Example serial output of a M261 request + * echo:i2c-reply: from:99 bytes:5 data:hello + */ + +// @section i2cbus + +//#define EXPERIMENTAL_I2CBUS +#define I2C_SLAVE_ADDRESS 0 // Set a value from 8 to 127 to act as a slave + +// @section extras + +/** + * Photo G-code + * Add the M240 G-code to take a photo. + * The photo can be triggered by a digital pin or a physical movement. + */ +//#define PHOTO_GCODE +#if ENABLED(PHOTO_GCODE) + // A position to move to (and raise Z) before taking the photo + //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 } // { xpos, ypos, zraise } (M240 X Y Z) + //#define PHOTO_DELAY_MS 100 // (ms) Duration to pause before moving back (M240 P) + //#define PHOTO_RETRACT_MM 6.5 // (mm) E retract/recover for the photo move (M240 R S) + + // Canon RC-1 or homebrew digital camera trigger + // Data from: http://www.doc-diy.net/photo/rc-1_hacked/ + //#define PHOTOGRAPH_PIN 23 + + // Canon Hack Development Kit + // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ + //#define CHDK_PIN 4 + + // Optional second move with delay to trigger the camera shutter + //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS } // { xpos, ypos } (M240 I J) + + // Duration to hold the switch or keep CHDK_PIN high + //#define PHOTO_SWITCH_MS 50 // (ms) (M240 D) +#endif + +/** + * Spindle & Laser control + * + * Add the M3, M4, and M5 commands to turn the spindle/laser on and off, and + * to set spindle speed, spindle direction, and laser power. + * + * SuperPid is a router/spindle speed controller used in the CNC milling community. + * Marlin can be used to turn the spindle on and off. It can also be used to set + * the spindle speed from 5,000 to 30,000 RPM. + * + * You'll need to select a pin for the ON/OFF function and optionally choose a 0-5V + * hardware PWM pin for the speed control and a pin for the rotation direction. + * + * See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details. + */ +//#define SPINDLE_LASER_ENABLE +#if ENABLED(SPINDLE_LASER_ENABLE) + + #define SPINDLE_LASER_ENABLE_INVERT false // set to "true" if the on/off function is reversed + #define SPINDLE_LASER_PWM true // set to true if your controller supports setting the speed/power + #define SPINDLE_LASER_PWM_INVERT true // set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_POWERUP_DELAY 5000 // delay in milliseconds to allow the spindle/laser to come up to speed/power + #define SPINDLE_LASER_POWERDOWN_DELAY 5000 // delay in milliseconds to allow the spindle to stop + #define SPINDLE_DIR_CHANGE true // set to true if your spindle controller supports changing spindle direction + #define SPINDLE_INVERT_DIR false + #define SPINDLE_STOP_ON_DIR_CHANGE true // set to true if Marlin should stop the spindle before changing rotation direction + + /** + * The M3 & M4 commands use the following equation to convert PWM duty cycle to speed/power + * + * SPEED/POWER = PWM duty cycle * SPEED_POWER_SLOPE + SPEED_POWER_INTERCEPT + * where PWM duty cycle varies from 0 to 255 + * + * set the following for your controller (ALL MUST BE SET) + */ + + #define SPEED_POWER_SLOPE 118.4 + #define SPEED_POWER_INTERCEPT 0 + #define SPEED_POWER_MIN 5000 + #define SPEED_POWER_MAX 30000 // SuperPID router controller 0 - 30,000 RPM + + //#define SPEED_POWER_SLOPE 0.3922 + //#define SPEED_POWER_INTERCEPT 0 + //#define SPEED_POWER_MIN 10 + //#define SPEED_POWER_MAX 100 // 0-100% +#endif + +/** + * Filament Width Sensor + * + * Measures the filament width in real-time and adjusts + * flow rate to compensate for any irregularities. + * + * Also allows the measured filament diameter to set the + * extrusion rate, so the slicer only has to specify the + * volume. + * + * Only a single extruder is supported at this time. + * + * 34 RAMPS_14 : Analog input 5 on the AUX2 connector + * 81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E) + * 301 RAMBO : Analog input 3 + * + * Note: May require analog pins to be defined for other boards. + */ +//#define FILAMENT_WIDTH_SENSOR + +#if ENABLED(FILAMENT_WIDTH_SENSOR) + #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4] + #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber + + #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it + #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM. + + #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially + + // Display filament width on the LCD status line. Status messages will expire after 5 seconds. + //#define FILAMENT_LCD_DISPLAY +#endif + +/** + * CNC Coordinate Systems + * + * Enables G53 and G54-G59.3 commands to select coordinate systems + * and G92.1 to reset the workspace to native machine space. + */ +//#define CNC_COORDINATE_SYSTEMS + +/** + * Auto-report temperatures with M155 S + */ +#define AUTO_REPORT_TEMPERATURES + +/** + * Include capabilities in M115 output + */ +#define EXTENDED_CAPABILITIES_REPORT + +/** + * Disable all Volumetric extrusion options + */ +//#define NO_VOLUMETRICS + +#if DISABLED(NO_VOLUMETRICS) + /** + * Volumetric extrusion default state + * Activate to make volumetric extrusion the default method, + * with DEFAULT_NOMINAL_FILAMENT_DIA as the default diameter. + * + * M200 D0 to disable, M200 Dn to set a new diameter. + */ + //#define VOLUMETRIC_DEFAULT_ON +#endif + +/** + * Enable this option for a leaner build of Marlin that removes all + * workspace offsets, simplifying coordinate transformations, leveling, etc. + * + * - M206 and M428 are disabled. + * - G92 will revert to its behavior from Marlin 1.0. + */ +//#define NO_WORKSPACE_OFFSETS + +/** + * Set the number of proportional font spaces required to fill up a typical character space. + * This can help to better align the output of commands like `G29 O` Mesh Output. + * + * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. + * Otherwise, adjust according to your client and font. + */ +#define PROPORTIONAL_FONT_RATIO 1.0 + +/** + * Spend 28 bytes of SRAM to optimize the GCode parser + */ +#define FASTER_GCODE_PARSER + +/** + * CNC G-code options + * Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc. + * Note that G0 feedrates should be used with care for 3D printing (if used at all). + * High feedrates may cause ringing and harm print quality. + */ +//#define PAREN_COMMENTS // Support for parentheses-delimited comments +//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc. + +// Enable and set a (default) feedrate for all G0 moves +//#define G0_FEEDRATE 3000 // (mm/m) +#ifdef G0_FEEDRATE + //#define VARIABLE_G0_FEEDRATE // The G0 feedrate is set by F in G0 motion mode +#endif + +/** + * G-code Macros + * + * Add G-codes M810-M819 to define and run G-code macros. + * Macros are not saved to EEPROM. + */ +//#define GCODE_MACROS +#if ENABLED(GCODE_MACROS) + #define GCODE_MACROS_SLOTS 5 // Up to 10 may be used + #define GCODE_MACROS_SLOT_SIZE 50 // Maximum length of a single macro +#endif + +/** + * User-defined menu items that execute custom GCode + */ +//#define CUSTOM_USER_MENUS +#if ENABLED(CUSTOM_USER_MENUS) + //#define CUSTOM_USER_MENU_TITLE "Custom Commands" + #define USER_SCRIPT_DONE "M117 User Script Done" + #define USER_SCRIPT_AUDIBLE_FEEDBACK + //#define USER_SCRIPT_RETURN // Return to status screen after a script + + #define USER_DESC_1 "Home & UBL Info" + #define USER_GCODE_1 "G28\nG29 W" + + #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL + #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + + #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL + #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + + #define USER_DESC_4 "Heat Bed/Home/Level" + #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + + #define USER_DESC_5 "Home & Info" + #define USER_GCODE_5 "G28\nM503" +#endif + +/** + * Host Action Commands + * + * Define host streamer action commands in compliance with the standard. + * + * See https://reprap.org/wiki/G-code#Action_commands + * Common commands ........ poweroff, pause, paused, resume, resumed, cancel + * G29_RETRY_AND_RECOVER .. probe_rewipe, probe_failed + * + * Some features add reason codes to extend these commands. + * + * Host Prompt Support enables Marlin to use the host for user prompts so + * filament runout and other processes can be managed from the host side. + */ +//#define HOST_ACTION_COMMANDS +#if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PROMPT_SUPPORT +#endif + +//=========================================================================== +//====================== I2C Position Encoder Settings ====================== +//=========================================================================== + +/** + * I2C position encoders for closed loop control. + * Developed by Chris Barr at Aus3D. + * + * Wiki: http://wiki.aus3d.com.au/Magnetic_Encoder + * Github: https://github.com/Aus3D/MagneticEncoder + * + * Supplier: http://aus3d.com.au/magnetic-encoder-module + * Alternative Supplier: http://reliabuild3d.com/ + * + * Reliabuild encoders have been modified to improve reliability. + */ + +//#define I2C_POSITION_ENCODERS +#if ENABLED(I2C_POSITION_ENCODERS) + + #define I2CPE_ENCODER_CNT 1 // The number of encoders installed; max of 5 + // encoders supported currently. + + #define I2CPE_ENC_1_ADDR I2CPE_PRESET_ADDR_X // I2C address of the encoder. 30-200. + #define I2CPE_ENC_1_AXIS X_AXIS // Axis the encoder module is installed on. _AXIS. + #define I2CPE_ENC_1_TYPE I2CPE_ENC_TYPE_LINEAR // Type of encoder: I2CPE_ENC_TYPE_LINEAR -or- + // I2CPE_ENC_TYPE_ROTARY. + #define I2CPE_ENC_1_TICKS_UNIT 2048 // 1024 for magnetic strips with 2mm poles; 2048 for + // 1mm poles. For linear encoders this is ticks / mm, + // for rotary encoders this is ticks / revolution. + //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper + // steps per full revolution (motor steps/rev * microstepping) + //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. + #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the + // printer will attempt to correct the error; errors + // smaller than this are ignored to minimize effects of + // measurement noise / latency (filter). + + #define I2CPE_ENC_2_ADDR I2CPE_PRESET_ADDR_Y // Same as above, but for encoder 2. + #define I2CPE_ENC_2_AXIS Y_AXIS + #define I2CPE_ENC_2_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_ENC_2_TICKS_UNIT 2048 + //#define I2CPE_ENC_2_TICKS_REV (16 * 200) + //#define I2CPE_ENC_2_INVERT + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP + #define I2CPE_ENC_2_EC_THRESH 0.10 + + #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options + #define I2CPE_ENC_3_AXIS Z_AXIS // as above, or use defaults below. + + #define I2CPE_ENC_4_ADDR I2CPE_PRESET_ADDR_E // Encoder 4. + #define I2CPE_ENC_4_AXIS E_AXIS + + #define I2CPE_ENC_5_ADDR 34 // Encoder 5. + #define I2CPE_ENC_5_AXIS E_AXIS + + // Default settings for encoders which are enabled, but without settings configured above. + #define I2CPE_DEF_TYPE I2CPE_ENC_TYPE_LINEAR + #define I2CPE_DEF_ENC_TICKS_UNIT 2048 + #define I2CPE_DEF_TICKS_REV (16 * 200) + #define I2CPE_DEF_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_DEF_EC_THRESH 0.1 + + //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given + // axis after which the printer will abort. Comment out to + // disable abort behavior. + + #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault + // for this amount of time (in ms) before the encoder + // is trusted again. + + /** + * Position is checked every time a new command is executed from the buffer but during long moves, + * this setting determines the minimum update time between checks. A value of 100 works well with + * error rolling average when attempting to correct only for skips and not for vibration. + */ + #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. + + // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + #define I2CPE_ERR_ROLLING_AVERAGE + +#endif // I2C_POSITION_ENCODERS + +/** + * MAX7219 Debug Matrix + * + * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display. + * Requires 3 signal wires. Some useful debug options are included to demonstrate its usage. + */ +//#define MAX7219_DEBUG +#if ENABLED(MAX7219_DEBUG) + #define MAX7219_CLK_PIN 64 + #define MAX7219_DIN_PIN 57 + #define MAX7219_LOAD_PIN 44 + + //#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix + #define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral) + #define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain. + #define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°) + // connector at: right=0 bottom=-90 top=90 left=180 + //#define MAX7219_REVERSE_ORDER // The individual LED matrix units may be in reversed order + + /** + * Sample debug features + * If you add more debug displays, be careful to avoid conflicts! + */ + #define MAX7219_DEBUG_PRINTER_ALIVE // Blink corner LED of 8x8 matrix to show that the firmware is functioning + #define MAX7219_DEBUG_PLANNER_HEAD 3 // Show the planner queue head position on this and the next LED matrix row + #define MAX7219_DEBUG_PLANNER_TAIL 5 // Show the planner queue tail position on this and the next LED matrix row + + #define MAX7219_DEBUG_PLANNER_QUEUE 0 // Show the current planner queue depth on this and the next LED matrix row + // If you experience stuttering, reboots, etc. this option can reveal how + // tweaks made to the configuration are affecting the printer in real-time. +#endif + +/** + * NanoDLP Sync support + * + * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" + * string to enable synchronization with DLP projector exposure. This change will allow to use + * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + */ +//#define NANODLP_Z_SYNC +#if ENABLED(NANODLP_Z_SYNC) + //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. + // Default behavior is limited to Z axis only. +#endif + +/** + * WiFi Support (Espressif ESP32 WiFi) + */ +//#define WIFISUPPORT +#if ENABLED(WIFISUPPORT) + #define WIFI_SSID "Wifi SSID" + #define WIFI_PWD "Wifi Password" + //#define WEBSUPPORT // Start a webserver with auto-discovery + //#define OTASUPPORT // Support over-the-air firmware updates +#endif + +/** + * Prusa Multi-Material Unit v2 + * Enable in Configuration.h + */ +#if ENABLED(PRUSA_MMU2) + + // Serial port used for communication with MMU2. + // For AVR enable the UART port used for the MMU. (e.g., internalSerial) + // For 32-bit boards check your HAL for available serial ports. (e.g., Serial2) + #define INTERNAL_SERIAL_PORT 2 + #define MMU2_SERIAL internalSerial + + // Use hardware reset for MMU if a pin is defined for it + //#define MMU2_RST_PIN 23 + + // Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up) + //#define MMU2_MODE_12V + + // G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout + #define MMU2_FILAMENT_RUNOUT_SCRIPT "M600" + + // Add an LCD menu for MMU2 + //#define MMU2_MENUS + #if ENABLED(MMU2_MENUS) + // Settings for filament load / unload from the LCD menu. + // This is for Prusa MK3-style extruders. Customize for your hardware. + #define MMU2_FILAMENTCHANGE_EJECT_FEED 80.0 + #define MMU2_LOAD_TO_NOZZLE_SEQUENCE \ + { 7.2, 562 }, \ + { 14.4, 871 }, \ + { 36.0, 1393 }, \ + { 14.4, 871 }, \ + { 50.0, 198 } + + #define MMU2_RAMMING_SEQUENCE \ + { 1.0, 1000 }, \ + { 1.0, 1500 }, \ + { 2.0, 2000 }, \ + { 1.5, 3000 }, \ + { 2.5, 4000 }, \ + { -15.0, 5000 }, \ + { -14.0, 1200 }, \ + { -6.0, 600 }, \ + { 10.0, 700 }, \ + { -10.0, 400 }, \ + { -50.0, 2000 } + + #endif + + //#define MMU2_DEBUG // Write debug info to serial output + +#endif // PRUSA_MMU2 + +/** + * Advanced Print Counter settings + */ +#if ENABLED(PRINTCOUNTER) + #define SERVICE_WARNING_BUZZES 3 + // Activate up to 3 service interval watchdogs + //#define SERVICE_NAME_1 "Service S" + //#define SERVICE_INTERVAL_1 100 // print hours + //#define SERVICE_NAME_2 "Service L" + //#define SERVICE_INTERVAL_2 200 // print hours + //#define SERVICE_NAME_3 "Service 3" + //#define SERVICE_INTERVAL_3 1 // print hours +#endif + +// @section develop + +/** + * M43 - display pin status, watch pins for changes, watch endstops & toggle LED, Z servo probe test, toggle pins + */ +//#define PINS_DEBUGGING + +// Enable Marlin dev mode which adds some special commands +//#define MARLIN_DEV_MODE diff --git a/config/examples/STM32F10/Configuration.h b/config/examples/STM32/STM32F10/Configuration.h similarity index 93% rename from config/examples/STM32F10/Configuration.h rename to config/examples/STM32/STM32F10/Configuration.h index a7bdafde1d..d7580be612 100644 --- a/config/examples/STM32F10/Configuration.h +++ b/config/examples/STM32/STM32F10/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #warning temp_sensor set to 998/999 (fake) #define TEMP_SENSOR_0 999 @@ -378,7 +395,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 998 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 60 @@ -397,8 +413,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -408,7 +422,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -420,7 +433,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -463,7 +475,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -818,7 +830,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -909,6 +928,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1017,7 +1039,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1110,7 +1132,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1136,7 +1158,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1205,7 +1227,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1232,6 +1254,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1339,17 +1362,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1403,7 +1430,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1883,6 +1910,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1985,6 +2020,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2039,18 +2075,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2068,7 +2104,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/STM32F4/Configuration.h b/config/examples/STM32/STM32F4/Configuration.h similarity index 93% rename from config/examples/STM32F4/Configuration.h rename to config/examples/STM32/STM32F4/Configuration.h index 6431241718..32c606f084 100644 --- a/config/examples/STM32F4/Configuration.h +++ b/config/examples/STM32/STM32F4/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/stm32f103ret6/Configuration.h b/config/examples/STM32/stm32f103ret6/Configuration.h similarity index 93% rename from config/examples/stm32f103ret6/Configuration.h rename to config/examples/STM32/stm32f103ret6/Configuration.h index c2394f4561..0090dbb6ee 100644 --- a/config/examples/stm32f103ret6/Configuration.h +++ b/config/examples/STM32/stm32f103ret6/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #warning temp_sensor set to 998/999 (fake) #define TEMP_SENSOR_0 999 @@ -378,7 +395,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 998 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 60 @@ -397,8 +413,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -408,7 +422,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -420,7 +433,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -463,7 +475,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -818,7 +830,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -909,6 +928,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1017,7 +1039,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1110,7 +1132,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1136,7 +1158,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1205,7 +1227,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1232,6 +1254,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1339,17 +1362,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1403,7 +1430,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1883,6 +1910,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1985,6 +2020,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2039,18 +2075,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2068,7 +2104,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Sanguinololu/Configuration.h b/config/examples/Sanguinololu/Configuration.h index 2be54c57bb..93f187ff4e 100644 --- a/config/examples/Sanguinololu/Configuration.h +++ b/config/examples/Sanguinololu/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -847,7 +859,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -938,6 +957,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1046,7 +1068,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1139,7 +1161,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1165,7 +1187,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1234,7 +1256,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1261,6 +1283,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1368,17 +1391,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1432,7 +1459,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1912,6 +1939,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2014,6 +2049,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2068,7 +2104,7 @@ #define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) #define RGB_LED_R_PIN 11 #define RGB_LED_G_PIN 10 #define RGB_LED_B_PIN 17 @@ -2079,7 +2115,7 @@ //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2097,7 +2133,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Sanguinololu/Configuration_adv.h b/config/examples/Sanguinololu/Configuration_adv.h index 640a1e4a1f..a5099391f6 100644 --- a/config/examples/Sanguinololu/Configuration_adv.h +++ b/config/examples/Sanguinololu/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/TheBorg/Configuration.h b/config/examples/TheBorg/Configuration.h index 761d414586..7fc477ea77 100644 --- a/config/examples/TheBorg/Configuration.h +++ b/config/examples/TheBorg/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/TheBorg/Configuration_adv.h b/config/examples/TheBorg/Configuration_adv.h index 168bee37be..2b69e488cd 100644 --- a/config/examples/TheBorg/Configuration_adv.h +++ b/config/examples/TheBorg/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ //#define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/TinyBoy2/Configuration.h b/config/examples/TinyBoy2/Configuration.h index 8fa082e30c..70fcc0626c 100644 --- a/config/examples/TinyBoy2/Configuration.h +++ b/config/examples/TinyBoy2/Configuration.h @@ -240,7 +240,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -271,13 +271,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -329,6 +343,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -385,11 +400,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -404,7 +421,6 @@ #define TEMP_SENSOR_BED 0 #endif #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -423,8 +439,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -434,7 +448,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -446,7 +459,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 100 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -499,7 +511,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -867,7 +879,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -958,6 +977,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1071,7 +1093,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1164,7 +1186,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1190,7 +1212,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1259,7 +1281,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1286,6 +1308,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1393,17 +1416,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1457,7 +1484,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1937,6 +1964,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2039,6 +2074,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2093,18 +2129,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2122,7 +2158,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/TinyBoy2/Configuration_adv.h b/config/examples/TinyBoy2/Configuration_adv.h index ff48061ff7..95c48add82 100644 --- a/config/examples/TinyBoy2/Configuration_adv.h +++ b/config/examples/TinyBoy2/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Tronxy/X1/Configuration.h b/config/examples/Tronxy/X1/Configuration.h index 8cbd6e73cb..485d23a062 100644 --- a/config/examples/Tronxy/X1/Configuration.h +++ b/config/examples/Tronxy/X1/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 11 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 260 #define HEATER_5_MAXTEMP 260 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Tronxy/X3A/Configuration.h b/config/examples/Tronxy/X3A/Configuration.h index b5f6e2e3e4..171b3fd161 100644 --- a/config/examples/Tronxy/X3A/Configuration.h +++ b/config/examples/Tronxy/X3A/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 6 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 501 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 130 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1019,7 +1041,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1112,7 +1134,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1138,7 +1160,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1207,7 +1229,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1234,6 +1256,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1341,17 +1364,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +//#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1405,7 +1432,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1885,6 +1912,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1987,6 +2022,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2041,18 +2077,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2070,7 +2106,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Tronxy/X3A/Configuration_adv.h b/config/examples/Tronxy/X3A/Configuration_adv.h index da113278b8..26e74390ed 100644 --- a/config/examples/Tronxy/X3A/Configuration_adv.h +++ b/config/examples/Tronxy/X3A/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Tronxy/X5S-2E/Configuration.h b/config/examples/Tronxy/X5S-2E/Configuration.h index f049da3739..c6f0e485b1 100644 --- a/config/examples/Tronxy/X5S-2E/Configuration.h +++ b/config/examples/Tronxy/X5S-2E/Configuration.h @@ -220,7 +220,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -251,13 +251,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -309,6 +323,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -365,11 +380,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -379,7 +396,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -398,8 +414,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -409,7 +423,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -425,7 +438,6 @@ // Tronxy X5S-2E: // The OEM stock model uses a clone MK3a 300 @ 12V with no insulation and can reach a maximum 70C at 25C ambient. #define BED_MAXTEMP 81 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -475,7 +487,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -837,7 +849,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -928,6 +947,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1036,7 +1058,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1129,7 +1151,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1155,7 +1177,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1224,7 +1246,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1251,6 +1273,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1358,17 +1381,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1422,7 +1449,7 @@ #define NOZZLE_PARK_FEATURE P2 #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1902,6 +1929,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2004,6 +2039,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2058,18 +2094,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2087,7 +2123,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Tronxy/X5S-2E/Configuration_adv.h b/config/examples/Tronxy/X5S-2E/Configuration_adv.h index aa9fb3da91..a876f31eb3 100644 --- a/config/examples/Tronxy/X5S-2E/Configuration_adv.h +++ b/config/examples/Tronxy/X5S-2E/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Tronxy/X5S/Configuration.h b/config/examples/Tronxy/X5S/Configuration.h index da25bbb692..1044b51526 100644 --- a/config/examples/Tronxy/X5S/Configuration.h +++ b/config/examples/Tronxy/X5S/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -461,7 +473,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -815,7 +827,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -906,6 +925,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1014,7 +1036,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1107,7 +1129,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1133,7 +1155,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1202,7 +1224,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1229,6 +1251,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1336,17 +1359,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1400,7 +1427,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1880,6 +1907,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1982,6 +2017,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2036,18 +2072,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2065,7 +2101,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Tronxy/XY100/Configuration.h b/config/examples/Tronxy/XY100/Configuration.h index dd5e9b6c12..1187f96610 100644 --- a/config/examples/Tronxy/XY100/Configuration.h +++ b/config/examples/Tronxy/XY100/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -473,7 +485,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -827,7 +839,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -918,6 +937,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1026,7 +1048,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1119,7 +1141,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1145,7 +1167,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1214,7 +1236,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1241,6 +1263,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1348,17 +1371,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1412,7 +1439,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1892,6 +1919,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1994,6 +2029,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2048,18 +2084,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2077,7 +2113,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/UltiMachine/Archim1/Configuration.h b/config/examples/UltiMachine/Archim1/Configuration.h index 1f3bdab798..86c476c392 100644 --- a/config/examples/UltiMachine/Archim1/Configuration.h +++ b/config/examples/UltiMachine/Archim1/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/UltiMachine/Archim1/Configuration_adv.h b/config/examples/UltiMachine/Archim1/Configuration_adv.h index b3a5dcbad1..8249046bf8 100644 --- a/config/examples/UltiMachine/Archim1/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim1/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/UltiMachine/Archim2/Configuration.h b/config/examples/UltiMachine/Archim2/Configuration.h index 99dc6ecd2c..53b4e36150 100644 --- a/config/examples/UltiMachine/Archim2/Configuration.h +++ b/config/examples/UltiMachine/Archim2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/UltiMachine/Archim2/Configuration_adv.h b/config/examples/UltiMachine/Archim2/Configuration_adv.h index e7df3a08d8..99515bf98f 100644 --- a/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ //#define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/VORONDesign/Configuration.h b/config/examples/VORONDesign/Configuration.h index b3949cca28..3007ab374b 100644 --- a/config/examples/VORONDesign/Configuration.h +++ b/config/examples/VORONDesign/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 5 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -825,7 +837,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -916,6 +935,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1024,7 +1046,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1117,7 +1139,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1143,7 +1165,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1212,7 +1234,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1239,6 +1261,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1346,17 +1369,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1410,7 +1437,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1890,6 +1917,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1992,6 +2027,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2046,18 +2082,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2075,7 +2111,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/VORONDesign/Configuration_adv.h b/config/examples/VORONDesign/Configuration_adv.h index 5982dc166c..301c989859 100644 --- a/config/examples/VORONDesign/Configuration_adv.h +++ b/config/examples/VORONDesign/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Velleman/K8200/Configuration.h b/config/examples/Velleman/K8200/Configuration.h index 6dbcbc1c7f..6ed9553330 100644 --- a/config/examples/Velleman/K8200/Configuration.h +++ b/config/examples/Velleman/K8200/Configuration.h @@ -238,7 +238,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -269,13 +269,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -327,6 +341,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -383,11 +398,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -397,7 +414,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -416,8 +432,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -427,7 +441,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -439,7 +452,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -486,7 +498,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -845,7 +857,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -936,6 +955,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1045,7 +1067,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1138,7 +1160,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1164,7 +1186,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1233,7 +1255,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1260,6 +1282,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1367,17 +1390,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1431,7 +1458,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1914,6 +1941,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2018,6 +2053,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2072,18 +2108,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2101,7 +2137,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Velleman/K8200/Configuration_adv.h b/config/examples/Velleman/K8200/Configuration_adv.h index 4717dabd08..3124c5b1cc 100644 --- a/config/examples/Velleman/K8200/Configuration_adv.h +++ b/config/examples/Velleman/K8200/Configuration_adv.h @@ -48,6 +48,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -59,6 +110,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -88,7 +151,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 8 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -140,8 +203,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -266,7 +329,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -417,20 +480,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -469,6 +532,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 4, 4, 8 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -526,8 +590,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -783,8 +850,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -796,8 +866,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -900,6 +976,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -972,19 +1059,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1015,6 +1111,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1042,13 +1140,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1082,7 +1181,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1124,7 +1224,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1139,8 +1240,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1332,6 +1433,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1667,7 +1769,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1682,8 +1784,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2180,7 +2281,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2240,7 +2341,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Velleman/K8400/Configuration.h b/config/examples/Velleman/K8400/Configuration.h index 152e82b1f7..4eb6c5efb2 100644 --- a/config/examples/Velleman/K8400/Configuration.h +++ b/config/examples/Velleman/K8400/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,7 +2073,7 @@ //#define RGB_LED // Enable for the Velleman RGB LED Add-on. https://www.velleman.eu/products/view/?id=430100 //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) // Pin defines for the RGB LED Add-on. #define RGB_LED_R_PIN 41 #define RGB_LED_G_PIN 40 @@ -2049,7 +2085,7 @@ //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2067,7 +2103,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Velleman/K8400/Configuration_adv.h b/config/examples/Velleman/K8400/Configuration_adv.h index b88593d8c8..51938770b5 100644 --- a/config/examples/Velleman/K8400/Configuration_adv.h +++ b/config/examples/Velleman/K8400/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 1000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 3 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Velleman/K8400/Dual-head/Configuration.h b/config/examples/Velleman/K8400/Dual-head/Configuration.h index 9971e75d10..3334cfb5b7 100644 --- a/config/examples/Velleman/K8400/Dual-head/Configuration.h +++ b/config/examples/Velleman/K8400/Dual-head/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 5 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,7 +2073,7 @@ //#define RGB_LED // Enable for the Velleman RGB LED Add-on. https://www.velleman.eu/products/view/?id=430100 //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if EITHER(RGB_LED, RGBW_LED) // Pin defines for the RGB LED Add-on. #define RGB_LED_R_PIN 41 #define RGB_LED_G_PIN 40 @@ -2049,7 +2085,7 @@ //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2067,7 +2103,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/WASP/PowerWASP/Configuration.h b/config/examples/WASP/PowerWASP/Configuration.h index 8e8d0f9da1..44be26a90c 100644 --- a/config/examples/WASP/PowerWASP/Configuration.h +++ b/config/examples/WASP/PowerWASP/Configuration.h @@ -237,7 +237,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -268,13 +268,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -326,6 +340,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -382,11 +397,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_1 0 @@ -396,7 +413,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -415,8 +431,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -426,7 +440,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -438,7 +451,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -481,7 +493,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -835,7 +847,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -926,6 +945,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1034,7 +1056,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1127,7 +1149,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1153,7 +1175,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1222,7 +1244,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1249,6 +1271,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1356,17 +1379,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1420,7 +1447,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 190 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 10 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1900,6 +1927,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2002,6 +2037,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2056,18 +2092,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2085,7 +2121,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/WASP/PowerWASP/Configuration_adv.h b/config/examples/WASP/PowerWASP/Configuration_adv.h index 4205b4a66b..ff4096699a 100644 --- a/config/examples/WASP/PowerWASP/Configuration_adv.h +++ b/config/examples/WASP/PowerWASP/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ #define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - #define POWER_LOSS_PIN 65 // Pin to detect power loss - #define POWER_LOSS_STATE LOW // State of pin indicating power loss + #define POWER_LOSS_PIN 65 // Pin to detect power loss + #define POWER_LOSS_STATE LOW // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/Wanhao/Duplicator 6/Configuration.h b/config/examples/Wanhao/Duplicator 6/Configuration.h index 97c1365169..1baf5e0608 100644 --- a/config/examples/Wanhao/Duplicator 6/Configuration.h +++ b/config/examples/Wanhao/Duplicator 6/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 20 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 120 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -826,7 +838,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -917,6 +936,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1025,7 +1047,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1118,7 +1140,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1144,7 +1166,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1213,7 +1235,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1240,6 +1262,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1347,17 +1370,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1411,7 +1438,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1894,6 +1921,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1996,6 +2031,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2050,18 +2086,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2079,7 +2115,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index cbb6bdabca..17b98d56b9 100644 --- a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) #define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ #define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.00 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/adafruit/ST7565/Configuration.h b/config/examples/adafruit/ST7565/Configuration.h index ad1b5507b8..47e8d3565a 100644 --- a/config/examples/adafruit/ST7565/Configuration.h +++ b/config/examples/adafruit/ST7565/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -816,7 +828,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -907,6 +926,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1015,7 +1037,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1108,7 +1130,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1134,7 +1156,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1203,7 +1225,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1230,6 +1252,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1337,17 +1360,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1401,7 +1428,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1881,6 +1908,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1983,6 +2018,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2037,18 +2073,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2066,7 +2102,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/Anycubic/Kossel/Configuration.h b/config/examples/delta/Anycubic/Kossel/Configuration.h index cd44da1a6c..3b0006240f 100644 --- a/config/examples/delta/Anycubic/Kossel/Configuration.h +++ b/config/examples/delta/Anycubic/Kossel/Configuration.h @@ -233,7 +233,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -264,13 +264,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -322,6 +336,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -378,11 +393,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -398,7 +415,6 @@ #endif #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -417,8 +433,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -428,7 +442,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -440,7 +453,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 120 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -488,7 +500,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -638,7 +650,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS DELTA_PRINTABLE_RADIUS - MIN_PROBE_EDGE // (mm) // Set the steprate for papertest probing @@ -952,7 +964,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1203,7 +1222,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1298,7 +1317,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1324,7 +1343,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1394,7 +1413,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X -40 #define PROBE_PT_1_Y 60 #define PROBE_PT_2_X 40 @@ -1421,6 +1440,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1527,17 +1547,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1591,7 +1615,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { 0, 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 100 // (mm/s) Z axis feedrate (not used for delta printers) @@ -2071,6 +2095,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2173,6 +2205,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2227,18 +2260,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2256,7 +2289,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h index f0e61e0dd1..12feb146d8 100644 --- a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h +++ b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration.h index ab5baa3c06..c69412b498 100644 --- a/config/examples/delta/FLSUN/auto_calibrate/Configuration.h +++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 250 #define HEATER_5_MAXTEMP 250 #define BED_MAXTEMP 115 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -605,7 +617,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 73.5 // (mm) // Set the steprate for papertest probing @@ -898,7 +910,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1035,6 +1054,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1143,7 +1165,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1236,7 +1258,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1262,7 +1284,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1332,7 +1354,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1359,6 +1381,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1465,17 +1488,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1529,7 +1556,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -2009,6 +2036,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2111,6 +2146,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2165,18 +2201,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2194,7 +2230,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index a583068de1..1e22594afc 100644 --- a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/FLSUN/kossel/Configuration.h b/config/examples/delta/FLSUN/kossel/Configuration.h index 516e52b68e..b21b374aef 100644 --- a/config/examples/delta/FLSUN/kossel/Configuration.h +++ b/config/examples/delta/FLSUN/kossel/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 250 #define HEATER_5_MAXTEMP 250 #define BED_MAXTEMP 115 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -605,7 +617,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 7 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 63 // (mm) // Set the steprate for papertest probing @@ -898,7 +910,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1034,6 +1053,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1142,7 +1164,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1235,7 +1257,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1261,7 +1283,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1331,7 +1353,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1358,6 +1380,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1464,17 +1487,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1528,7 +1555,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -2008,6 +2035,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2110,6 +2145,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2164,18 +2200,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2193,7 +2229,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/config/examples/delta/FLSUN/kossel/Configuration_adv.h index a583068de1..1e22594afc 100644 --- a/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration.h b/config/examples/delta/FLSUN/kossel_mini/Configuration.h index 9491839383..81ae7f6828 100644 --- a/config/examples/delta/FLSUN/kossel_mini/Configuration.h +++ b/config/examples/delta/FLSUN/kossel_mini/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -605,7 +617,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 73.5 // (mm) // Set the steprate for papertest probing @@ -898,7 +910,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1034,6 +1053,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1142,7 +1164,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1235,7 +1257,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1261,7 +1283,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1331,7 +1353,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1358,6 +1380,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1464,17 +1487,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1528,7 +1555,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -2008,6 +2035,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2110,6 +2145,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2164,18 +2200,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2193,7 +2229,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 9f8c92589b..e0487a9f9b 100644 --- a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration.h b/config/examples/delta/Geeetech/Rostock 301/Configuration.h index 58171ba2ac..6eef6ee49b 100644 --- a/config/examples/delta/Geeetech/Rostock 301/Configuration.h +++ b/config/examples/delta/Geeetech/Rostock 301/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -595,7 +607,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -888,7 +900,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1022,6 +1041,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1105,9 +1127,6 @@ #define Y_MAX_POS DELTA_PRINTABLE_RADIUS #define Z_MAX_POS MANUAL_Z_HOME_POS -// Z raise distance for tool-change, as needed for some extruders -#define TOOLCHANGE_ZRAISE 2 // (mm) - /** * Software Endstops * @@ -1133,7 +1152,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1226,7 +1245,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1252,7 +1271,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1322,7 +1341,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1349,6 +1368,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1455,17 +1475,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1519,7 +1543,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1999,6 +2023,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2101,6 +2133,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2155,18 +2188,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2184,7 +2217,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h index 9f8c92589b..e0487a9f9b 100644 --- a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h +++ b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/Hatchbox_Alpha/Configuration.h b/config/examples/delta/Hatchbox_Alpha/Configuration.h index 1674933b0b..fc1da056bc 100644 --- a/config/examples/delta/Hatchbox_Alpha/Configuration.h +++ b/config/examples/delta/Hatchbox_Alpha/Configuration.h @@ -223,7 +223,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -254,13 +254,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -312,6 +326,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -368,11 +383,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -382,7 +399,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -401,8 +417,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -412,7 +426,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -424,7 +437,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -472,7 +484,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -610,7 +622,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -903,7 +915,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1037,6 +1056,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1145,7 +1167,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1238,7 +1260,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1264,7 +1286,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1334,7 +1356,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X -116 #define PROBE_PT_1_Y -67.5 #define PROBE_PT_2_X 116 @@ -1361,6 +1383,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1467,17 +1490,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1531,7 +1558,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -2011,6 +2038,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2113,6 +2148,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2167,18 +2203,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2196,7 +2232,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/MKS/SBASE/Configuration.h b/config/examples/delta/MKS/SBASE/Configuration.h index dc59c17c7a..1ca23819af 100644 --- a/config/examples/delta/MKS/SBASE/Configuration.h +++ b/config/examples/delta/MKS/SBASE/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -595,7 +607,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -888,7 +900,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1022,6 +1041,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1130,7 +1152,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1223,7 +1245,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1249,7 +1271,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1319,7 +1341,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1346,6 +1368,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1452,17 +1475,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1516,7 +1543,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1996,6 +2023,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2098,6 +2133,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2152,18 +2188,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2181,7 +2217,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/MKS/SBASE/Configuration_adv.h b/config/examples/delta/MKS/SBASE/Configuration_adv.h index d51093dfb6..5db914a78f 100644 --- a/config/examples/delta/MKS/SBASE/Configuration_adv.h +++ b/config/examples/delta/MKS/SBASE/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 6 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/Tevo Little Monster/Configuration.h b/config/examples/delta/Tevo Little Monster/Configuration.h index 88c4dc9dd9..f63afa88d4 100644 --- a/config/examples/delta/Tevo Little Monster/Configuration.h +++ b/config/examples/delta/Tevo Little Monster/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -466,7 +478,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -599,7 +611,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 7 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 140 // (mm) // Set the steprate for papertest probing @@ -892,7 +904,7 @@ */ #define BLTOUCH #if ENABLED(BLTOUCH) - #define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + #define BLTOUCH_DELAY 500 // (ms) Enable and increase if needed #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1026,6 +1038,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1134,7 +1149,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1227,7 +1242,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1253,7 +1268,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1323,7 +1338,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1350,6 +1365,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1456,17 +1472,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1520,7 +1540,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { 0, 0, (DELTA_HEIGHT - 10) } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -2000,6 +2020,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2102,6 +2130,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2156,18 +2185,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2185,7 +2214,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/config/examples/delta/Tevo Little Monster/Configuration_adv.h index eb53c8ea47..9984ccb86a 100644 --- a/config/examples/delta/Tevo Little Monster/Configuration_adv.h +++ b/config/examples/delta/Tevo Little Monster/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 10 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2157,7 +2255,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2217,7 +2315,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/generic/Configuration.h b/config/examples/delta/generic/Configuration.h index 745e09c61a..312e83c771 100644 --- a/config/examples/delta/generic/Configuration.h +++ b/config/examples/delta/generic/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -595,7 +607,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -888,7 +900,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1022,6 +1041,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1130,7 +1152,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1223,7 +1245,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1249,7 +1271,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1319,7 +1341,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1346,6 +1368,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1452,17 +1475,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1516,7 +1543,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1996,6 +2023,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2098,6 +2133,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2152,18 +2188,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2181,7 +2217,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/generic/Configuration_adv.h b/config/examples/delta/generic/Configuration_adv.h index 9f8c92589b..e0487a9f9b 100644 --- a/config/examples/delta/generic/Configuration_adv.h +++ b/config/examples/delta/generic/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/kossel_mini/Configuration.h b/config/examples/delta/kossel_mini/Configuration.h index 54cfb13592..723d3263f0 100644 --- a/config/examples/delta/kossel_mini/Configuration.h +++ b/config/examples/delta/kossel_mini/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 7 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 11 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -595,7 +607,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 78.0 // (mm) // Set the steprate for papertest probing @@ -888,7 +900,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1024,6 +1043,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1132,7 +1154,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1225,7 +1247,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1251,7 +1273,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1321,7 +1343,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1348,6 +1370,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1454,17 +1477,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1518,7 +1545,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1998,6 +2025,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2100,6 +2135,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2154,18 +2190,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2183,7 +2219,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/kossel_mini/Configuration_adv.h b/config/examples/delta/kossel_mini/Configuration_adv.h index 8ec47cf107..bf29999ba9 100644 --- a/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/config/examples/delta/kossel_mini/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 5 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 10, 10, 10 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -771,8 +835,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -784,8 +851,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -888,6 +961,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -960,19 +1044,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1003,6 +1096,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1030,13 +1125,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1070,7 +1166,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1112,7 +1209,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1127,8 +1225,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1320,6 +1418,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1655,7 +1754,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1670,8 +1769,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2168,7 +2266,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2228,7 +2326,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/delta/kossel_pro/Configuration.h b/config/examples/delta/kossel_pro/Configuration.h index e0604fc49d..aecd7761bf 100644 --- a/config/examples/delta/kossel_pro/Configuration.h +++ b/config/examples/delta/kossel_pro/Configuration.h @@ -222,7 +222,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -253,13 +253,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -311,6 +325,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -367,11 +382,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -381,7 +398,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -400,8 +416,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -411,7 +425,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -423,7 +436,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -454,7 +466,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -581,7 +593,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 110.0 // (mm) // Set the steprate for papertest probing @@ -881,7 +893,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1025,6 +1044,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1133,7 +1155,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1226,7 +1248,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1252,7 +1274,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1322,7 +1344,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1349,6 +1371,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1455,17 +1478,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1519,7 +1546,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1999,6 +2026,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2101,6 +2136,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2155,18 +2191,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2184,7 +2220,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/kossel_xl/Configuration.h b/config/examples/delta/kossel_xl/Configuration.h index a7a921f966..0773a3f31c 100644 --- a/config/examples/delta/kossel_xl/Configuration.h +++ b/config/examples/delta/kossel_xl/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -466,7 +478,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -599,7 +611,7 @@ #define DELTA_CALIBRATION_DEFAULT_POINTS 4 #endif - #if ENABLED(DELTA_AUTO_CALIBRATION) || ENABLED(DELTA_CALIBRATION_MENU) + #if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) // Set the radius for the calibration probe points - max DELTA_PRINTABLE_RADIUS for non-eccentric probes #define DELTA_CALIBRATION_RADIUS 121.5 // (mm) // Set the steprate for papertest probing @@ -891,7 +903,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -1025,6 +1044,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1133,7 +1155,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1226,7 +1248,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1252,7 +1274,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. // Works best with 5 or more points in each dimension. @@ -1322,7 +1344,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1349,6 +1371,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1455,17 +1478,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1519,7 +1546,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), 0, 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1999,6 +2026,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -2101,6 +2136,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2155,18 +2191,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2184,7 +2220,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/delta/kossel_xl/Configuration_adv.h b/config/examples/delta/kossel_xl/Configuration_adv.h index 40255faef3..fafbd0bd12 100644 --- a/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/config/examples/delta/kossel_xl/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 // deltas need the same for all three axes #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -772,8 +836,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -785,8 +852,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -889,6 +962,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -961,19 +1045,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1004,6 +1097,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1031,13 +1126,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1071,7 +1167,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1113,7 +1210,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1128,8 +1226,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1321,6 +1419,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1656,7 +1755,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1671,8 +1770,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2169,7 +2267,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2229,7 +2327,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/gCreate/gMax1.5+/Configuration.h b/config/examples/gCreate/gMax1.5+/Configuration.h index e00289c0df..a029cda7bd 100644 --- a/config/examples/gCreate/gMax1.5+/Configuration.h +++ b/config/examples/gCreate/gMax1.5+/Configuration.h @@ -223,7 +223,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -254,13 +254,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -312,6 +326,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -368,11 +383,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -385,7 +402,6 @@ // a Fortek SSR to do it. If you are using an unaltered gCreate machine, this needs // to be set to 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -404,8 +420,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -415,7 +429,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -427,7 +440,6 @@ #define HEATER_4_MAXTEMP 245 #define HEATER_5_MAXTEMP 245 #define BED_MAXTEMP 115 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -475,7 +487,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -920,6 +932,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1029,7 +1044,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1122,7 +1137,7 @@ */ #define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1148,7 +1163,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1217,7 +1232,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) #define PROBE_PT_1_X 53 #define PROBE_PT_1_Y 323 #define PROBE_PT_2_X 53 @@ -1244,6 +1259,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1351,17 +1367,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1415,7 +1435,7 @@ #define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1895,6 +1915,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1997,6 +2025,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2051,18 +2080,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2080,7 +2109,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 2e4e1f240e..7e2165e91f 100644 --- a/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 3 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/makibox/Configuration.h b/config/examples/makibox/Configuration.h index c012c76c92..f8971dfd86 100644 --- a/config/examples/makibox/Configuration.h +++ b/config/examples/makibox/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 1 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 12 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -462,7 +474,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -819,7 +831,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -910,6 +929,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1018,7 +1040,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1111,7 +1133,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1137,7 +1159,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1206,7 +1228,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1233,6 +1255,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1340,17 +1363,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1404,7 +1431,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1884,6 +1911,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1986,6 +2021,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2040,18 +2076,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2069,7 +2105,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/makibox/Configuration_adv.h b/config/examples/makibox/Configuration_adv.h index 6593cb1453..80dc806692 100644 --- a/config/examples/makibox/Configuration_adv.h +++ b/config/examples/makibox/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/tvrrug/Round2/Configuration.h b/config/examples/tvrrug/Round2/Configuration.h index f6fc500042..da7f3839a5 100644 --- a/config/examples/tvrrug/Round2/Configuration.h +++ b/config/examples/tvrrug/Round2/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -451,7 +463,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -811,7 +823,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -902,6 +921,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1010,7 +1032,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1103,7 +1125,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1129,7 +1151,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1198,7 +1220,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1225,6 +1247,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1332,17 +1355,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -//#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +//#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1396,7 +1423,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1876,6 +1903,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1978,6 +2013,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2032,18 +2068,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2061,7 +2097,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/tvrrug/Round2/Configuration_adv.h b/config/examples/tvrrug/Round2/Configuration_adv.h index 437f60f454..4f58660ded 100644 --- a/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/config/examples/tvrrug/Round2/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 1 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -770,8 +837,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G27" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -783,8 +853,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -887,6 +963,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -959,19 +1046,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1002,6 +1098,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1029,13 +1127,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1069,7 +1168,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1111,7 +1211,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1126,8 +1227,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1319,6 +1420,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1654,7 +1756,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1669,8 +1771,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2167,7 +2268,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2227,7 +2328,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /** diff --git a/config/examples/wt150/Configuration.h b/config/examples/wt150/Configuration.h index 6f2a0c09a2..1b775eb947 100644 --- a/config/examples/wt150/Configuration.h +++ b/config/examples/wt150/Configuration.h @@ -218,7 +218,7 @@ */ //#define MAGNETIC_PARKING_EXTRUDER -#if ENABLED(PARKING_EXTRUDER) || ENABLED(MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder @@ -249,13 +249,27 @@ * the E3D Tool Changer. Toolheads are locked with a servo. */ //#define SWITCHING_TOOLHEAD -#if ENABLED(SWITCHING_TOOLHEAD) - #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector - #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock - #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock - #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis - #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis - #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + +/** + * Magnetic Switching Toolhead + * + * Support swappable and dockable toolheads with a magnetic + * docking mechanism using movement and no servo. + */ +//#define MAGNETIC_SWITCHING_TOOLHEAD + +#if EITHER(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_POS 235 // (mm) Y position of the toolhead dock + #define SWITCHING_TOOLHEAD_Y_SECURITY 10 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_Y_CLEAR 60 // (mm) Minimum distance from dock for unobstructed X axis + #define SWITCHING_TOOLHEAD_X_POS { 215, 0 } // (mm) X positions for parking the extruders + #if ENABLED(SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_SERVO_NR 2 // Index of the servo connector + #define SWITCHING_TOOLHEAD_SERVO_ANGLES { 0, 180 } // (degrees) Angles for Lock, Unlock + #elif ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) + #define SWITCHING_TOOLHEAD_Y_RELEASE 5 // (mm) Security distance Y axis + #define SWITCHING_TOOLHEAD_X_SECURITY -35 // (mm) Security distance X axis + #endif #endif /** @@ -307,6 +321,7 @@ #define AUTO_POWER_FANS // Turn on PSU if fans need power #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN + #define AUTO_POWER_CHAMBER_FAN #define POWER_TIMEOUT 30 #endif @@ -363,11 +378,13 @@ * 147 : Pt100 with 4k7 pullup * 110 : Pt100 with 1k pullup (non standard) * + * 1000 : Custom - Specify parameters in Configuration_adv.h + * * Use these for Testing or Development purposes. NEVER for production machine. * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. * - * :{ '0': "Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595",'998':"Dummy 1", '999':"Dummy 2" } + * :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '20':"PT100 (Ultimainboard V2.x)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" } */ #define TEMP_SENSOR_0 -2 #define TEMP_SENSOR_1 0 @@ -377,7 +394,6 @@ #define TEMP_SENSOR_5 0 #define TEMP_SENSOR_BED 0 #define TEMP_SENSOR_CHAMBER 0 -#define CHAMBER_HEATER_PIN -1 // On/off pin for enclosure heating system // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -396,8 +412,6 @@ #define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer #define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target - // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #define HEATER_0_MINTEMP 5 @@ -407,7 +421,6 @@ #define HEATER_4_MINTEMP 5 #define HEATER_5_MINTEMP 5 #define BED_MINTEMP 5 -#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -419,7 +432,6 @@ #define HEATER_4_MAXTEMP 275 #define HEATER_5_MAXTEMP 275 #define BED_MAXTEMP 150 -#define CHAMBER_MAXTEMP 100 //=========================================================================== //============================= PID Settings ================================ @@ -467,7 +479,7 @@ #endif // PIDTEMP //=========================================================================== -//============================= PID > Bed Temperature Control =============== +//====================== PID > Bed Temperature Control ====================== //=========================================================================== /** @@ -821,7 +833,14 @@ */ //#define BLTOUCH #if ENABLED(BLTOUCH) - //#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed + //#define BLTOUCH_DELAY 500 // Minimum Command delay (ms). Enable and increase if needed + + /** + * BLTouch V3.0 and newer smart series + * For genuine BLTouch 3.0 sensors. Clones may be confused by 3.0 command angles. YMMV. + * If the pin trigger is not detected, first try swapping the black and white wires then toggle this. + */ + //#define BLTOUCH_FORCE_5V_MODE #endif // A probe that is deployed and stowed with a solenoid pin (SOL1_PIN) @@ -912,6 +931,9 @@ // Before deploy/stow pause for user confirmation //#define PAUSE_BEFORE_DEPLOY_STOW +#if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) + //#define PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED // For Manual Deploy Allenkey Probe +#endif /** * Enable one or more of the following if probing seems unreliable. @@ -1020,7 +1042,7 @@ #define MAX_SOFTWARE_ENDSTOP_Z #endif -#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS) +#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD #endif @@ -1113,7 +1135,7 @@ */ //#define DEBUG_LEVELING_FEATURE -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL) +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. // The height can be set with M420 Z @@ -1139,7 +1161,7 @@ #endif -#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR) +#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 @@ -1208,7 +1230,7 @@ * Points to probe for all 3-point Leveling procedures. * Override if the automatically selected points are inadequate. */ -#if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_UBL) //#define PROBE_PT_1_X 15 //#define PROBE_PT_1_Y 180 //#define PROBE_PT_2_X 15 @@ -1235,6 +1257,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners + #define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif @@ -1342,17 +1365,21 @@ // @section extras -// -// EEPROM -// -// The microcontroller can store settings in the EEPROM, e.g. max velocity... -// M500 - stores parameters in EEPROM -// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily). -// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. -// -#define EEPROM_SETTINGS // Enable for M500 and M501 commands -//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! -#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +/** + * EEPROM + * + * Persistent storage to preserve configurable settings across reboots. + * + * M500 - Store settings to EEPROM. + * M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) + * M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.) + */ +#define EEPROM_SETTINGS // Persistent storage with M500 and M501 +//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release! +#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM. +#if ENABLED(EEPROM_SETTINGS) + //#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors. +#endif // // Host Keepalive @@ -1406,7 +1433,7 @@ //#define NOZZLE_PARK_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) - // Specify a park position as { X, Y, Z } + // Specify a park position as { X, Y, Z_raise } #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 } #define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis) #define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers) @@ -1886,6 +1913,14 @@ // //#define MKS_MINI_12864 +// +// FYSETC variant of the MINI12864 graphic controller with SD support +// https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 +// +//#define FYSETC_MINI_12864_1_2 // Type C/D/E/F. Simple RGB Backlight (always on) +//#define FYSETC_MINI_12864_2_0 // Type A/B. Discreet RGB Backlight +//#define FYSETC_MINI_12864_2_1 // Type A/B. Neopixel RGB Backlight + // // Factory display for Creality CR-10 // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html @@ -1988,6 +2023,7 @@ // affecting heaters, and the fan if FAN_SOFT_PWM is enabled. // However, control resolution will be halved for each increment; // at zero value, there are 128 effective control positions. +// :[0,1,2,3,4,5,6,7] #define SOFT_PWM_SCALE 0 // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can @@ -2042,18 +2078,18 @@ //#define RGB_LED //#define RGBW_LED -#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) - #define RGB_LED_R_PIN 34 - #define RGB_LED_G_PIN 43 - #define RGB_LED_B_PIN 35 - #define RGB_LED_W_PIN -1 +#if EITHER(RGB_LED, RGBW_LED) + //#define RGB_LED_R_PIN 34 + //#define RGB_LED_G_PIN 43 + //#define RGB_LED_B_PIN 35 + //#define RGB_LED_W_PIN -1 #endif // Support for Adafruit Neopixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin on motherboard 4 => D4 (EXP2-5 on Printrboard) / 30 => PC7 (EXP3-13 on Rumba) + #define NEOPIXEL_PIN 4 // LED driving pin #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) @@ -2071,7 +2107,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(PCA9533)|| ENABLED(NEOPIXEL_LED) +#if ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/config/examples/wt150/Configuration_adv.h b/config/examples/wt150/Configuration_adv.h index a332b2a231..5e2675f4f4 100644 --- a/config/examples/wt150/Configuration_adv.h +++ b/config/examples/wt150/Configuration_adv.h @@ -39,6 +39,57 @@ //=============================Thermal Settings ============================ //=========================================================================== +// +// Custom Thermistor 1000 parameters +// +#if TEMP_SENSOR_0 == 1000 + #define HOTEND0_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND0_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND0_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_1 == 1000 + #define HOTEND1_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND1_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND1_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_2 == 1000 + #define HOTEND2_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND2_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND2_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_3 == 1000 + #define HOTEND3_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND3_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND3_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_4 == 1000 + #define HOTEND4_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND4_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND4_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_5 == 1000 + #define HOTEND5_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define HOTEND5_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define HOTEND5_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BED == 1000 + #define BED_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BED_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BED_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_CHAMBER == 1000 + #define CHAMBER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define CHAMBER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define CHAMBER_BETA 3950 // Beta value +#endif + // // Hephestos 2 24V heated bed upgrade kit. // https://store.bq.com/en/heated-bed-kit-hephestos2 @@ -50,6 +101,18 @@ #define HEATER_BED_INVERTING true #endif +/** + * Heated Chamber settings + */ +#if TEMP_SENSOR_CHAMBER + #define CHAMBER_MINTEMP 5 + #define CHAMBER_MAXTEMP 60 + #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + //#define CHAMBER_LIMIT_SWITCHING + //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_INVERTING false +#endif + #if DISABLED(PIDTEMPBED) #define BED_CHECK_INTERVAL 5000 // ms between checks in bang-bang control #if ENABLED(BED_LIMIT_SWITCHING) @@ -78,7 +141,7 @@ #define THERMAL_PROTECTION_HYSTERESIS 4 // Degrees Celsius //#define ADAPTIVE_FAN_SLOWING // Slow part cooling fan if temperature drops - #if ENABLED(ADAPTIVE_FAN_SLOWING) && ENABLED(PIDTEMP) + #if BOTH(ADAPTIVE_FAN_SLOWING, PIDTEMP) //#define NO_FAN_SLOWING_IN_PID_TUNING // Don't slow fan speed during M303 #endif @@ -127,8 +190,8 @@ #endif #if ENABLED(PIDTEMP) - // this adds an experimental additional term to the heating power, proportional to the extrusion speed. - // if Kc is chosen well, the additional required power due to increased melting should be compensated. + // Add an experimental additional term to the heater power, proportional to the extrusion speed. + // A well-chosen Kc value should add just enough power to melt the increased material volume. //#define PID_EXTRUSION_SCALING #if ENABLED(PID_EXTRUSION_SCALING) #define DEFAULT_Kc (100) //heating power=Kc*(e_speed) @@ -253,7 +316,7 @@ * If left undefined this defaults to F = F_CPU/(2*255*1) * ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers * These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required - * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour. + * NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior. * * USE_OCR2A_AS_TOP [undefined by default] * Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2: @@ -404,20 +467,20 @@ * The inactive carriage is parked automatically to prevent oozing. * X1 is the left carriage, X2 the right. They park and home at opposite ends of the X axis. * By default the X2 stepper is assigned to the first unused E plug on the board. - * + * * The following Dual X Carriage modes can be selected with M605 S: - * + * * 0 : (FULL_CONTROL) The slicer has full control over both X-carriages and can achieve optimal travel * results as long as it supports dual X-carriages. (M605 S0) - * + * * 1 : (AUTO_PARK) The firmware automatically parks and unparks the X-carriages on tool-change so * that additional slicer support is not required. (M605 S1) - * + * * 2 : (DUPLICATION) The firmware moves the second X-carriage and extruder in synchronization with * the first X-carriage and extruder, to print 2 copies of the same object at the same time. * Set the constant X-offset and temperature differential with M605 S2 X[offs] R[deg] and * follow with M605 S2 to initiate duplicated movement. - * + * * 3 : (MIRRORED) Formbot/Vivedino-inspired mirrored mode in which the second extruder duplicates * the movement of the first except the second extruder is reversed in the X axis. * Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and @@ -456,6 +519,7 @@ #define Z_HOME_BUMP_MM 2 #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) //#define QUICK_HOME // If homing includes X and Y, do a diagonal move initially +//#define HOMING_BACKOFF_MM { 2, 2, 2 } // (mm) Move away from the endstops after homing // When G28 is called, this option will make Y home before X //#define HOME_Y_BEFORE_X @@ -513,8 +577,11 @@ // @section lcd -#if ENABLED(ULTIPANEL) +#if EITHER(ULTIPANEL, EXTENSIBLE_UI) #define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel +#endif + +#if ENABLED(ULTIPANEL) #define MANUAL_E_MOVES_RELATIVE // Show LCD extruder moves as relative rather than absolute positions #define ULTIPANEL_FEEDMULTIPLY // Comment to disable setting feedrate multiplier via encoder #endif @@ -771,8 +838,11 @@ // Since the FAT gets out of order with usage, SDCARD_SORT_ALPHA is recommended. #define SDCARD_RATHERRECENTFIRST - // Add an option in the menu to run all auto#.g files - //#define MENU_ADDAUTOSTART + #define SD_MENU_CONFIRM_START // Confirm the selected SD file before printing + + //#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files + + #define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27") /** * Continue after Power-Loss (Creality3D) @@ -784,8 +854,14 @@ */ //#define POWER_LOSS_RECOVERY #if ENABLED(POWER_LOSS_RECOVERY) - //#define POWER_LOSS_PIN 44 // Pin to detect power loss - //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PIN 44 // Pin to detect power loss + //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss + //#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume + //#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power. + + // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, + // especially with "vase mode" printing. Set too high and vases cannot be continued. + #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data #endif /** @@ -888,6 +964,17 @@ // Add an optimized binary file transfer mode, initiated with 'M28 B1' //#define BINARY_FILE_TRANSFER + // LPC-based boards have on-board SD Card options. Override here or defaults apply. + #ifdef TARGET_LPC1768 + //#define LPC_SD_LCD // Use the SD drive in the external LCD controller. + //#define LPC_SD_ONBOARD // Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.) + //#define LPC_SD_CUSTOM_CABLE // Use a custom cable to access the SD (as defined in a pins file). + //#define USB_SD_DISABLED // Disable SD Card access over USB (for security). + #if ENABLED(LPC_SD_ONBOARD) + //#define USB_SD_ONBOARD // Provide the onboard SD card to the host as a USB mass storage device. + #endif + #endif + #endif // SDSUPPORT /** @@ -960,19 +1047,28 @@ //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames //#define STATUS_HEAT_PERCENT // Show heating in a progress bar + //#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash) + + // Frivolous Game Options + //#define MARLIN_BRICKOUT + //#define MARLIN_INVADERS + //#define MARLIN_SNAKE #endif // HAS_GRAPHICAL_LCD // @section safety -// The hardware watchdog should reset the microcontroller disabling all outputs, -// in case the firmware gets stuck and doesn't do temperature regulation. +/** + * The watchdog hardware timer will do a reset and disable all outputs + * if the firmware gets too overloaded to read the temperature sensors. + * + * If you find that watchdog reboot causes your AVR board to hang forever, + * enable WATCHDOG_RESET_MANUAL to use a custom timer instead of WDTO. + * NOTE: This method is less reliable as it can only catch hangups while + * interrupts are enabled. + */ #define USE_WATCHDOG - #if ENABLED(USE_WATCHDOG) - // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on. - // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset. - // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled. //#define WATCHDOG_RESET_MANUAL #endif @@ -1003,6 +1099,8 @@ #endif #endif + //#define BABYSTEP_DISPLAY_TOTAL // Display total babysteps since last G28 + //#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping #if ENABLED(BABYSTEP_ZPROBE_OFFSET) //#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets @@ -1030,13 +1128,14 @@ */ //#define LIN_ADVANCE #if ENABLED(LIN_ADVANCE) - #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed - //#define LA_DEBUG // If enabled, this will generate debug information output over USB. + //#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants + #define LIN_ADVANCE_K 0.22 // Unit: mm compression per 1mm/s extruder speed + //#define LA_DEBUG // If enabled, this will generate debug information output over USB. #endif // @section leveling -#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_UBL) +#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) // Override the mesh area if the automatic (max) area is too large //#define MESH_MIN_X MESH_INSET //#define MESH_MIN_Y MESH_INSET @@ -1070,7 +1169,8 @@ #define ARC_SUPPORT // Disable this feature to save ~3226 bytes #if ENABLED(ARC_SUPPORT) #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment - #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections + #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes #endif @@ -1112,7 +1212,8 @@ /** * Minimum stepper driver pulse width (in µs) * 0 : Smallest possible width the MCU can produce, compatible with TMC2xxx drivers - * 1 : Minimum for A4988, A5984, and LV8729 stepper drivers + * 0 : Minimum 500ns for LV8729, adjusted in stepper.h + * 1 : Minimum for A4988 and A5984 stepper drivers * 2 : Minimum for DRV8825 stepper drivers * 3 : Minimum for TB6600 stepper drivers * 30 : Minimum for TB6560 stepper drivers @@ -1127,8 +1228,8 @@ * 500000 : Maximum for A4988 stepper driver * 400000 : Maximum for TMC2xxx stepper drivers * 250000 : Maximum for DRV8825 stepper driver + * 200000 : Maximum for LV8729 stepper driver * 150000 : Maximum for TB6600 stepper driver - * 130000 : Maximum for LV8729 stepper driver * 15000 : Maximum for TB6560 stepper driver * * Override the default value based on the driver type set in Configuration.h. @@ -1320,6 +1421,7 @@ // Filament can be extruded repeatedly from the Filament Change menu // until extrusion is consistent, and to purge old filament. #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park. + //#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused. // Filament Unload does a Retract, Delay, and Purge first: #define FILAMENT_UNLOAD_RETRACT_LENGTH 13 // (mm) Unload initial retract length. @@ -1655,7 +1757,7 @@ */ //#define SENSORLESS_PROBING // TMC2130 only - #if ENABLED(SENSORLESS_HOMING) || ENABLED(SENSORLESS_PROBING) + #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) #define X_STALL_SENSITIVITY 8 #define Y_STALL_SENSITIVITY 8 //#define Z_STALL_SENSITIVITY 8 @@ -1670,8 +1772,7 @@ /** * You can set your own advanced settings by filling in predefined functions. * A list of available functions can be found on the library github page - * https://github.com/teemuatlut/TMC2130Stepper - * https://github.com/teemuatlut/TMC2208Stepper + * https://github.com/teemuatlut/TMCStepper * * Example: * #define TMC_ADV() { \ @@ -2168,7 +2269,7 @@ //#define I2CPE_ERR_THRESH_ABORT 100.0 // Threshold size for error (in mm) error on any given // axis after which the printer will abort. Comment out to - // disable abort behaviour. + // disable abort behavior. #define I2CPE_TIME_TRUSTED 10000 // After an encoder fault, there must be no further fault // for this amount of time (in ms) before the encoder @@ -2228,7 +2329,7 @@ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behaviour is limited to Z axis only. + // Default behavior is limited to Z axis only. #endif /**