Wrong direction while homing

Basic Information:

Printer Model: Custom CoreXY
MCU / Printerboard: SKR Mini V3
Host / SBC Raspberri Pi 4
klippy.log

Hello Folks! I’m having an issue with homing on my printer.

The homing sequence does not work correctly. When I start homing, the printer first moves Z down by 5 mm. X then homes normally and in the correct direction. However, when it starts homing Y, the gantry moves in the wrong direction.

Instead of moving towards +Y, it moves towards -Y. The Y endstop is located at the back of the printer at Y+220, but during homing Y always travels in the negative direction, away from the endstop.

The CoreXY kinematics seem to be correct, because X moves straight and homes correctly. If the kinematics were wrong, X movement would not be linear.

I tried inverting the Y stepper direction pin, but that causes another problem: after inverting the Y direction, the X endstop no longer triggers correctly. The endstops themselves work properly, as I have testet.

At this point I’m not sure whether this is a configuration issue related to stepper directions, endstop assignments, or CoreXY motor mapping.

Any help or pointers would be greatly appreciated.

[include mainsail.cfg].txt (1.4 KB)

klippy.log (7.0 MB)

Hello @holginator !

Have you tried to set the #homing_positive_dir: flag?

[stepper]¶

Stepper motor definitions. Different printer types (as specified by the "kinematics" option in the [printer] config section) require different names for the stepper (eg, stepper_x vs stepper_a). Below are common stepper definitions.

...

#homing_positive_dir:
#   If true, homing will cause the stepper to move in a positive
#   direction (away from zero); if false, home towards zero. It is
#   better to use the default than to specify this parameter. The
#   default is true if position_endstop is near position_max and false
#   if near position_min.

Hi @holginator ,

Your X can be moving in the correct direction (+ to the right), but your Y can be reversed if your A/B steppers are swapped (see the lower left axis diagram).

Setting up CoreXY printers can confusing with X/Y Axis movement.

That’s why I suggest getting a piece of paper and trying to invert the DIR pins as laid out in this post: