Today i want to give a short tutorial on the steps necessary to make an SKR 1.4 Turbo Mainboard work with TMC 2209 Stepper Drivers.

Requirements:
Bigtreetech SKR 1.4 Turbo Mainboard
TMC 2209 Steppers ( i used eryone steppers, use the Code MAD3D for a 10% Discount)
A PC with visual studio and platformio to configure Marlin

The SKR 1.4 Turbo is a really nice 32bit board. It replaces a MKS Gen L on my AM8 Printer.

The Eryone Steppers come with UART Mode enabled. So no extra soldering is required.
They also have one less pin than some other TMC2209 Steppers, so no need to clip or bend anything. I chose those steppers because they are cheap and i have had good experiences with other Eryone products so far. As most stepper drivers the eryone tmc2209 come color coded. So there can’t be any mistake when it comes to placing them on the board.

Before we do that we need to change the jumper configuration on the board to enable UART Mode.


Remove all the jumpers between the stepper connections and place only the one indicated.

Once the jumpers are set you can place the stepper drivers. Make sure that the color coding matches the one on the board.
The endresult should look somewhat like this:

Test setup 😉 needed to tidy up the wiring afterwards

In case you don’t want to wire everything up just yet you can also just change the voltage jumper on the board so it can be powered via usb. This function comes in handy when you just want to flash the firmware but don’t have a 12V or 24V power supply at hand.
Change the following jumper but remember to change it back once you are done!

To make the board actually usable it needs a firmware. I use marlin as it is the de facto standard for almost all the printers out there and very well maintained.
Marlin can be found here.
I downloaded the latest Marlin bugfix version which is 2.0.6 at the moment of writing this article.
I am only going to detail the steps necessary to make the TMC2209 work without sensorless homing, i won’t do a full tutorial on each option that might be required to make your specific machine work. I am in no way liable for any damages to you, your property or anything else that might result from following the steps outlined in this article! That being said :):

Start visual studio code, open the marlin folder and open platformio.ini.
Make sure the default_envs is set to LPC1769

[platformio]
src_dir      = Marlin
boards_dir   = buildroot/share/PlatformIO/boards
default_envs = LPC1769
include_dir  = Marlin

Open configuration.h and make sure to set the serial ports ( i needed two because i am using a tft24 display), baudrate and the motherboard.

#define SERIAL_PORT 0

/**
 * Select a secondary serial port on the board to use for communication with the host.
 * :[-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

// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
  #define MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO
#endif

The Motherboard Name might change in the future. If you get an error during compilation stating that the name might be wrong take a look at src/pins/lpc1769 and check what the BTT SKR 1.4 file is called.

Next we need to tell the config what kind of drivers we are using.
Set them to TMC2209

#define X_DRIVER_TYPE  TMC2209
#define Y_DRIVER_TYPE  TMC2209
#define Z_DRIVER_TYPE  TMC2209
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE TMC2209
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2209
#define E1_DRIVER_TYPE TMC2209

In configuration_adv.h activate TMC debug

  #define TMC_DEBUG

Make sure to use stealthchop as it will make the printer quieter.

  #define STEALTHCHOP_XY
  #define STEALTHCHOP_Z
  #define STEALTHCHOP_E

Change the following line depending on your voltage. If you use 24V write 24V!

  #define CHOPPER_TIMING CHOPPER_DEFAULT_12V

The thresholds on when to use stealthchop can be defined here:

  /**
   * TMC2130, TMC2160, TMC2208, TMC2209, 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 Z4_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
  #define E6_HYBRID_THRESHOLD     30
  #define E7_HYBRID_THRESHOLD     30

I left them all at default values.

At last we need to adjust the voltage used by the stepper drivers.
With UART enabled this can be done via software.
So find #if HAS_TRINAMIC_CONFIG and set the voltage corresponding to your stepper motors.

  #if AXIS_IS_TMC(X)
    #define X_CURRENT       800        // (mA) RMS current. Multiply by 1.414 for peak current.
    #define X_CURRENT_HOME  X_CURRENT  // (mA) RMS current for sensorless homing
    #define X_MICROSTEPS     16    // 0..256
    #define X_RSENSE          0.11
    #define X_CHAIN_POS      -1    // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
  #endif

Do it for x, y, z, z2 and all the other stepper drivers you are using!
The important line is #define X_CURRENT. With that you set the current for your drivers. On my machine that is 0.8A, meaning 800mA.
For me it looked like this:

  #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_CURRENT_HOME  X_CURRENT  // (mA) RMS current for sensorless homing
    #define X_MICROSTEPS     16    // 0..256
    #define X_RSENSE          0.11
    #define X_CHAIN_POS      -1    // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
  #endif

  #if AXIS_IS_TMC(X2)
    #define X2_CURRENT      800
    #define X2_CURRENT_HOME X2_CURRENT
    #define X2_MICROSTEPS    16
    #define X2_RSENSE         0.11
    #define X2_CHAIN_POS     -1
  #endif

  #if AXIS_IS_TMC(Y)
    #define Y_CURRENT       800
    #define Y_CURRENT_HOME  Y_CURRENT
    #define Y_MICROSTEPS     16
    #define Y_RSENSE          0.11
    #define Y_CHAIN_POS      -1
  #endif

  #if AXIS_IS_TMC(Y2)
    #define Y2_CURRENT      800
    #define Y2_CURRENT_HOME Y2_CURRENT
    #define Y2_MICROSTEPS    16
    #define Y2_RSENSE         0.11
    #define Y2_CHAIN_POS     -1
  #endif

  #if AXIS_IS_TMC(Z)
    #define Z_CURRENT       800
    #define Z_CURRENT_HOME  Z_CURRENT
    #define Z_MICROSTEPS     16
    #define Z_RSENSE          0.11
    #define Z_CHAIN_POS      -1
  #endif

  #if AXIS_IS_TMC(Z2)
    #define Z2_CURRENT      800
    #define Z2_CURRENT_HOME Z2_CURRENT
    #define Z2_MICROSTEPS    16
    #define Z2_RSENSE         0.11
    #define Z2_CHAIN_POS     -1
  #endif

  #if AXIS_IS_TMC(Z3)
    #define Z3_CURRENT      800
    #define Z3_CURRENT_HOME Z3_CURRENT
    #define Z3_MICROSTEPS    16
    #define Z3_RSENSE         0.11
    #define Z3_CHAIN_POS     -1
  #endif

  #if AXIS_IS_TMC(Z4)
    #define Z4_CURRENT      800
    #define Z4_CURRENT_HOME Z4_CURRENT
    #define Z4_MICROSTEPS    16
    #define Z4_RSENSE         0.11
    #define Z4_CHAIN_POS     -1
  #endif

  #if AXIS_IS_TMC(E0)
    #define E0_CURRENT      800
    #define E0_MICROSTEPS    16
    #define E0_RSENSE         0.11
    #define E0_CHAIN_POS     -1
  #endif

  #if AXIS_IS_TMC(E1)
    #define E1_CURRENT      800
    #define E1_MICROSTEPS    16
    #define E1_RSENSE         0.11
    #define E1_CHAIN_POS     -1
  #endif

The current can also be set via the M906 command at a later point. Example:

M906 X700

Sets the current of the x driver to 700mA. Save that setting with a M500 😉

Once everything is done you should be able to upload marlin to your board.
If successful run M122 as a command from pronterface or octoprint. It should give you the status of your drivers. If it reads ERROR ALL Low there is a communication problem with the stepper drivers and UART is not working.

Well i hope you enjoyed this short tutorial. Let me know what you think. 🙂

I won’t upload my whole Marlin config because i am running a dual extrusion setup. Most of you guys would not be able to use that 😉
Besides, marlin is very well documented and every setting is commented. So one can easily go through the config and understand what each setting does.

Categories: 3D PrintingFDM

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *