Updated Marlin-2.0.x, now Y2 turns same direction for both +Y and -Y jogs

I had a mostly working build on my BTT SKR 1.3 that I had initially set up using a desktop PC and the Teaching Tech files and videos as guidance. I found starting from a fresh copy of Marlin-2.0.x (020006) worked much better than trying to use the TT files and had all the motors behaving correctly on the bench.

After doing final assembly on the machine, I found homing the Y axis was moving toward the wrong direction from my limit switches. The machine was installed far away from the desktop used for initial setup, so I got my hands on a laptop. I tried copying my working project over to an install of VS Code with PlatformIO on the laptop, but now all the library and references were in different paths. I decided to start a new Marlin-2.0.x (020007) project and simply migrate all the configuration updates from my working files to the new files.

This mostly worked except for one major issue: when I use the move menu (MKSTFT28) when I jog the Y Axis in the +ve direction, it moves correctly. When I jog in the -ve direction, the Y motor reverses as it should, but the Y2 motor turns in the same direction as it did for a +ve jog. This of course causes as twist as one endplate tries to go in one direction, and the other endplate goes the other way.

I reviewed my files to see if I had skipped anything, or if there were any settings that didn’t look right. I did find the setting to reverse the homing direction, but nothing else that suggested that Y2 might only turn in one direction for both + and - commands. There are several differences and updates between the 020006 and 020007 files, but most of it is the same, or close enough to understand the difference.

I’m sure it’s got to be something that I missed or overlooked, but am out of guesses. Rather than start over, I thought I’d ask if anybody has experienced something like this?

Thanks in advance for any help!


Check your wire continuity for the ‘DIR’ wire in the stepper that does not reverse, you can also check for the correct signal polarity if you have a scope or possibly even with a multimeter, but I would bet you have a dodgy connection on the stepper wire plug.

1 Like

I did a visual inspection of the wires and connection, and found nothing suspicious. The wire and connector are unmodified from the manufacturer. I’m confident in my wire dressing and connections. As I mentioned earlier, the previous software upload was working just fine and no hardware changes occurred between my software mods.

Also, I’m not sure what you mean about a DIR wire. 4-wire stepper motors don’t have a single wire to dictate direction. The two coils each use a pair of wires, A, A, B, and B. The steps alternate the polarity of each coil according to this pattern:

Step A B A\ B
1 + + - -
2 - + + -
3 - - + +
4 + - - +

Moving from Step 1 -> 2, and 2 -> 3, and so on produces Clockwise rotation, while reversing the step order, 3 -> 2 and 2 -> 1 produces a counter-clockwise motion.

The only way motion can occur in the same direction is if the controller is stepping through the same step progression for both +ve and -ve jog commands. This is why it is more likely a software issue.

I tried locating the same older version of Marlin which I found Marlin-2.0.6 to be the closest. I used a file compare tool to migrate all my updates and find any other differences. The new project complied and uploaded without error.

Unfortunately, the same problem is still there! I’m really not sure what to try next.


Yes…I’ve mislead you haven’t I… Each of the stepper drivers have two data lines, one telling the stepper how many pulses to move the motor (STEP) and the other tells the stepper the direction to orientate the pulses which determines the direction the motors spin (DIR). If there is a bad connection on the DIR pin of the stepper driver the motor will always spin in the same direction.

How have you arranged the Y2 motor? Are both Y axis motors driven off one stepper driver or is the Y2 on a separate driver? Have you tried moving back to your desktop PC to see if the fault goes away?

If the problem goes away when connected to your desktop computer that will prove the problem lies in your configuration_adv.h around line 507.

#define INVERT_Y2_VS_Y_DIR true // Set ‘true’ if Y motors should rotate in opposite directions

So, I took the clean sheet approach. I downloaded the latest Marlin-, started over fresh with the settings for everything, and now all the Y motion is working as expected.

Unfortunately, this won’t be helpful as to why it was behaving how it was since I did not find a smoking gun.

Thanks for the help and suggestions!