Skip to content

Drivers_MKS_TMC2209_2225_2208

makerbase edited this page Aug 12, 2020 · 5 revisions

MKS TMC2209 V2.0 support SENSORLESS_HOMING function

MKS TMC2208 and MKS TMC2225 are used in exactly the same way.The only difference between TMC2225 and TMC2208 is package.The package of TMC2225 is HTSSOP,and the package of TMC2208 is QFN, so TMC2225 have better heat dissipation performance.

How to buy

Dir/step mode setting

  • MKS TMC2208/TMC2225/TMC2209 MICROSTEP
            MKS TMC2208                      MKS TMC2225                     MKS TMC2209
    M0  | M1  | Microstep Setting    M0  | M1  | Microstep Setting    M0  | M1  | Microstep Setting
    GND | GND | 8 microsteps         GND | GND | 4 microsteps         GND | GND | 8 microsteps
    VCC | GND | 2 microsteps         VCC | GND | 8 microsteps         VCC | GND | 32 microsteps
    GND | VCC | 4 microsteps         GND | VCC | 16 microsteps        GND | VCC | 64 microsteps
    VCC | VCC | 16 microsteps        VCC | VCC | 32 microsteps        VCC | VCC | 16 microsteps
    GND = Jumpers open               VCC = Jumpeers connection
    
  • Driver current regulation
    • Suitable for MKS TMC2209, MKS TMC2225, MKS TMC2208
    • Verf measures the voltage of Gnd and potentiometer middle
    • Please DO NOT connect the motors when measuring the voltage, or it's easy to burn the drive
    • Please connect the power supply when measuring voltage as well, do not connect only the USB power
    • I=Vref Default I=1.25A

Uart mode set(take X axis as example)

Jumper setting

  • Use a jumper cap to short the SPI / UART side and the third pin. You can also check the silkscreen on the back of the motherboard about the Mode jumper settings
  TMC UART moder set
     O O O  M0
     O O O  M1
     O=O O  M2
     O O 
  MKS TMC2209, MKS TMC2225, MKS TMC2208 plug in to use UART mode directly, the driver module does not need flying wires

Marlin firmware setting

  • Nano V2.0 motherboard general setting

    • Set default_envs = mks_robin_nano35_v2 in platformio.ini file

    • Set #define SERIAL_PORT -1 in Configuration.h file

    • Set #define SERIAL_PORT_2 3 in Configuration.h file and it use to connect to host

    • Enable #define TFT_LVGL_UI_SPI in Configuration.h file for MKS TS35 display screen

    • Enable #define EEPROM_SETTINGS in Configuration.h file for save eeprom data

  • Enable uart mode

    • Configuration.h: #define X_DRIVER_TYPE TMC2208 (TMC2225 and TMC2208 setting method is the same. If you use TMC2209, you need set it is TMC2209)
  • Set current and microsteps

    • Configuration_adv.h: #define X_CURRENT 800 (Set current to 8001.414 ma,peak current=Value1.414)
    • Configuration_adv.h: #define X_MICROSTEPS 16 (Set MICROSTEPS, 16 recommended)
  • Enable low-speed Stealthchop,high-speed Spreadcycle

    • Configuration_adv.h: #define HYBRID_THRESHOLD (enable HYBRID_THRESHOLD)
    • Configuration_adv.h: #define X_HYBRID_THRESHOLD 100 (Set the speed of mode conversion)
  • Build and update firmware to motherboard

SENSORLESS_HOMING function(Suitable for MKS TMC2209)

  • Motherboard driver ic power select 3.3V and diag jumper connect to endstop signle
  • Configuration_adv.h file enable SENSORLESS_HOMING and set X_STALL_SENSITIVITY, Y_STALL_SENSITIVITY value
  #define SENSORLESS_HOMING // StallGuard capable drivers only

  #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
  // TMC2209: 0...255. TMC2130: -64...63
  #define X_STALL_SENSITIVITY  8     //TMC2209 is maybe 110-130
  #define X2_STALL_SENSITIVITY X_STALL_SENSITIVITY
  #define Y_STALL_SENSITIVITY  8     //TMC2209 is maybe 110-130
  //#define Z_STALL_SENSITIVITY  8
  //#define SPI_ENDSTOPS              // TMC2130 only
  //#define IMPROVE_HOMING_RELIABILITY
  #endif

Uart mode test

  • You can send to the board M122 test uart mode is ok or not(need enable #define TMC_DEBUG in configuration_adv.h file). If not ok,you will get nothing, if ok, you will get info like this:
   Testing X connection... OK
   Testing Y connection... OK
   Testing Z connection... OK
   Testing E connection... OK
  • MKS TS35 screen check it
    • Settings -> Config -> Motor settings -> TMC Current settings

Change parameter and save

  • By MKS TS35

    • Change and save parameter: Settings -> Config -> Motor settings -> TMC Current settings or TMC Step mode settings
  • By LCD12864

    • Change parameter: Configuration -> Advanced Settings -> TMC Drivers
    • Save parameter: Configuration -> Store Settings
    • Load parameter: Configuration -> Load Settings
  • By repetier(Pronterface..)

    • Send M906 setting current, for example, M906 X500 setting x-axis current is 500ma
    • Send M500 save parameter
    • Send M501 load parameter

Note

  • Board power support DC12-24V input,please make sure that the positive and negative poles of the power supply are correct before powering on. otherwise, the motherboard may be damaged easily.
  • Thank you for using MKS products. If you have any questions during use, please contact us in time and we will work with you to solve it.
  • For more product dynamic information and tutorial materials, you can always follow MKS's Facebook and GitHub and YouTube. Thank you!