makerbase-mks / MKS-TinyBee

MKS TinyBee is a mainboard for 3d printing, based on ESP32 module
GNU General Public License v3.0
121 stars 116 forks source link

Endstop issue #48

Open jmaster03 opened 2 years ago

jmaster03 commented 2 years ago

Hello everyone, I recently bought this board but I'm having an issue with the endstops, command M119 shows them to work properly but motors don't stop. I disabled the V pin as I saw somewhere else but the problem persist. Right now I'm thinking it could be a compatibility with my motor drivers or something but I'm not sure

Drivers: Bigtreetech TMC2209 V1.2

Configuration.h: //=========================================================================== //============================== Endstop Settings =========================== //===========================================================================

// @section homing

// Specify here all the endstop connectors that are connected to any endstop or probe. // Almost all printers will be using one per axis. Probes will use one or more of the // extra connectors. Leave undefined any used for non-endstop and non-probe purposes.

define USE_XMIN_PLUG

define USE_YMIN_PLUG

define USE_ZMIN_PLUG

//#define USE_IMIN_PLUG //#define USE_JMIN_PLUG //#define USE_KMIN_PLUG //#define USE_XMAX_PLUG //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG //#define USE_IMAX_PLUG //#define USE_JMAX_PLUG //#define USE_KMAX_PLUG

// Enable pullup for all endstops to prevent a floating state

define ENDSTOPPULLUPS

if DISABLED(ENDSTOPPULLUPS)

// Disable ENDSTOPPULLUPS to set pullups individually //#define ENDSTOPPULLUP_XMIN //#define ENDSTOPPULLUP_YMIN //#define ENDSTOPPULLUP_ZMIN //#define ENDSTOPPULLUP_IMIN //#define ENDSTOPPULLUP_JMIN //#define ENDSTOPPULLUP_KMIN //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX //#define ENDSTOPPULLUP_IMAX //#define ENDSTOPPULLUP_JMAX //#define ENDSTOPPULLUP_KMAX //#define ENDSTOPPULLUP_ZMIN_PROBE

endif

// Enable pulldown for all endstops to prevent a floating state //#define ENDSTOPPULLDOWNS

if DISABLED(ENDSTOPPULLDOWNS)

// Disable ENDSTOPPULLDOWNS to set pulldowns individually //#define ENDSTOPPULLDOWN_XMIN //#define ENDSTOPPULLDOWN_YMIN //#define ENDSTOPPULLDOWN_ZMIN //#define ENDSTOPPULLDOWN_IMIN //#define ENDSTOPPULLDOWN_JMIN //#define ENDSTOPPULLDOWN_KMIN //#define ENDSTOPPULLDOWN_XMAX //#define ENDSTOPPULLDOWN_YMAX //#define ENDSTOPPULLDOWN_ZMAX //#define ENDSTOPPULLDOWN_IMAX //#define ENDSTOPPULLDOWN_JMAX //#define ENDSTOPPULLDOWN_KMAX //#define ENDSTOPPULLDOWN_ZMIN_PROBE

endif

// 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 // Set to true to invert the logic of the endstop.

define I_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define J_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define K_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define I_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define J_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define K_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.

Thank you in advance guys

3DSmitty commented 2 years ago

@jmaster03 This is how Mine is setup but I am using the MKS TMC2209's (Not sure if that makes a difference). ` //=========================================================================== //============================== Endstop Settings =========================== //===========================================================================

// @section homing

// Specify here all the endstop connectors that are connected to any endstop or probe. // Almost all printers will be using one per axis. Probes will use one or more of the // extra connectors. Leave undefined any used for non-endstop and non-probe purposes.

define USE_XMIN_PLUG

define USE_YMIN_PLUG

define USE_ZMIN_PLUG

//#define USE_IMIN_PLUG //#define USE_JMIN_PLUG //#define USE_KMIN_PLUG //#define USE_UMIN_PLUG //#define USE_VMIN_PLUG //#define USE_WMIN_PLUG //#define USE_XMAX_PLUG //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG //#define USE_IMAX_PLUG //#define USE_JMAX_PLUG //#define USE_KMAX_PLUG //#define USE_UMAX_PLUG //#define USE_VMAX_PLUG //#define USE_WMAX_PLUG

// Enable pullup for all endstops to prevent a floating state

define ENDSTOPPULLUPS

if DISABLED(ENDSTOPPULLUPS)

// Disable ENDSTOPPULLUPS to set pullups individually

define ENDSTOPPULLUP_XMIN

define ENDSTOPPULLUP_YMIN

define ENDSTOPPULLUP_ZMIN

//#define ENDSTOPPULLUP_IMIN //#define ENDSTOPPULLUP_JMIN //#define ENDSTOPPULLUP_KMIN //#define ENDSTOPPULLUP_UMIN //#define ENDSTOPPULLUP_VMIN //#define ENDSTOPPULLUP_WMIN //#define ENDSTOPPULLUP_XMAX //#define ENDSTOPPULLUP_YMAX //#define ENDSTOPPULLUP_ZMAX //#define ENDSTOPPULLUP_IMAX //#define ENDSTOPPULLUP_JMAX //#define ENDSTOPPULLUP_KMAX //#define ENDSTOPPULLUP_UMAX //#define ENDSTOPPULLUP_VMAX //#define ENDSTOPPULLUP_WMAX //#define ENDSTOPPULLUP_ZMIN_PROBE

endif

// Enable pulldown for all endstops to prevent a floating state //#define ENDSTOPPULLDOWNS

if DISABLED(ENDSTOPPULLDOWNS)

// Disable ENDSTOPPULLDOWNS to set pulldowns individually //#define ENDSTOPPULLDOWN_XMIN //#define ENDSTOPPULLDOWN_YMIN //#define ENDSTOPPULLDOWN_ZMIN //#define ENDSTOPPULLDOWN_IMIN //#define ENDSTOPPULLDOWN_JMIN //#define ENDSTOPPULLDOWN_KMIN //#define ENDSTOPPULLDOWN_UMIN //#define ENDSTOPPULLDOWN_VMIN //#define ENDSTOPPULLDOWN_WMIN //#define ENDSTOPPULLDOWN_XMAX //#define ENDSTOPPULLDOWN_YMAX //#define ENDSTOPPULLDOWN_ZMAX //#define ENDSTOPPULLDOWN_IMAX //#define ENDSTOPPULLDOWN_JMAX //#define ENDSTOPPULLDOWN_KMAX //#define ENDSTOPPULLDOWN_UMAX //#define ENDSTOPPULLDOWN_VMAX //#define ENDSTOPPULLDOWN_WMAX //#define ENDSTOPPULLDOWN_ZMIN_PROBE

endif

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

define X_MIN_ENDSTOP_INVERTING false // 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 // Set to true to invert the logic of the endstop.

define I_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define J_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define K_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define U_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define V_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define W_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define I_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define J_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define K_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define U_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define V_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define W_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.

define Z_MIN_PROBE_ENDSTOP_INVERTING true // Set to true to invert the logic of the probe.

`

nickdav76 commented 1 year ago

jmaster03, having the same issue. Did the above fix it?

Thanks

jmaster03 commented 1 year ago

I rewired the cables like this photo_2023-06-30_10-14-44

I also removed the red cable from the endstops, and this is how the code looks like

code