Dual Endstop configuration issues..

Hi folks,

I am trying to finish the dual endstop configuration for days but could’t find a clear step-by-step tutorial or whatsoever…

The steps I took:

  • Mechanical configuration is all set.
  • I tried to follow the Ryan's guide on V1Engineering but the steps didn't actually make sense to me as a newbie. Maybe too advanced..
  • As in Test and Calibration section:
    • I issued M119 and checked all open when not touching. OK.
    • Why do I use M666 ? Why do I need offsets? How will I calculate offset value?
Basically I am not able to finish the setup... Could anyone please assist me to finalize it?

Hi, I don’t know what board you’re actually using, but could it be that you connected +5V > Signal, instead of “-” or Gnd > Signal. It looks to me that way.

If correctly connected the stepper where you trigger the limit switch should stop, (only when homing).

On my setup, I had to invert the limit switches, but I had different switches, should not be the case with yours.

I am using Ramps 1.4 with Mega. White colored PCB might be confusing but it is from Elecfreaks.

I placed the endstop blocks 10cm away from corner pieces, so the gantry doesn’t clash with surrounding steel pipes.

Let’s say I place the gantry by hand in a random place. When I start the machine, I am not able to move gantry in X(-) or Y(-) directions. It looks like the firmware thinks that the machine is alredy in 0,0 position.

If I click Home for both X and Y axis via Repetier host, it works fine.

How am I supposed to move further?

What should I do with the following statement:

The unfortunately designated M666 lets you test your offset to quickly calibrate your machine. Using the command M666 X0.72 would offset the X1 stepper 0.72mm away from it’s endstop, Y! can also be used. To verify your current settings during calibration just an M666 will show the current offsets. Once the correct offset are found you should input them into your firmware.
How will I designate the offset value? Ryan gave 0.72 but why?

And where should I input them in the firmware?


That sets one of the axis ends offset. Say if you’re not perfectly square, you can offset one end to bring it into alignment. Dual endstop can’t move negative numbers, that’s why you have to home x and y first. Don’t worry about the offset for now. If you built your frame relatively square you don’t need to worry about it. Once you use the machine for a while, we can help you with the rest.

Just checked the Ramps 1.4 pinout, so it seems to be correct, from what I see on the picture. Just the Z homing is missing ??

Does it run correctly? means does stop on the limit switches when you do homing?

Further than that I did not bother yet. I did one test and was pretty square right from the beginning.

If you want it perfect, just mark 4 points, something like (X 0;Y0 : X0;Y300 : X300;Y0 : X300;Y300)

If the distance between X0;Y0-X300;Y300 and X0;Y300-X300;Y0 is equal, your build is square.

The formula is a2+b2=c2,



Z limit switch port is your touch probe. Never hit the home all button!

To start using the machine configured in this way (advanced dual endstops) you need to move the head close top home, use your cam to have a start command of G28 X Y, and then proceed with your job. Everything is based off of CAM with Dual endstops.

Leave the offset alone until you need it.

Ryan just to clarify for myself.
This means you can’t do G28 X0 Y0 if you are more than 300mm away ? If I’m close it works but if the head is too far away it fails to home. Where in the code would they define this lenght ?


In configuration.h, you need to redefine these two to match your machine:

#define X_BED_SIZE 200
#define Y_BED_SIZE 200

1 Like