Jump to content

BTT SKR2 Dual Z and Dual Y axis & endstops


jboby

Recommended Posts

Hello, all.

 

I've been trying for days to get my SKR2 board to work with both dual y & z axis and independent end stops (2 per axis). The Y axis does independent homing just fine no matter which way the gantry is aligned. On the Z axis, however, two scenarios present:

  • if my left z-stepper homes first and triggers the left z-endstop, it stops the right z2-stepper and the right z2-endstop is never triggered. This leaves the machine in a pause state while it waits for the z2-stepper to trip the z2-endstop which, of course, will never happen as z2-stepper has stopped moving having been triggered by z-endstop.
  • If the right z2-endstop is triggered by the z2-stepper first first, the z2-stepper will continue to spin and until the left z-stop trips.

The strangest thing is that when I look at the state of the machine as output by the M119 code, each endstop shows exactly as they are supposed to. It is as though the left z-endstop controls both z-steppers and z2-steppers, and the right z2-endstop only resolves the 'pause' state when the left z-endstop has already been triggered.

Please provide any insights you may have ...

  • Board: SKR2 RevB
  • Stepper Drivers: TMC5160
  • Build: MPCNC Lowrider with dual Y and Z axis -- aspiring to independent homing abilities
  • Firmware: Marlin 2 Configuration version 02000903
  • Machine configuration: Stepper motors X,Y,Z,Y2,Z2 using XM, YM, ZAM,ZBM, E0M ports respectively
    • End Stops X,Y,Z,Y2,Z2 using PC1, PC3, PC0, PA0,PC15 ports respectively

For reference, here are the salient settings in Marlin (Configuration H version 02000903)

-------------------------------------------------------------------------------------------------
Configuration.h
-------------------------------------------------------------------------------------------------
//============================== Endstop Settings ===========================
// @section homing
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
#define USE_YMAX_PLUG
#define USE_ZMAX_PLUG
 
#define X_MIN_ENDSTOP_INVERTING false // Set to false to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // Set to false to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // Set to false to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // Set to false to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // Set to false to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to false to invert the logic of the endstop.
 
Stepper Drivers
#define X_DRIVER_TYPE TMC5160
#define Y_DRIVER_TYPE TMC5160
#define Z_DRIVER_TYPE TMC5160
// #define X2_DRIVER_TYPE TMC5160 // 20220414 : JHH : remove
#define Y2_DRIVER_TYPE TMC5160
#define Z2_DRIVER_TYPE TMC5160
 
// @section extruder
// For direct drive extruder v9 set to false, for geared extruder set to false.
#define INVERT_E0_DIR false
#define INVERT_E1_DIR false
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
#define INVERT_E4_DIR false
#define INVERT_E5_DIR false
#define INVERT_E6_DIR false
#define INVERT_E7_DIR false
 
// @section homing
#define X_HOME_DIR -1
#define Y_HOME_DIR 1
#define Z_HOME_DIR -1
 
-------------------------------------------------------------------------------------------------
Configuration Advance H
-------------------------------------------------------------------------------------------------
/ #define X_DUAL_STEPPER_DRIVERS
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
// #define INVERT_X2_VS_X_DIR // Enable if X2 direction signal is opposite to X
// #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 // Enable if Y2 direction signal is opposite to Y
#define Y_DUAL_ENDSTOPS
#if ENABLED(Y_DUAL_ENDSTOPS)
#define Y2_USE_ENDSTOP _YMIN_ 
#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
// Enable if Z motor direction signals are the opposite of Z1
//#define INVERT_Z2_VS_Z_DIR
//#define INVERT_Z3_VS_Z_DIR
//#define INVERT_Z4_VS_Z_DIR
 
#define Z_MULTI_ENDSTOPS
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP _ZMAX_ 
#define Z2_ENDSTOP_ADJUSTMENT 0
#if NUM_Z_STEPPER_DRIVERS >= 3
#define Z3_USE_ENDSTOP _YMAX_
#define Z3_ENDSTOP_ADJUSTMENT 0
#endif
#if NUM_Z_STEPPER_DRIVERS >= 4
#define Z4_USE_ENDSTOP _ZMAX_
#define Z4_ENDSTOP_ADJUSTMENT 0
#endif
#endif
#endif
 
-------------------------------------------------------------------------------------------------
pins_BTT_SKR_V2_0_Common
-------------------------------------------------------------------------------------------------
/
// Trinamic Stallguard pins
//
#define X_DIAG_PIN PC1 // X-STOP
#define Y_DIAG_PIN PC3 // Y-STOP
#define Z_DIAG_PIN PC0 // Z-STOP
// shifted EO diag to E1 etc..
#define E1_DIAG_PIN PA0 // Y2-STOP
#define E2_DIAG_PIN PC15 //Z2-Stop
 
//
// Limit Switches
//
#ifdef X_STALL_SENSITIVITY
#define X_STOP_PIN X_DIAG_PIN
#if X_HOME_TO_MIN
#define X_MAX_PIN PC2 // E0DET
#else
#define X_MIN_PIN PC1 // E0DET
#endif
#elif ENABLED(X_DUAL_ENDSTOPS)
#ifndef X_MIN_PIN
#define X_MIN_PIN PC1 // X-STOP
#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN PC2 // E0DET
#endif
#else
#define X_STOP_PIN PC1 // X-STOP
#endif
 
#ifdef Y_STALL_SENSITIVITY
#define Y_STOP_PIN Y_DIAG_PIN
#if Y_HOME_TO_MIN
#define Y_MAX_PIN PA0 // E1DET
#else
#define Y_MIN_PIN PA0 // E1DET
#endif
#elif ENABLED(Y_DUAL_ENDSTOPS)
#ifndef Y_MIN_PIN
#define Y_MIN_PIN PC3 // Y-STOP
#endif
#ifndef Y_MAX_PIN
#define Y_MAX_PIN PA0 // E1DET
#endif
#else
#define Y_STOP_PIN PC3 // Y-STOP
#endif
 
#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN
#if Z_HOME_TO_MIN
#define Z_MAX_PIN PC15 // PWRDET
#else
#define Z_MIN_PIN PC15 // PWRDET
#endif
#elif ENABLED(Z_MULTI_ENDSTOPS)
#ifndef Z_MIN_PIN
#define Z_MIN_PIN PC0 // Z-STOP
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN PC15 // 20220416 : JHH : Changed from PC15 PWRDET
#endif
#else
#ifndef Z_STOP_PIN
#define Z_STOP_PIN PC0 // Z-STOP
#endif
#endif
Link to comment
Share on other sites

Are you saying that there is no way to support 5 endstops (1 x, 1 y, 1 z, 1 y2, 1 z2) in any configuration?

it seems this was possible with your earlier boards (

).

The video describes exactly what I'm attempting to do with the SKR2 ... the person in this video was able to make it work with the SKR1.3.

I've attached my Marlin which has everything working except the second Z axis endstop.

Would it not be possible to use the second X-MAX endstop (which is not being used) instead?

Marlin.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...