# X\_endstop not triggering

**URL:** <https://klipper.discourse.group/t/x-endstop-not-triggering/11201>\
**Category:** General Discussion\
**Created:** [October 26, 2023, 1:13am UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201 "2023-10-26T01:13:31Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 1:13am UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/1 "2023-10-26T01:13:31Z")

</div>

### Basic Information:

Printer Model: Modded Cube Pro duet  
 MCU / Printerboard: MKS Gen\_L V2.0  
[klippy (3).log](https://klipper.discourse.group/uploads/short-url/jgT03YjLJhirhzs78MAxjyJARdN.log) (574.4 KB)

`klippy.log`

_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?

Jonathan  
…

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 2:14am UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/2 "2023-10-26T02:14:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [October 26, 2023, 4:18am UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/3 "2023-10-26T04:18:18Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/3/32c6d11286f8e50b7da01165f3b0825536593115.png)

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.

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 12:22pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/4 "2023-10-26T12:22:36Z")

</div>

Yes. That is the interface I’m using to test the endstop. I’m using pin definitions from MKS github [here](https://github.com/makerbase-mks/Klipper-for-MKS-Boards/tree/main/MKS%20Gen%20l).

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [October 26, 2023, 12:45pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/5 "2023-10-26T12:45:04Z")

</div>

According to:

- [https://europe1.discourse-cdn.com/arduino/original/4X/b/3/d/b3d50914ea37777a060d06c65522c3bbf4481178.jpeg](https://europe1.discourse-cdn.com/arduino/original/4X/b/3/d/b3d50914ea37777a060d06c65522c3bbf4481178.jpeg)
- [https://github.com/makerbase-mks/MKS-GEN\_L/blob/master/hardware/MKS%20Gen\_L%20V2.0\_001/MKS%20Gen\_L%20V2.0\_001%20PIN.pdf](https://github.com/makerbase-mks/MKS-GEN_L/blob/master/hardware/MKS%20Gen_L%20V2.0_001/MKS%20Gen_L%20V2.0_001%20PIN.pdf)

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

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 12:52pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/6 "2023-10-26T12:52:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [October 26, 2023, 12:54pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/7 "2023-10-26T12:54:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 1:23pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/8 "2023-10-26T13:23:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [October 26, 2023, 1:59pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/9 "2023-10-26T13:59:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 8:32pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/10 "2023-10-26T20:32:25Z")

</div>

It does not.

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 8:33pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/11 "2023-10-26T20:33:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [October 26, 2023, 8:36pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/12 "2023-10-26T20:36:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 9:19pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/13 "2023-10-26T21:19:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 26, 2023, 9:23pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/14 "2023-10-26T21:23:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [October 27, 2023, 2:10am UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/15 "2023-10-27T02:10:58Z")

</div>

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:

> **[MKS\_GEN\_L\_V2](https://github.com/makerbase-mks/MKS-GEN_L/wiki/MKS_GEN_L_V2)**
>
> MKS GEN\_L is a powerful 3D printer control board with ATMEGA2560 and compatible with RAMPS. V2.1 version the motherboard integrates SPI / UART interface and works with MKS TMC2130/TMC2208 V2.0/TMC...

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

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/b/bad80ada32cadaa85116a5579c0155760a8c16c2.jpeg)

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

> **[Drivers\_MKS\_TMC2209](https://github.com/makerbase-mks/MKS-GEN_L/wiki/Drivers_MKS_TMC2209)**
>
> MKS GEN\_L is a powerful 3D printer control board with ATMEGA2560 and compatible with RAMPS. V2.1 version the motherboard integrates SPI / UART interface and works with MKS TMC2130/TMC2208 V2.0/TMC...

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:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/7/762d68a49c388f54dbd93dac0608b76a61e1efcb.png)

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.

---

<div class="post-metadata">

**Author:** ![jonawald](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@jonawald](https://klipper.discourse.group/u/jonawald)\
**Post date:** [October 27, 2023, 2:47am UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/16 "2023-10-27T02:47:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [November 26, 2023, 12:48pm UTC](https://klipper.discourse.group/t/x-endstop-not-triggering/11201/17 "2023-11-26T12:48:16Z")

</div>

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