Support for ezABL

I have an Ender 3 Pro with the 4.2.7 Main board. I recently switched from the Z Stop Switch to the ezABL sensor from Th3D Studio. I also have the BTT Smart Filament Sensor. I can get either the Filament Sensor, or the Bed Leveling to work but not both. As far as I can see, I have made all the required changes in the Marlin fimrware files, but it doesn’t work. if I enable the filament sensor, it does an unload as soon as it starts to print. I cannot see a what to continue the print without disabling the filament sensor.

I am hoping that someone from this forum can tell me what Lines of Code the Firmware Builder inserts when you select the ezABL bed level and the Btt Smart Filament Sensor. Is there a way to see the Configuration files that the Firmware Builder generates to compile the firmware from? If I can get this, then perhaps I can determine why my BTT Smart Filament sensor is not working.

I don’t have that hardware to test with - however, the Configuration files all start as:

Then the options are changed based on what you select in the builder.

If you want to debug, test with a normal Z-Stop and see if you see the same issues and try to narrow it down to a specific cause. Otherwise, you’ll only get vague guesses as to the problem.

I think that my Problem isn’t in the Configuration.H of the Configuration_adv.h. I think my issue is in the pins file located at \Firmware\Marlin\src\pins\stm32f1\pins_CREALITY_V4.h

I think my issue is that I have the Wrong Pin defined for the #define FIL_RUNOUT_PIN setting. Unfortunately, this file is not located on GITHub. Does the Firmware builder modify the pins file, or are you using the stock Marlin file? I have not been able to find a reliable source that will tell me what the pin definitions are on the 4.2.7 board.

Close - the pins for the v4.2.7 board are here:

That does include the pins_CREALITY_V4 file as well though.

In that file, its defined as:

That’s the Pin that I have defined in my Custom Marlin file. But that’s the default pin defined in Marlin. Does selecting the BTT Smart Filament Sensor in the Firmware Builder change this setting?

These are the lines that I have defined in the Configuration.H








#define FIL_RUNOUT_ENABLED_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_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.)


// 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.



  // 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.)


I also have modified the Configuration_Adv.h file, with the followign settings.



#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_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_PURGE_RETRACT 13 // (mm) Unload initial retract length.

#define FILAMENT_UNLOAD_PURGE_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 FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload

#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 // If needed, home before 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)


But with all these chages which should work, if I enable my Runout sensor, the machine does an immediate Unload after bed leveling and I have to disable the Runout sensor to continue the print. I can’t see any reason that the two devices will not work together.