Dual Endstop Issues looking for checklist or guides

With the motors and endstop wiring in place I am able to move the axis with the home button towards the min endstops. X, Y, Z move what seems the right direction using the buttons on Repetier.

Issues I am not able to figure out:

  • Homing runs all the way into the stop without considerations for when the endstop triggers. While the endstop seems to work when not homing.
  • using gcode to move the machine is going in the opposite direction. Such as G1 X100 Y100 will run into the endstops.
  • Motors run really rough when trying to run any program and in the wrong direction (same as manual gcode)
  • Homing moves maybe one inch towards the endstop vs however far it needs
  • Swapping the endstops X1 with X2 or Y1 with Y2 creates one motor to studded and seems a mix match

Does anyone have a troubleshooting or setup list/guide for the dual endstop configuration?

There are a lot of things going on here. I think you have multiple problems. I’ll give you some first steps to figure out what is going on here.

Reasons for roughness:

  • stepper(s) not engaged
  • stepper(s) turning in opposite directions from each other
  • axes binding for some reason.
  • grub screws loose causing lost steps
  • wiring issue
  • stepper driver current issue?
  • micro-stepping set differently between the two steppers
  • wrong version of the firmware installed

The direction of travel of the steppers is controlled by how they are plugged in. If you flip any one connection between the stepper and the control board, the steppers will move in the opposite direction. Step one will be to make sure that both steppers are turning the correct direction when you move your machine electronically. Note that since the steppers are mirrored across the axes, one stepper will need to have a plug reversed compared to the opposite side.

Another reason for roughness is that one stepper of the pair is not being energized. Move your machine electronically just a bit in both the X and Y direction, then check each end of each axis. All four steppers should be energized. If you can easily move the end of any axes, then that motor is not energized. The most common reason for this problem is the wrong version of the firmware is installed. Binding of the axes could cause roughness, so check to make sure your machine slides smoothly when the steppers are not energized. Loose grub screws on the pulleys will cause one side to slip and the machine to bind.

If none of these solve the roughness issue, remove a stepper from the machine and see if it runs rough. If so, you most likely have a wiring issue.


Endstops are only checked when homing. There is a bit of logic that prevents your machine from moving to negative coordinates if it has been successfully homed, but it doesn’t sound like that is what is going on with your machine. Other than preventing negative movement, endstops play no role in machine movement. The starting point is to check your endstop states using an M119. If they read “triggered” then you wired your endstop switches as normally open rather than normally closed. The small amount of movement in the “correct” direction may be the retest sequence rather than the movement towards the switches.

Actually the endstops are in negative positions as 0/0 is about 2" away from the touchplate.

Also before I switched to dual endstop the machine was working. I had this machine running for many years with the same configuration. The new parts are the software, two new drivers (3 jumpers) and wiring. Each motor works individually and the movement for the most part is nice and smooth.
Direction and homing are messed up.

I would not even try homing until:

  • The motors move in the right direction
  • The results from M119 are completely right.

Are you using firmware from MarlinBuilder releases? Which controller do you have?

Other useful debugging can be found with M503, and M122.

Maybe some of the eeprom settings are wrong because the board had other firmware previously? M503 will show you all the settings. M502 will restore them all to the values in the firmware.

I tried to make a video showing the issues.

Thanks for the ideas. I tried to capture most of the questions in the video. Motors move in the right direction for homing and for manual moving. Not for gcode.
Endstops show open/triggered as expected.

You send G1 X100 Y100 in the video, but I don’t see any indication of what position the machine thinks it is in. M114 will print out the position it think it is at. If it started from X200,Y200, then that would make sense.

If they don’t move correctly in gcode, then the rest doesn’t matter. You have to fix that first.

Setting the G1 commands to relative mode might help. Sending G91 makes it relative (so G1 X10 always goes 10mm to the positive). G90 sets it to absolute (so G1 X10 always goes to X=10).

Fix the gcode first, by reversing the steppers. Then figure out what is wrong with the homing.

What do you mean by “manual moving”?

Also the start/stop on the motors is wild. I have not seen that before. I also haven’t used repetier server before though. What if (after you verify M119 and G1 works the right way) you just send G28 X ? Does it still do that funky stop/start?

Looking into it using the proivded gcodes:
Use G91 to make it relative and make sure it moves into the right position relative from where it is at.
Use G90 to verify it moves into the right direction from where it thinks it is at.
Use M502 to restore settings to firmware
Use M503 to display all the current settings in the volatile memory
Use M122 get debugging information

1 Like

@jeffeb3 here is where I am at.
The relative movements where backwards for X and Y. Adjusted all 4 wires to reverse direction so that the relative and absolute movements are in the correct direction.

After reading some of the other posts, I wondered if the endstop position is correct. Keep in mind I had a running machine that I am changing the firmware on and it is hard to know what is expected vs what was just the way it is.

The endstop position showed as triggered when moved away from the endstop such as recommended for the case of cable failure. Now I need to research how to tell the firmware default is triggered vs open.

You want the switches wired as normally closed (NC). This means the circuit will read as triggered if the circuit is open. If you have not modified the V1 endstop setting, and are using their maintained firmware, then it appears you wired your switches as normally open (NO). If you want to change the firmware for your switches, it is this section of configuration.h:

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // false // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING false // false // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // false // 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 // false // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING false // false // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // 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 // false // Set to true to invert the logic of the probe.

NC wiring is just a bit safer since if a wire breaks, the endstop will read as triggered and the stepper will not move. That is another way to check your wiring: unplug the endstop from the control board and check the setting. It should read as triggered if the firmware is setup for NC switches, and that would confirm that you wired your switches as NO.

1 Like

Perfect. Thanks. Will try to compile the code. So far no luck as I am getting errors.

Found the new vscode method, to be simpler and super quick actually.
Compiled and now all endstops are open when using M119. That said, they do not change state. Sounds like something I read in another post earlier. Verified wiring is connected to S and - for the endstops. Manually closing the connection between wires does not trigger either. Triggered/Open worked before inverting the settings. Do I need to change anything else?
EDITED: Reconnect the cables after moving things around.

Found the related post.