From 401c463a08f2d44842d9a9504b64578e4a020a11 Mon Sep 17 00:00:00 2001 From: iGoX Date: Sun, 19 Jan 2025 17:06:28 +0100 Subject: [PATCH] Ender 3 - Enable filament runout sensor (#17) --- creality-ender3/Marlin-2.1.2.4/Marlin/Configuration.h | 11 +++++------ .../Marlin-2.1.2.4/Marlin/Configuration_adv.h | 6 +++--- .../src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h | 4 ++++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/creality-ender3/Marlin-2.1.2.4/Marlin/Configuration.h b/creality-ender3/Marlin-2.1.2.4/Marlin/Configuration.h index f7785ae..61eb0bd 100644 --- a/creality-ender3/Marlin-2.1.2.4/Marlin/Configuration.h +++ b/creality-ender3/Marlin-2.1.2.4/Marlin/Configuration.h @@ -1821,12 +1821,11 @@ * 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. */ -//#define FILAMENT_RUNOUT_SENSOR +#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) - #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500. + #define FIL_RUNOUTENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500. #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. - - #define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present. + #define FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present. #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. //#define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder. @@ -1873,7 +1872,7 @@ // 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 + #define FILAMENT_RUNOUT_DISTANCE_MM 8 #ifdef FILAMENT_RUNOUT_DISTANCE_MM // Enable this option to use an encoder disc that toggles the runout pin @@ -3357,7 +3356,7 @@ // Support for Adafruit NeoPixel LED driver //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) - #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW, NEO_RGBW, NEO_GRB, NEO_RBG, etc. + #define NEOPIXEL_TYPE NEO_GRB // NEO_GRBW, NEO_RGBW, NEO_GRB, NEO_RBG, etc. // See https://github.com/adafruit/Adafruit_NeoPixel/blob/master/Adafruit_NeoPixel.h //#define NEOPIXEL_PIN 4 // LED driving pin //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE diff --git a/creality-ender3/Marlin-2.1.2.4/Marlin/Configuration_adv.h b/creality-ender3/Marlin-2.1.2.4/Marlin/Configuration_adv.h index f3d0db5..be5ce02 100644 --- a/creality-ender3/Marlin-2.1.2.4/Marlin/Configuration_adv.h +++ b/creality-ender3/Marlin-2.1.2.4/Marlin/Configuration_adv.h @@ -2655,7 +2655,7 @@ #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_FEEDRATE 50 // (mm/s) Unload filament feedrate. This can be pretty fast. #define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate. #define FILAMENT_CHANGE_UNLOAD_LENGTH 400 // (mm) The length of filament for a complete unload. // For Bowden, the full length of the tube and nozzle. @@ -2664,9 +2664,9 @@ #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_FEEDRATE 60 // (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 350 // (mm) Load length of filament, from extruder gear to nozzle. + #define FILAMENT_CHANGE_FAST_LOAD_LENGTH 400 // (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. diff --git a/creality-ender3/Marlin-2.1.2.4/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h b/creality-ender3/Marlin-2.1.2.4/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h index b16cedb..043c26e 100644 --- a/creality-ender3/Marlin-2.1.2.4/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h +++ b/creality-ender3/Marlin-2.1.2.4/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h @@ -83,6 +83,10 @@ #define CONTROLLER_FAN_PIN FAN1_PIN #endif +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PC15 // E0-STOP Runout filament sensor +#endif + #if HAS_TMC_UART /** * TMC220x stepper drivers