SKR v.13 TMC5160 No Stepper Power

I began by following what was done on the Teaching Tech series on the Lowrider 2, but when it came to compiling and uploading the firmware, it seems the provided files are too far behind the current versions of the libraries used. I instead went with the latest Marlin 2.0 files from github, and updated the files with the same changes found in the Teaching Tech files. I was able to compile a successful build and uploaded the .bin to the board. I had also purchased an MKS TFT28 and was able to upload the Teaching Tech files to it without issue. It powers up and appears to be ready.

I next performed the modifications needed to the TMC5160 drivers (removed the CLK pin and soldered a jumper from CLK to the GND pin as shown in numerous forums across the community), and after installing them and powering the board, an M122 command shows that all drivers have an address and their status show as OK.

Unfortunately, when I connected the board to my newly assembled Lowrider’s steppers and powered up the SKR v1.3 and TFT28, the move commands on the TFT28 produced no movement. In addition, the motors weren’t powered at all to even hold position. Another check with M122 showed the drivers were still OK, but I noticed at the beginning of M122’s output all 5 channels were not enabled. M17 would enable them, but I was expecting this to be a self-contained system that wouldn’t require an external PC. I haven’t checked yet whether this fixes the issue as my PC is not near the Lowrider, but it makes sense that disabled motor channels wouldn’t have power can’t react to move commands.

Did I maybe miss something in the firmware configuration? What should be expected after powering up the machine? Is there some place where initialization Gcode is read from? The TFT28 doesn’t appear to have any menus or commands that enable the motors. I’ve read through a bunch of forum posts, the directions on this site, and several other videos and tutorials, but they all seem to describe “After assembling the machine and uploading the firmware, move commands make the different axes move around” without mentioning enabling the channels or other initialization steps.

What am I missing?

I have never seen a move command not enable the motors. I would assume the motors are enabled. You can carefully measure the voltage on the en pin of the drivers to tell. Just don’t toast your driver by accidentally shorting something.

If you can temporarily get a motor to your PC (along with 12V) or get your PC to the low rider, M122 has some diagnostics of the motor connection. Specifically, it has flags for open loop (ola, olb) and short to ground (s2ga, s2gb). Even a raspberry pi can do this job (running v1pi, or octoprint are the easiest).

1 Like

My SKR Pro with 5160’s came pre-configured hardware wise, so I can’t comment on that. Software wise here’s what I changed from Ryan’s V1CNC_SKR_Pro_Dual marlin branch to get the 5160’s working.

Not sure how much that helps you since you’ve got a completely different board and can’t base your’s off of one of Ryan’s branches/forks but I figured I’d throw this out there.

For those who haven’t seen a ‘diff’ before, the “+” lines are what replaced the “-” lines

index b58ba3625..843deba31 100644
--- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -684,15 +684,15 @@
  *          TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
  * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
  */
-#define X_DRIVER_TYPE  TMC2209
-#define Y_DRIVER_TYPE  TMC2209
-#define Z_DRIVER_TYPE  TMC2209
-#define X2_DRIVER_TYPE TMC2209
-#define Y2_DRIVER_TYPE TMC2209
+#define X_DRIVER_TYPE  TMC5160
+#define Y_DRIVER_TYPE  TMC5160
+#define Z_DRIVER_TYPE  TMC5160
+#define X2_DRIVER_TYPE TMC5160
+#define Y2_DRIVER_TYPE TMC5160
 //#define Z2_DRIVER_TYPE A4988
 //#define Z3_DRIVER_TYPE A4988
 //#define Z4_DRIVER_TYPE A4988
-#define E0_DRIVER_TYPE TMC2209
+#define E0_DRIVER_TYPE TMC5160
 //#define E1_DRIVER_TYPE A4988
 //#define E2_DRIVER_TYPE A4988
 //#define E3_DRIVER_TYPE A4988
@@ -1080,16 +1080,16 @@
 // @section machine

 // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
-#define INVERT_X_DIR false
-#define INVERT_Y_DIR true
-#define INVERT_Z_DIR false
+#define INVERT_X_DIR true
+#define INVERT_Y_DIR false
+#define INVERT_Z_DIR true

 // @section extruder

 // For direct drive extruder v9 set to true, for geared extruder set to false.
-#define INVERT_E0_DIR false
-#define INVERT_E1_DIR false
-#define INVERT_E2_DIR false
+#define INVERT_E0_DIR true
+#define INVERT_E1_DIR true
+#define INVERT_E2_DIR true
 #define INVERT_E3_DIR false
 #define INVERT_E4_DIR false
 #define INVERT_E5_DIR false
@@ -1116,8 +1116,8 @@
 // @section machine

 // The size of the print bed
-#define X_BED_SIZE 300
-#define Y_BED_SIZE 300
+#define X_BED_SIZE 406
+#define Y_BED_SIZE 482

 // Travel limits (mm) after homing, corresponding to endstop positions.
 #define X_MIN_POS 0
diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index ef81e96ea..33d262868 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -2210,7 +2210,7 @@
     #define X_CURRENT       900        // (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_RSENSE          0.075
     #define X_CHAIN_POS      -1    // <=0 : Not chained. 1 : MCU MOSI connected. 2 : Next in chain, ...
   #endif

@@ -2218,7 +2218,7 @@
     #define X2_CURRENT      900
     #define X2_CURRENT_HOME X2_CURRENT
     #define X2_MICROSTEPS    16
-    #define X2_RSENSE         0.11
+    #define X2_RSENSE         0.075
     #define X2_CHAIN_POS     -1
   #endif

@@ -2226,7 +2226,7 @@
     #define Y_CURRENT       900
     #define Y_CURRENT_HOME  Y_CURRENT
     #define Y_MICROSTEPS     16
-    #define Y_RSENSE          0.11
+    #define Y_RSENSE          0.075
     #define Y_CHAIN_POS      -1
   #endif

@@ -2234,7 +2234,7 @@
     #define Y2_CURRENT      900
     #define Y2_CURRENT_HOME Y2_CURRENT
     #define Y2_MICROSTEPS    16
-    #define Y2_RSENSE         0.11
+    #define Y2_RSENSE         0.075
     #define Y2_CHAIN_POS     -1
   #endif

@@ -2242,7 +2242,7 @@
     #define Z_CURRENT       900
     #define Z_CURRENT_HOME  Z_CURRENT
     #define Z_MICROSTEPS     16
-    #define Z_RSENSE          0.11
+    #define Z_RSENSE          0.075
     #define Z_CHAIN_POS      -1
   #endif

@@ -2250,7 +2250,7 @@
     #define Z2_CURRENT      800
     #define Z2_CURRENT_HOME Z2_CURRENT
     #define Z2_MICROSTEPS    16
-    #define Z2_RSENSE         0.11
+    #define Z2_RSENSE         0.075
     #define Z2_CHAIN_POS     -1
   #endif

@@ -2258,7 +2258,7 @@
     #define Z3_CURRENT      800
     #define Z3_CURRENT_HOME Z3_CURRENT
     #define Z3_MICROSTEPS    16
-    #define Z3_RSENSE         0.11
+    #define Z3_RSENSE         0.075
     #define Z3_CHAIN_POS     -1
   #endif

@@ -2266,63 +2266,63 @@
     #define Z4_CURRENT      800
     #define Z4_CURRENT_HOME Z4_CURRENT
     #define Z4_MICROSTEPS    16
-    #define Z4_RSENSE         0.11
+    #define Z4_RSENSE         0.075
     #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_RSENSE         0.075
     #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_RSENSE         0.075
     #define E1_CHAIN_POS     -1
   #endif

   #if AXIS_IS_TMC(E2)
     #define E2_CURRENT      800
     #define E2_MICROSTEPS    16
-    #define E2_RSENSE         0.11
+    #define E2_RSENSE         0.075
     #define E2_CHAIN_POS     -1
   #endif

   #if AXIS_IS_TMC(E3)
     #define E3_CURRENT      800
     #define E3_MICROSTEPS    16
-    #define E3_RSENSE         0.11
+    #define E3_RSENSE         0.075
     #define E3_CHAIN_POS     -1
   #endif

   #if AXIS_IS_TMC(E4)
     #define E4_CURRENT      800
     #define E4_MICROSTEPS    16
-    #define E4_RSENSE         0.11
+    #define E4_RSENSE         0.075
     #define E4_CHAIN_POS     -1
   #endif

   #if AXIS_IS_TMC(E5)
     #define E5_CURRENT      800
     #define E5_MICROSTEPS    16
-    #define E5_RSENSE         0.11
+    #define E5_RSENSE         0.075
     #define E5_CHAIN_POS     -1
   #endif

   #if AXIS_IS_TMC(E6)
     #define E6_CURRENT      800
     #define E6_MICROSTEPS    16
-    #define E6_RSENSE         0.11
+    #define E6_RSENSE         0.075
     #define E6_CHAIN_POS     -1
   #endif

   #if AXIS_IS_TMC(E7)
     #define E7_CURRENT      800
     #define E7_MICROSTEPS    16
-    #define E7_RSENSE         0.11
+    #define E7_RSENSE         0.075
     #define E7_CHAIN_POS     -1
   #endif

@@ -2351,7 +2351,7 @@
    * The default SW SPI pins are defined the respective pins files,
    * but you can override or define them here.
    */
-  //#define TMC_USE_SW_SPI
+  #define TMC_USE_SW_SPI
   //#define TMC_SW_MOSI       -1
   //#define TMC_SW_MISO       -1
   //#define TMC_SW_SCK        -1```
2 Likes

Those inverts can all be done by swapping cables 180 on their ports. The rsense seems like a ciritical piece, as does the sw spi. Thanks for sharing.

That diff looks great in this forum.

Thanks for submitting your configuration settings. I checked versus mine and they all match except for the bed size and the current settings; I’d set the current to 1200 due to the stepper motors I’ve got.

It’s interesting that the move command should enable the motors. Maybe the TFT28 isn’t actually communicating with the SKR v1.3? It is receiving power across its cable. Are there any checks or tests to confirm it is communicating?

I tried resurrecting an old laptop to be able to run pronterface, but WinXP is too old to recognize the Marlin USB -> Com Port and the only potential driver I could find didn’t help. I may try to wipe it and put some sort of Linux installation and try again, but it will take some time. I was hoping I wouldn’t have to disassemble the Lowrider to get a motor out, but that might be my next attempt.

If it doesn’t move, that is a good indication.

You need to set the serial port 2 to 1, IIRC. i don’t have the mks tft I have a btt tft. But it has big letters across the top that say “not connected”. There is also a terminal where you can send commands and read thw response. Like M119.

Thanks Jeff, I looked closer at the TFT28, and while it doesn’t have any feedback messages, and it also doesn’t have a menu option to input commands, I did mess around with the connection settings.

Even though both the SKR v1.3 serial ports were set correctly, and the baud rates matched at 250000, there was apparently no connection. When I changed them both to 115000, the motors had power and I was able to move!

So, problem solved and thanks for everybody’s help!

2 Likes

Hello, will you have your version of Marlin modified?; If so, could you provide it to me? in the same way I have a skr v1.3 with TMC5160