Dual endstops issue on Z not on Y (Lowrider)

Hi I downloaded the config for SKR1.3 with dual endstops. I can move all axii and both steppers turn on Y & Z but for some reason my SKR doesn’t see the Z2_min.
So when homing Y, all works like expected but when homing Z only 1 motor moves…

After some hours of digging around on the forum without finding my answer I hope someone can help me find my mistake in my config or configadv…

When I send M119 it shows this:
z_probe: TRIGGERED

I assume Z_probe should be Z2_min but how do I get my board to see it like that?
This is my endstop section in config.h:
//============================== Endstop Settings ===========================
// @section endstops

ALL ENDSTOP pullups and downs are disabled.

// Mechanical endstop with COM to ground and NC to Signal uses “false” here (most common setup).

#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // false // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // false // Set to true to invert the logic of the probe.

#define INVERT_Y2_VS_Y_DIR // Y2 direction signal is the opposite of Y
#define Y_DUAL_ENDSTOPS // Y2 has its own endstop
#define Y2_USE_ENDSTOP YMAX // Y2 endstop board plug. Don’t forget to enable USE_*_PLUG.
#define Y2_ENDSTOP_ADJUSTMENT 0 // Y2 offset relative to Y endstop

// Multi-Z steppers
#define INVERT_Z2_VS_Z_DIR // Z2 direction signal is the opposite of Z

#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
#define Z2_USE_ENDSTOP XMAX // Z2 endstop board plug. Don’t forget to enable USE_*_PLUG.
#define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Y endstop

I think when everything is set up properly, you should see z_max, z2_max, and z_probe.

Can you upload your modified Configuration.h and Configuration_Adv.h?

I think you will normally want either pullups or pulldowns enabled so when the endstop switch is open it has a well-defined value. Most of us run normally-closed where the endstop pin is shorted to ground when the endstop is not pressed, and the circuit is opened when the endstop is pressed causing the voltage to go high due to the pull-up.

If you are running open-circuit normally and closing the circuit to +5V when the endstop is pressed, then you will want #define ENDSTOPPULLDOWNS

1 Like

Hi Jamie, thx for the tip, tried to enable Endstoppulldowns but still not showing z2_min (or max) endstop.
Below my config files.
Marlin.zip (89.6 KB)

Nothing looks obviously out of place.

I see you’re using MOTHERBOARD BOARD_BTT_SKR_V1_4 and I’ll assume that’s correct.

I’m not sure which version precisely you’re starting with, but one thing I did notice when comparing against Release 515 version V1CNC_SkrTurbo_DualLR_2209-2.1.1.zip is Ryan’s version has this near the end, which your version does not have:

#define Z_MIN_PIN P1_27
#define Z_MAX_PIN P1_00

I believe the Z_MIN_PIN and Z_MAX_PIN in Ryan’s version is redundant but harmless, since the board SKR 1.4 or SKR 1.4 Turbo should pick that up automatically when Z2_DRIVER_TYPE is defined (in turn causing Z_MULTI_ENDSTOPS).

I believe the Y_MAX_PIN is also redundant and harmless.

The X_MAX_PIN might have an effect, because with a single X driver, you won’t have X_DUAL_ENDSTOPS and you might not get a definition for X_MAX_PIN which could cause the Z2 endstop to have a problem when it attempts to use __XMAX__.

Before you change anything, press each limit switch individually and perform M119 to identify which limit switches trigger which M119 responses. See if any limit switches trigger two items in M119 and see if some limit switches have no effect. Maybe z_min is linked to z_min and to z_probe and you have no z2_max because your z2 connection (physically plugged into xmax / E0DET) is not being registered in the firmware because of your missing X_MAX_PIN definition?

You can try adding #define X_MAX_PIN E0_DIAG_PIN by itself, or you could download a fresh copy of the V1CNC_SkrTurbo_DualLR_2209-2.1.1.zip version and re-add your changes to that.

I am also seeing that you have E0_DRIVER_TYPE defined. This is probably harmless since you have EXTRUDERS 0, but I’m not sure. For now disable E0_DRIVER_TYPE since it has no benefit and maybe it can confuse how the steppers are allocated to the other axes (or at least it can confuse a human).

1 Like

Hi Jamie,

Indeed I work with SKR1.4. I started with the V1CNC_SKR1_3_DualLR-2.1.1. as that board has the same environment (lpc1768).
Removed the E0_driver but no difference.
I also tried to trigger all pins but it seems XMAX doesn’t trigger.
Tried defining XMAX pin explicit but that didn’t work. Tried having Z1 & Z2 on Zmin & max plug and switched the Zprobe to Xmax but no luck as well. Also tried to change the pins in src\pins for my board. Anyway no luck now but it’s to late now, my brain is fried. I’ll try again tomorrow. Defenitly the E0DET does not trigger. So I’ll need to figure a way out to make it detectable.

Next things I’m considering, start with a clean Marlin 2.1.2 and configure for DualLR.
Try another pin connection on my board to surrogate for XMAX like one of the Thermistor pins.
Any other idea’s?

Ok. I think it might be the sensorless homing, so-called DIAG pin on TMC2209 could be fighting with your endstop and causing it to fail to detect.

Some models (SKR 1.3 and SKR Octopus for two examples) allow you to connect/disconnect the DIAG pin on the TMC2209 using jumpers on the board. The SKR 1.4 doesn’t have jumpers and some people (and documentation page 7) recommends cutting the DIAG pin.

Also after looking a little closer, I am pretty sure you do need to add this within Configuration.h


This is not needed for SKR 1.3 so it is not in the original source you started with, but without it, and with MOTHERBOARD BOARD_BTT_SKR_V1_4 the E0DET pin does not get mapped to XMAX and then Z2 doesn’t work, and doesn’t even show up in the M119 report.

I suspect the reason #define X_MAX_PIN E0_DIAG_PIN did not work is because of the DIAG pin, but if you look closely at the M119 report, you should see z2_max (whether or not it works).

Then cutting the DIAG pin on the E0 driver (which drives the Y2 motor) should allow it to work. Before you cut the pin you should be able to test the endstop functionality by removing the driver altogether to confirm that that is the problem.

So to summarize:

  • Build firmware with #define X_MAX_PIN E0_DIAG_PIN in Configuration.h and flash the board
  • Remove the E0 stepper driver from the socket (power off while doing this)
  • Try M119 while pressing the endstop that’s connected to the E0DET/XMAX plug
  • Then two questions: do you see z2_max listed in the M119 report? Is it functioning?
  • If z2_max is listed and functioning, then it’s solved and you can cut the DIAG pin and reinstall the E0/Y2 driver (power off while doing this) and dual-Z homing should work
  • If z2_max is not listed or if it is listed but not functioning, then we have more work to do

Hi Jamie,

I’m really really glad it’s finally fixed… I started with a clean slate (again), added the #define X_MAX_PIN E0_DIAG_PIN to the start of config.h and now it shows z2_max and I can trigger it. Before I added this line somewhere in the code and I’m starting to think that is probably my mistake.
(I had cut the diag pins at the start of the build so that was ruled out).

Thanks for sticking with me on this one!! I was close to insanity but you kind of saved me :smiley: