X_endstop not triggering

Basic Information:

Printer Model: Modded Cube Pro duet
MCU / Printerboard: MKS Gen_L V2.0
klippy (3).log (574.4 KB)


Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue: I cannot make my X endstop work. It’s driving me nuts. I have use this MCU on a printer in the past. It works. I copied and pasted the config from an example and edited it to work for me.

Other endstops work as they should I have them plugged into the X+ Y+ and Z+ connectors.

When I swap the plugs for the X and Y endstops at the MCU and press X stop manually, Y shows triggered. The switch works. To troubleshoot, I have tried to map and connect my X endstop to connectors for X- Y- and Z- too. What the heck is going on?


I have tried to pull the diag jumpers for this endstop too. I can’t see that being the problem because it’s not an issue for other endstops and was not an issue in the past for my previous printer.

Did you check the operation of the endstop in the Klipper front end?

I use Mainsail and on the “Machine” page, at the bottom, you should see something like:

Hold down the switch, click on the circling arrows to do another read, and see if it is recognized as being TRIGGERED. Once you have that confirmed, release the switch, click on the circling arrows and see if it is noted as OPEN.

I’m not familiar with your main controller board, but I suspect that you’ve specified the wrong pin for the X-axis end stop switch.

Yes. That is the interface I’m using to test the endstop. I’m using pin definitions from MKS github here.

According to:

The relevant X endstop pins are D3 and D2 and should translate to PE5 / PE4

yup. Check klippy Log. I’m using PE5 now. I have tried PE4 and PJ0 and PD2 also. After moving the switch to the corresponding X Y and Z spots.

I wish somebody could point out a silly mistake I made. I’ve been at this for over a week I have 3 other printers and have had this one up and running with a different MCU for over a year.

The endstops I used with this board previously had an LED to show if they are triggered or not but that should not make a difference I think.

As @mykepredko pointed out: Does the endstop status change in the WebIf in any way when pressed respectively released?

Y and Z change when I press and hit update on the interface. X does not. When I swap the leads from Y and X and press the X endstop, I get the Y triggering. (endstop works)

I have tried pullup resisters, I have tried inverting the signal too. All that does is switch open to triggered.

Does it work when you connect to the X-Max Endstop and use PE4?
Or to Z-Max and PD2?

It does not.

I think that would indicate it has something to do with the sense pin, but I don’t know how to further diagnose and cant figure out why it would only be that axis. I have the same stepper drivers configured the same way.

Do your other endstops work when connected to X-Max or Z-Max?

Ok. Something moved this time. First I pulled all diag jumpers off. It did not make a difference. Then I moved all switches to the - plugin with diag jumpers still removed and changed the pin name. Everything worked as before. Y and Z triggered X did not.

Then I took X and moved it to the now vacant Y+ and changed the pin assignment. Now I had 3 working endstops.

I decided to take it one step further and put all diag jumpers back on. Now, I had a working X and non-functioning Y and Z.

What I gather, is that Y- and Z- are unaffected by the diag jumpers but Y+ and Z+ are. X - and X+ don’t work either way. That’s a bit confusing.

What do the diag jumpers do? I’m using 2209 steppers with no plans to use stall guard or sensorless homing. Do I even need that sense Pin?

From what you’ve written, it doesn’t seem like you are very familiar with 3D printer main controller boards and their hardware. Could I ask you to stop pulling jumpers and moving axis end stop switch/sensor connections until we have a clear understanding of how your board is wired along with the state of your printer.cfg?

You’re asking about the “diag” jumpers; they select between the end stop sensors being used between TMC2209 sensorless homing feature and an external switch or sensor - note that the diag pins are assigned the same pins “-” end stop sensor sockets. If you are not using sensorless homing then the diag jumpers must be removed. From what I understand in your system, you should have all the diag jumpers removed.

The “X-”, “X+”, “Y-” etc. stop sockets are simply pins with power and ground that can be used by switches and other sensors for a variety of different functions with the “suggestion” being that they be used for the end stop functions that are printed on the PCB. I put the word “suggestion” in quotes because there is no hard and fast requirement in the printer, the MKS Gen L main controller board or the firmware (whether it be Marlin or Klipper) for what the pins are used for.

So, if you’re finding that the “X-” socket (which provides access to pin D3) doesn’t work, you can move the X axis end stop switch connector to one of the unused sockets on the board and set its functionality to the pin assigned to that socket (ie if you move it to the “Y+” socket the pin for the “X axis end stop” would now be D15).

One last concept to explain and that is in essentially all 3D printers only one end stop sensor is used for each axis you do not need to wire in sensors at both ends of each axis - only one is required as that sets a reference point and all other movements are based upon that. Klipper only ones one end stop sensor and which end of the axis it is placed at is determined by its position set in printer.cfg. As noted above, any of the sockets (and their associated pins) can be used for any of the three end stop sensors.

To determine which pins you’re using, you should be consulting with the “User Manual” (which I admit isn’t great) found here:

From that, you should use the pinout diagram to determine which pins are used with which functions:

as well as the wiring instructions for the TMC2209 which you can find here:

I HIGHLY recommend that you run your TMC2209’s in UART mode which means you set the pins underneath the driver as shown in the page above:

Could you please review your board and:

  1. Indicate which wires are connected to which sockets. Of primary interest is which stepper drivers are connected to which stepper motors and which end stop sensors are connected to which connectors. Even though I’m most interested in stepper driver and end stop sensor connections, I’m still interested in knowing how everything else is wired.
  2. What jumpers are in place. Based on a quick review of the “User Manual”, I believe that the only jumpers that should be in place is the single UART jumper for each TMC2209 shown above.
  3. Please attach your printer.cfg. I know its functionality is shown in klippy.log but it sounds like you’ve made changes and I want to get a baseline for where you are right now.
  4. Run the printer again and indicate which end stop sensors work and don’t work. I’d also be interested in knowing if the board and extruder heaters (and temperature sensors) work as expected and if the motors move.

Sorry if I my manner came across as aggressive but I’ve found it best when we get everybody on the same page and not make assumptions on what should be there or in what state things are based on previous posts.

1 Like

Hi. Mykepredko Thanks for the comment.

I think the problem is with my communication. I was probably not verbose enough as to what I tried to do. After that last post, I was able to sort things out well enough. I should have indicated in the post, that I know how to make it work.

I guess I got into trouble by saying the extra steps I took to try to diagnose the board to see if it was me or the board that had messed up.

I am aware that I can use any endstop socket for any endstop as long as I assign the proper pin name in the config. I also know I only need one/axis.

I built my first printer over 10 years ago. It worked great for me. Since them I have successfully built two others. The diag jumpers on this board did something unexpected, that’s why I got confused with it.

As I have stated, this MKS board came out of my 400mmx400mm Delta. I wanted to upgrade the delta’s board. It has been printing for 3 years with all the diag jumpers in place using mechanical endstops.

The sockets for both X- and X+ do not work even with the correct pins defined in the printer configuration. That was the confusing part. I just used the Y- socket for my X endstop.

I have moved on, and solved a couple other little issues and am ready to start my first test print.

Thanks for the help everyone. Sometimes a little jump start to my thinker helps me sort things out.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.