MKS Gen L V2.1 and TMC2209 - stepper not moving

Hi All,

This is not strictly about MPCNC itself, but for another project I’m playing with. However, I’m struggling to figure out where to ask this question, so maybe someone here might have some ideas!

The basic problem is that I cannot seem to move the stepper.

I have an MKS Gen L V2.1 board, and TMC2209 drivers. For the moment I have connected only the X axis stepper, but I have drivers in all 4 slots. Everything is set to use UART mode.

I am connecting via Octoprint (the version on V1PI), and have compiled Marlin using Visual Studio with appropriate settings that I can find.

I can connect to the board fine: initially I am able to move the stepper motor by hand: however, once I send a movement to the X axis, the stepper is activated so I can’t move it, but does not move itself. I have tested the stepper on my SKR board so I know it’s working.

if anyone can point me in the right direction for troubleshooting, it would be much appreciated! The output from the TMC debug command M122 is attached below.

Thanks,

Brutha,

Blockquote Send: M122
Recv: X Y Z E
Recv: Address 0 0 0 0
Recv: Enabled true false true false
Recv: Set current 800 800 800 800
Recv: RMS current 795 795 795 795
Recv: MAX current 1121 1121 1121 1121
Recv: Run current 25/31 25/31 25/31 25/31
Recv: Hold current 12/31 12/31 12/31 12/31
Recv: CS actual 12/31 12/31 12/31 12/31
Recv: PWM scale
Recv: vsense 1=.18 1=.18 1=.18 1=.18
Recv: stealthChop true true true true
Recv: msteps 16 16 16 16
Recv: interp true true true true
Recv: tstep max max max max
Recv: PWM thresh. 98 98 658 52
Recv: [mm/s] 100 100 3 30
Recv: OT prewarn false false false false
Recv: pwm scale sum 14 14 255 14
Recv: pwm scale auto 0 0 152 0
Recv: pwm offset auto 36 36 255 36
Recv: pwm grad auto 14 14 14 14
Recv: off time 3 3 3 3
Recv: blank time 24 24 24 24
Recv: hysteresis
Recv: -end -1 -1 -1 -1
Recv: -start 1 1 1 1
Recv: Stallguard thrs 0 0 0 0
Recv: uStep count 1016 88 984 1016
Recv: DRVSTATUS X Y Z E
Recv: sg_result 14 0 0 0
Recv: stst
Recv: olb
Recv: ola *
Recv: s2gb
Recv: s2ga
Recv: otpw
Recv: ot
Recv: 157C
Recv: 150C
Recv: 143C
Recv: 120C
Recv: s2vsa
Recv: s2vsb
Recv: Driver registers:
Recv: X 0xC0:0C:00:00
Recv: Y 0xC0:0C:00:00
Recv: Z 0xC0:0C:00:40
Recv: E 0xC0:0C:00:00
Recv:
Recv:
Recv: Testing X connection… OK
Recv: Testing Y connection… OK
Recv: Testing Z connection… OK
Recv: Testing E connection… OK

It sounds like an issue with the pin mapping. Or maybe an issue with the driver. If it has the enable pin correct, but not the step, then that would look like this issue.

Do you have a working config for that board you can compare? Especially the board type and the corresponding pins file?

1 Like

Thanks Jeff! That led me down some interesting routes and I learnt a fair bit about the board and Marlin in the process…

I have now figured out that the pin mapping should be ok; I realised that there was an extra jumper I had installed (I think the instruction for that must have been for the V2.0 board not the V2.1!!!).

Once removed, I now get the motor making a noise when I try and move the axis, and vibrating back and forth a bit.

My guess is my wiring from the stepper pins is wrong / broken (had something similar happen with one wire on MPCNC). I had to change the wiring after testing the stepper on the SKR Pro board (it looks like a different connection sequence).

Hopefully can fix the wiring and then things will move properly…

1 Like

OK, found the final issue… The motor output pins on the TMC2209 drivers I am using do not match the output pins on the MKS board layout drawings - and I had wired according to the board… The drivers are not the same brand as the board, although the drivers did claim to be compatible with the board.

Once I rewired according to the drivers instead, it worked fine - something to check in case anyone runs into a similar issue!

1 Like

So they werent AABB? I think there is one printer manuf. out there that does it ABAB.

As long as it’s not ABBA, you should be fine.:wink:

1 Like

Well, perhaps it is me reading the sheets wrong!

  • The stepper sheet has A-A\-B-B\

  • The board information shows 1B-1A-2A-2B

  • The driver information shows A2-A1-B1-B2

Now, I initially wired the stepper as AABB - but then after looking at the board sheet rewired to BAAB. But my problem was not that at all (it was the additional jumper I had added thinking it was required).

Once I removed the additional jumper, I then realised that the board stepper pinout is not that relevant and rewired as AABB - and now it works ok!

BUT - thinking about it, maybe I’m supposed to look at the first letter OR number, not just the letters… in which case all the sheets above are in agreement anyway!

Huh. Maybe. :man_shrugging: