X/Y axes inverted with TMC5160

Basic Information:

Printer Model: Voron 2.4
MCU / Printerboard: MANTA M(P V2.0
klippy.log (138.0 KB)

Host / SBC CB2
klippy.log
tmc2209.cfg (940 Bytes)
tmc5160.cfg (2.2 KB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

I am finishing to mount a Voron 2.4 which work nice and I decided to replace the TMC2209 with TMC 5160.
After updating the config files Mainsail starts Ok but when homing the X axis it is the Y axis which get homed and when homing the Y axis it is the X axes which moves !
I tried switching the X and Y configs (not the cables) with no succes.
The parameters for the steppers are set according to the Manta M8P V2.0 pinOut. Actually the pin configuration for the TMC5160 are identical to the TMC2209.
What could by wrong ?

Try the cables - just swap them at the X/Y connectors at the Manta M8P.

1 Like

So in fact, they are not inverted, they are swapped.

In the tmc2209.cfg there are only the TMC settings, not the configs for the main stepper pins. Same is with the tmc5120.cfg. How should we compare?

BTW: Using hold_current is not recommended. In particular when it is less then half the run_current.

Right, I will remove the hold_current values (I left one by mistake).
I moved the TMC2209 and TMC5160 into two config files so I can just uses

# [include tmc2209.cfg]                       # x/Y/Z axes tmc2209 configuration
[include tmc5160.cfg]                         # x/Y/Z axes tmc5160 configuration

to chose the drivers I want to use.
The [stepper_x]... configs are still in the printer.cfg.file (I could also move them into the tmc…cfg files) You can also find them in the klippy.log files at line 958…

## X Stepper on Motor1(B Motor - left)
[stepper_x]
step_pin: PE6
dir_pin: !PE5
enable_pin: !PC14
microsteps: 64
rotation_distance: 40
endstop_pin: tmc5160_stepper_x:virtual_endstop      ##  JMA  
position_min: 0
position_endstop: 350
position_max: 350
##--------------------------------------------------------------------
homing_speed: 10   #Max 100
homing_retract_dist: 0
homing_positive_dir: true


## Y Stepper on Motor2 (A Motor right)
[stepper_y]
step_pin: PE2
dir_pin: PE1
enable_pin: !PE4
microsteps: 64
rotation_distance: 40
endstop_pin: tmc5160_stepper_y:virtual_endstop      ##  JMA  position_min: 0
position_endstop: 340
position_min: -20
position_max: 340
##--------------------------------------------------------------------
homing_speed: 50  #Max 100
homing_retract_dist: 0
homing_positive_dir: true

BTW: Did you have to pull the plugs of the stepper motor cables to change the drivers?

No, I did not changed the motor cables, just changes the jumpers for the TMC5160 (4 jumpers) for the SPI mode instead of 1 for the TMC2209 UART mode

I might finally try but I don’t see the logic, I would like to know why this is neccessary.

I tried to swap motor A and B cables, still some problem.
Reverted to normal, motor 1 = motor B, motor 2 = motor A.
Then inverted the dir_pin of BOTH steper_x and stepper_y and then it owrk fine !

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.