Dual endstop in config.adv.h SKR1.4

Hey all. I am confused with the dual endstop setup. I have taken a Rambo config and made it work for the basics of the dual endstop for the SKR 1.4. The motors turn appropriately, in pairs and in the correct direction (opposite) but I cant get it to compile by following the instructions in the marlin documentation to set the pins for the dual endstops… I think it is just syntax, but I can’t figure it out.

//#define X_DUAL_STEPPER_DRIVERS

#if ENABLED(X_DUAL_STEPPER_DRIVERS)
#define INVERT_X2_VS_X_DIR true // Set ‘true’ if X motors should rotate in opposite directions
#define X_DUAL_ENDSTOPS
#if ENABLED(X_DUAL_ENDSTOPS)
#define X2_USE_ENDSTOP XMAX
#define X2_ENDSTOP_ADJUSTMENT 0
#endif
#endif

#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#define INVERT_Y2_VS_Y_DIR true // Set ‘true’ if Y motors should rotate in opposite directions
#define Y_DUAL_ENDSTOPS E1DET
#if ENABLED(Y_DUAL_ENDSTOPS)
#define Y2_USE_ENDSTOP
#define Y2_ENDSTOP_ADJUSTMENT 0
#endif
#endif

//
// For Z set the number of stepper drivers
//
#define NUM_Z_STEPPER_DRIVERS 2 // (1-4) Z options change based on how many

#if NUM_Z_STEPPER_DRIVERS > 1
#define Z_MULTI_ENDSTOPS E0DET
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP
#define Z2_ENDSTOP_ADJUSTMENT 0

To me it doesn’t make sense that the define for the endstops is in the bolded line, but should be in the italic line below… This is the only way it will compile. Says it must be defined in that line??

Thoughts.

I agree. It should be:

#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
    #define INVERT_Y2_VS_Y_DIR true // Set ‘true’ if Y motors should rotate in opposite directions
    #define Y_DUAL_ENDSTOPS
    #if ENABLED(Y_DUAL_ENDSTOPS)
        #define Y2_USE_ENDSTOP E1DET
        #define Y2_ENDSTOP_ADJUSTMENT 0
    #endif
#endif

If that doesn’t compile, what is the error?

Ha. Well i got it to compile finally. Had to add lines to define the x2 y2. And the corresponding pins for the endstops. If anyone is interested. I could post the config/ad and pins for the skr 1.4… Perhaps someone who knows could also correct my syntax and make it proper and clean? But it works…
I have it wired on my desk and have sent the crown file. All steppers work as you would expect and the endstops seem to behave as well. Anyone interested…

YES! Im interested! Im having trouble getting one of the Y axis motors to move at the same rate as the other one. Y2 does not reduce the steps/mm when i reduce the Y steps/mm in the firmware. Any help you could provide would be great! SKR 1.4 Turbo 2209 drivers and trying to use dual endstops for the Y and Z axes. Thank you!

1 Like

If anyone is interested, I have created a repo on github for the mpcnc with 2A steppers

no StealthChop
no Hybrid_threshold
no Sensorless homing

incl. DualEndstop and wifi (ESP01S) enabled and wiring diagramm.

Please check the display and language section. Use at your own risk.

5 Likes

Here you go…

Spinne,

Thanks for this. I’m planning on using the same board and drivers and doing dual endstops as well.

If I have to make any changes, I’ll submit a diff.

Thanks,
Tim.

Hi Tim,
I would be very pleased, maybe there are some values, which needs to be changed, or easier Pin handling :slight_smile:
best regards
-Robert

First simple/stupid question… You didn’t have to touch any of the jumpers under where the 2209’s go?

Thanks,
Tim.

I’ve checked them right now. The TMC2209 are running in UART mode, therfore only two pins are jumperd/shorted.
See for reference https://github.com/bigtreetech/BIGTREETECH-SKR-V1.3/blob/master/BTT SKR V1.4/BTT SKR V1.4 Instruction Manual.pdf on page 07/12

I’m going to update the Readme.md of my repo

Exactly uart is only one jumper. Spinne’s coding is doing great for me. I just need to figure out why my endstops aren’t working.

Is it just X & Y min that aren’t working?

what does the gcode M119 tell you?

Currently I am banned from the garage. Lol lots of house work to do for guests coming in.

1 Like

X_min triggered
X2 min triggered
Ymin triggered
Y2min triggered
Zmin open

Looks like they either aren’t connected, or they are wired to C/NO, when they should be wired C/NC.

Do you, by chance, have those 3 pin boards with the LED on them?

Nope its the ones from the v1 shop

Which pins are you connected to? You should connect to the COM and NC pins (the two outside ones) on those switches. Can you confirm your wiring?

Connected to the two outside pins. Nothing on the middle.

Maybe I have them reversed on the board?