screenshot of the Configuration_adv.h fie within Marlin Firmware being customised for the SKR E3 DIP

SKR E3 DIP Configuration_adv.h Marlin 2 Setup Part 3


Next step in setting up the SKR E3 DIP with Marlin 2 covers the Configuration_adv file. Continuing to look at relevant settings for the SKR E3 DIP and Creality Ender 3 or Ender 3 Pro.

SKR E3 DIP Marlin 2 Setup Guide
Software
Let’s Get Started
PLATFORMIO.INI
CONFIGURATION.H
CONFIGURATION_ADV.H
pins_BTT_SKR_E3_DIP.h

CONFIGURATION_ADV.H
BLTOUCH
STATUS MESSAGE SCROLLING
POWER LOSS RECOVERY
LONG FILE NAME SUPPORT
SDCARD_CONNECTION
BABYSTEPPING
BABYSTEP_ZPROBE_OFFSET
G29_RETRY_AND_RECOVER
BUFFERS
ADVANCED PAUSE FEATURE
@SECTION_TMC_SMART
MICROSTEPS
STEALTHCHOP
CHOPPER_TIMING
MONITOR_DRIVER_STATUS
HYBRID_THRESHOLD
TMC_DEBUG
PINS_DEBUGGING

pins_BTT_SKR_E3_DIP.h
Z_MIN_PROBE_PIN
COMPILING MARLIN 2

Configuration_adv.h

screenshot of marlin 2 3d printer firmware configuration_adv.h file using platformio via Microsoft Visual Code

While you may be feeling fatigued from dealing with the Configuration.h setup. However you will be pleased to know there isn’t much more to change for the SKR E3 DIP on a Creality Ender 3 or Ender 3 Pro. So make yourself a drink, recuperate and when ready delve into the Configuration_adv file and continue with the SKR E3 DIP Marlin 2 setup guide.

@section homing

Firstly for those using the BLTouch sensor types, there are a few additional settings we need to apply. Moreover probes need a little time to ensure they have received the signal before deploying. Because of this the default is 500 and can be left at this. However for genuine Antclabs I found 200 ms is perfect for the BLTouch V3 or later. While on a clone I needed 750 ms in order to function correctly. So search and alter the BLTOUCH_DELAY option accordingly. Furthermore the below example is for a genuine Antclabs BLTouch V3.

screenshot of Marlin 2 firmware setting the BLTouch servo delay. In this image the delay has been set to 200 which works great for BLTouch versions 3 or higher. #define BLTOUCH_DELAY 200

  #define BLTOUCH_DELAY 200

Now the Bltouch version 3 or later performs better with a 5V power source.

While on the SKR E3 DIP the SERVO connection is 5V. BUT it is important to remember for future uses, to alway check, check and check again that your board supports 5V on the pin you plugged the three cables into. Moreover this is usually marked up as the Servo connector. Once confirmed and you are using a BLTouch V3 or higher, then enable the 5V mode.

#define BLTOUCH_SET_5V_MODE

If however you are using a lower version of the BLTouch or you are not sure leave the 5V mode disabled.

//#define BLTOUCH_SET_5V_MODE

Ordinarily this next option is usually used for Delta style 3D printers. However the BLTouch versions 3 or higher seem to perform more reliably with the High Speed option enabled.

#define BLTOUCH_HS_MODE

@section lcd

STATUS MESSAGE SCROLLING

screenshot of status message scrolling within the Configuration_adv.h in Marlin

Without a doubt having long messages scrolling across the LCD rather then chopping the end off is far more useful for the user and a worthy option to enable within the Confguration_adv.h file for the SKR E3 DIP.

#define STATUS_MESSAGE_SCROLLING

POWER LOSS RECOVERY

screenshot of power loss recovery option within the Configuration_adv.h in Marlin

Additionally another useful option that requires no hardware is the Power Loss Recovery. Moreover this saves the current layer to the SD card, so in the event of a failure it can restart that line.

#define POWER_LOSS_RECOVERY 

LONG FILE NAME SUPPORT

screenshot enabling long filename support within the Configuration_adv.h in Marlin 2

For people like myself, having the ability to scroll long file names and have terminal programs be able to request these is a godsend.

#define LONG_FILENAME_HOST_SUPPORT
#define SCROLL_LONG_FILENAMES

SD CARD CONNECTION

screenshot of Marlin 2 firmware setting which SD card slot to use on the printer. Some like the Creality Ender 3 only have one so #define SDCARD_CONNECTION ONBOARD

While in the Configuration.h we enabled the SD card support for the LCD. However many setups have multiple SD card slots. So we need to tell Marlin which one we want to use for the everyday printing.

By default it will use the onboard SD card slot on the SKR E3 DIP. Which is perfect for the stock display on the Creality Ender 3 or Ender 3 Pro. But for those who are using an LCD with an SD card slot, it can be overridden here.

#define SDCARD_CONNECTION ONBOARD

BABYSTEPPING

screenshot of marlin 2 firmware baby stepping options. #define BABYSTEPPING

Another important step in editing the Configuration_adv for the SKR E3 DIP is a critical part of automatic bed levelling. Moreover being able to adjust the height of the nozzle from the bed, in small increments. Without a doubt this option helps to get that perfect first layer, and Marlin refers to this as Baby Stepping. So let’s find and enable the BABYSTEPPING option.

#define BABYSTEPPING

Undoubtedly there are a few good options to enable within the baby stepping configuration.

Firstly while not an option that many will find a use for. However I do, and it enables adjustments of the baby stepping without having to home first. So this option is a personal choice.

#define BABYSTEP_WITHOUT_HOMING

Without a doubt we want to be able to quickly get to the baby stepping option. So we want to enable DOUBLECLICK_FOR_Z_BABYSTEPPING. Once enabled, access is fire quickly pushing the LCD button in twice in quick succession. Now we can even use this option while the printer is printing. Importantly if you find the 1st layer height is off slightly, you can adjust accordingly.

 #define DOUBLECLICK_FOR_Z_BABYSTEPPING

Additionally we want to be able to adjust the baby stepping wether the 3D printer is moving or not. So we want to be able to always access the baby stepping mode.

#define BABYSTEP_ALWAYS_AVAILABLE

BABYSTEP_ZPROBE_OFFSET

screenshot of marlin 2 firmware baby stepping options. This image shows the M851 Z nozzle height combined with baby steeping. screenshot of marlin 2 firmware baby stepping options. #define BABYSTEP_ZPROBE_OFFSET

One of the most important and critical options for good automatic bed levelling is the ability to combine the baby step movements with the initial Z probe height (M851).

#define BABYSTEP_ZPROBE_OFFSET

Finally one nice option within the BABYSTEP_ZPROBE_OFFSET, is to enable a graphical overlay displayed on the LCD when baby stepping is in use. Moreover this make it clearer to understand the current position and which way to turn the rotary knob on the LCD.

#define BABYSTEP_ZPROBE_GFX_OVERLAY

G29_RETRY_AND_RECOVER

screenshot of Marlin 2 firmware showing the G29 retry and recover option enabled. This make the printer start again if the probe fails while auto bed levelling. Furthermore the amount of max retries can be altered 4 is a good number. #define G29_RETRY_AND_RECOVER #define G29_MAX_RETRIES 4

While we enabled the RESTORE_LEVELING_AFTER_G28 from within the Configuration file. However within the Configuration_adv we can fine tune the settings for the SKR E3 DIP, to help combat automatic bed levelling failures. Furthermore a good option to enable for bed levelling, is the retry and recovery option. Because if the automatic bed levelling fails, it will restart itself and not wait for user input. So search for and enable the G29_RETRY_AND_RECOVER option.

#define G29_RETRY_AND_RECOVER

Furthermore we can tell Marlin and in turn the printer, how many times we want to re-try probing the bed, before completely failing. Furthermore I have found even with the most unreliable of probes that it normally achieves the bed levelling after failing 3 time. So I tend to setup the amount of retries to 4.

 #define G29_MAX_RETRIES 4

@section motion

BUFFERS

screenshot of improving the movement buffer response within Marlin 2 firmware

Importantly giving the buffers a little more memory to handle the commands is another worthwhile option to enable for the SKR E3 DIP on a Creality Ender 3 or Ender 3 Pro. Furthermore by default they are set to 8 and 16. But I have found 32 and 64 makes for smoother sailing.

if BOTH(SDSUPPORT, DIRECT_STEPPING)
#define BLOCK_BUFFER_SIZE 32
elif ENABLED(SDSUPPORT)
#define BLOCK_BUFFER_SIZE 64
else
#define BLOCK_BUFFER_SIZE 64
endif

@section extras

ADVANCED PAUSE FEATURE

screenshot of customising advanced pause configuration within Marlin 2 3D printer firmware.

For those wishing to be able to pause the printer and change filament, this is the second option that needs enabling on the SKR E3 DIP. However there are plenty of sub-options that you may wish to customise and most are self explanatory. Nonetheless I have listed the settings below that I find useful.

#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
  #define PAUSE_PARK_RETRACT_FEEDRATE         60  
  #define PAUSE_PARK_RETRACT_LENGTH            2  

  #define FILAMENT_CHANGE_UNLOAD_FEEDRATE     10  
  #define FILAMENT_CHANGE_UNLOAD_ACCEL        25  
  #define FILAMENT_CHANGE_UNLOAD_LENGTH      430  

  #define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE   6  
  #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH     0  
  #define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE   6 
  #define FILAMENT_CHANGE_FAST_LOAD_ACCEL     25  
  #define FILAMENT_CHANGE_FAST_LOAD_LENGTH     0  

  //#define ADVANCED_PAUSE_CONTINUOUS_PURGE      
  #define ADVANCED_PAUSE_PURGE_FEEDRATE        3  
  #define ADVANCED_PAUSE_PURGE_LENGTH         50  

  #define ADVANCED_PAUSE_RESUME_PRIME          0  
  #define ADVANCED_PAUSE_FANS_PAUSE             
  
  #define FILAMENT_UNLOAD_PURGE_RETRACT       13  
  #define FILAMENT_UNLOAD_PURGE_DELAY       5000  
  #define FILAMENT_UNLOAD_PURGE_LENGTH         8  
  #define FILAMENT_UNLOAD_PURGE_FEEDRATE      25  

  #define PAUSE_PARK_NOZZLE_TIMEOUT           45  
  #define FILAMENT_CHANGE_ALERT_BEEPS         10  
  #define PAUSE_PARK_NO_STEPPER_TIMEOUT        
  
  #define PARK_HEAD_ON_PAUSE                  
  //#define HOME_BEFORE_FILAMENT_CHANGE           

  #define FILAMENT_LOAD_UNLOAD_GCODES           
  //#define FILAMENT_UNLOAD_ALL_EXTRUDERS         
#endif

@section tmc_smart

HAS_TRINAMIC_CONFIG

For those using TMC2208’s and TMC2209’s the HAS_TRINAMIC_CONFIG is where the drivers current and steps are setup. Additionally unless the best current for the stepper drivers is known, a value of 650 mA is a good place to start with the Creality stepper motors. Furthermore if no missed steps are experienced, then keep lowering the current to the stepper drivers until missed steps are introduced. Then increase the current by 5 or 10 mA to give a bit of leeway. Moreover it is better to run any stepper driver with a lower current to prevent heating issues effecting both the stepper driver and the stepper motor. However as previously mentioned the current still needs to be strong enough so that missed steps are not occurring. While ensuring the stepper drivers on the SKR E3 DIP board have active fan cooling.

MICROSTEPS

screenshot of Marlin 2 3d printer firmware showing the trinamic stepper motor steps and current options within Configuration_adv.h. In this example image the stepper motor current for the X axis is set to 650 mAh. #define X_CURRENT 650

While configuring the Configuration_adv and in turn the SKR E3 DIP, it is best to leave the micro steps at 16, at least until everything else is working correctly. Especially as the Trinamic drivers will interpolate up to 256 steps anyway, and with each manual increment of the micro steps, some stepper motor torque is lost.

Nonetheless in the below example for the X axis stepper driver, the current for the TMC2208 or TMC2209 driver has been set to 650 mA. Furthermore the micro steps is left at the default value of 16.

#if AXIS_IS_TMC(X)
#define X_CURRENT       650        // (mA) RMS current
#define X_CURRENT_HOME  X_CURRENT
#define X_MICROSTEPS     16    // 0..256    
#define X_RSENSE          0.11    
#define X_CHAIN_POS      -1 
#endif

Without a doubt it is important to remember to save your changes to the SKR E3 DIP’s Configuration_adv file.

Mac – Press the CMD (⌘) and the S key at the same time.
PC – Press the Ctrl and the S key at the same time.

#STEALTHCHOP

screenshot of Marlin 2 firmware showing the stealth chop option for trinamic enabled on X, Y, Z, and extruder. For example #define STEALTHCHOP_XY #define STEALTHCHOP_Z #define STEALTHCHOP_E

While enabled by default, however in case of future changes I thought it prudent to mention StealthChop™. Without a doubt StealthChop™is an important option to have enabled for TMC drivers. Moreover it allows the TMC stepper drivers to transition from silent mode (StealthChop™) to a less quieter but more powerful mode (SpreadCycle™), ideal for printing at faster speeds. Furthermore when the print slows down, the stepper drivers will change back into the quieter StealthChop™ mode automatically.

#define STEALTHCHOP_XY
#define STEALTHCHOP_Z 
#define STEALTHCHOP_E

CHOPPER_TIMING

screenshot of Marlin 2 firmware and the chopper timing voltage used to control trinamic stepper drivers.In the example image the voltage is set to 24V for use with a Creality Ender 3 Pro. #define CHOPPER_TIMING CHOPPER_DEFAULT_24V

Because of the default Chopper timing used for SpreadCycle™ is set to 12V, this will need changing to 24V. Which is perfect for the Creality Ender 3 Pro printers that are using 24V power supplies.

#define CHOPPER_TIMING CHOPPER_DEFAULT_24V

MONITOR_DRIVER_STATUS

screenshoot of Marlin 2 firmware enabling the monitoring of stepper drivers. This is enabled by #define MONITOR_DRIVER_STATUS

Without a doubt keeping an eye on the stepper drivers for issue such as over heating, and status reports is a good thing. Furthermore by enabling this option, if the TMC driver has an over heating issue, it will drop the current by 50 mA as default, to try and overcome the issue. So let’s enable the MONITOR_DRIVER_STATUS as shown in the example below.

 #define MONITOR_DRIVER_STATUS
 #if ENABLED(MONITOR_DRIVER_STATUS)
#define CURRENT_STEP_DOWN     50  // [mA]
#define REPORT_CURRENT_CHANGE
#define STOP_ON_ERROR
#endif

HYBRID_THRESHOLD

screenshot of Marlin 2 firmware showing the Hybrid threshold used with stealth chip trinamic drivers. This is at what speed the stepper drivers change from being quiet to slightly more noisy but with more torque. For example #define X_HYBRID_THRESHOLD 100 this will become more noisy when printing at higher then 100 mm/s

So what is the Hybrid Threshold ? While enabling the StealthChop™ allows the TMC driver to alternate between the two modes, the Hybrid Threshold determines at what speed the drivers switch between the modes. For example a threshold of 100 mm/s will cause the TMC drivers to go into the more powerful SpreadCycle™ mode, when the movement reaches 100 mm/s. Furthermore when the speed lowers to below 100 mm/s it will drop back to the silent StealthChop™ mode.

While the threshold for the X, and Y axis is good. However I find the Z is too low and I prefer a setting of 15 mm/s. Furthermore for the Extruder I prefer a threshold of 50 mm/s over the default 30 mm/s. Nonetheless start with the defaults, and if you find them a little too noisy, then adjust to suit your needs.

#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      15
  #define Z2_HYBRID_THRESHOLD      3
  #define Z3_HYBRID_THRESHOLD      3
  #define Z4_HYBRID_THRESHOLD      3
  #define E0_HYBRID_THRESHOLD     50
  #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
  #define E6_HYBRID_THRESHOLD     30
  #define E7_HYBRID_THRESHOLD     30

TMC_DEBUG

screenshot on the TMC debugging option with Marlin 2 firmware. Handy for finding troublesome stepper drivers when expiring TMC connection errors. #define TMC_DEBUG

While disabled by default, the TMC_DEBUG option allows the debugging command to be sent for use with the drivers. Furthermore it is a prerequisite of the MONITOR_DRIVER_STATUS option. Because of this, it needs to be enabled for the SKR E3 DIP within the Configuration_adv file if TMC stepper drivers are used.

#define TMC_DEBUG

PINS_DEBUGGING

screenshot on the pins debugging option with Marlin 2 firmware. Handy for finding troublesome end stop switches or probes. #define PINS_DEBUGGING

While the stepper drivers can be debugged, so too can switch and probe pins. Moreover you can test wether or not a switch is working correctly by sending the M43 command. This is particularly handy for troublesome switches and probes. Furthermore this gives a clear indication if the pins need inverting within the Configuration.h file.

#define PINS_DEBUGGING

SKR E3 DIP Configuration_adv File Completed

Congratulations that is the basic setup done in the Configuration_adv.h for using the SKR E3 DIP for the Creality Ender 3 or Ender 3 Pro. Furthermore there is only one tiny step left of the SKR E3 DIP Marlin 2 setup guide for those using a BLTouch or Probe.

Without a doubt it is important that you remember to save your changes.

Mac – Press the CMD (⌘) and the S key at the same time.
PC – Press the Ctrl and the S key at the same time.

pins_BTT_SKR_E3_DIP

While not necessary for everyone, those using a probe or BLTouch need to change a line to make the probe work with the Z_Min switch on the SKR E3 DIP. Moreover the pins_BTT_SKR_E3_DIP.h file is found in the directory listed below.

Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h

Z_MIN_PROBE_PIN

screenshot of Marlin 2 3d printer firmware disabling the Z_MIN_PROBE_PIN option within the pins_BTT_SKR_E3_DIP.h file. //#define Z_MIN_PROBE_PIN PC14

As we need to use the Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN option on the SKR E3 DIP, we need to disable the reference to the Z_MIN_PROBE_PIN. Furthermore search for the Z_MIN_PROBE_PIN option and disable the options as shown below.

//#define Z_MIN_PROBE_PIN PC14 // PROBE

Congratulations, that is the configuration of the Marlin 2 firmware for the SKR E3 DIP complete. Furthermore all that is left todo is to compile the Marlin 2 firmware so it can be transferred to the 3D printer with the SKR E3 DIP mainboard.

Lets compile the Marlin 2 firmware

screenshot of the platformio icon within Microsoft Visual Code for editing Marlin 2 firmware

After saving the changes to the Configuration.h, Configuration_adv.h, and the pins_BTT_SKR_E3_DIP.h files. From within MVS click on the larger Ants head icon on the far left hand side.

screenshot of the clean and build options for compiling Marlin 2 firmware in platformio within Microsoft Visual Code

A long list of option will now be displayed. Firstly click on the Clean option, once the cleaning process is completed click on Build. While this may take a while to complete, all being well there should be no red errors and failure messages. However if there are go back through everything checking for any typos or errors.

screenshot of the explorer file icon in platformio, used to find the Marlin 2 firmware bin

Nonetheless all being well, click on the Explorer icon within MVS on the far left, and at the top.

screenshots of the folder order for revealing the firmware.bin file for Marlin 2 firmware in Platformio for the SKR E3 DIP

From the new folder layout click on the .pio folder. Next click on the build folder, followed by clicking on the STM32F103RC_btt_512K_USB folder. After clicking on the STM32F103RC_btt_512K_USB folder, a long list of files and folders will be displayed. However towards the very bottom of that list is the firmware.bin file that needs to be copied to a SD card for updating the Marlin 2 configuration of the SKR E3 DIP.

found the marlin 2 firmware.bin file within platformio when compiling for the SKR E3 DIP

But first we need to find its location on the computer. By far the simplest method is to select the firmware.bin file with a single left click. Additionally right click on the firmware.bin and select the “Reveal in Finder” or “”Find in Explorer” options.

Importantly this will take you directly to the firmware.bin file. All that is left todo is to right click on the firmware.bin and select copy.

Now plug the SD card that will be used for the 3D printer into the computer. Additionally go into that SD card folder on the computer and right click on an empty space between any icons and select paste or paste item. Once the transfer is completed, eject the SD card.

Finally we are getting to the final steps. Moreover with the printer turned off for at least 10 seconds, insert the SD card and turn back on. While the initial rebooting of the 3D printer will take a little longer than normal. However it is not fully updated yet. Importantly from the LCD menu, goto Configuration, then ADVANCED Settings, scroll to the very bottom and click on Initialise EEPROM.

Truly well done, that is the Marlin 2 firmware fully configured and updated for the Creality Ender 3 or Ender 3 Pro 3D printer with the SKR E3 DIP mainboard. Once again I hope the SKR E3 DIP Marlin 2 Setup Guide was useful, and wish you all the very best.

If you found this guide useful, please consider a donation to help keep the Make ‘N’ Print website running. For further information please have a look at our support us page

Thank You


© 2019-2020 Copyright - All Rights Reserved.