Automatic squaring of MPCNC using end stops?

So related to , would there be a way to have stops for each stepper (2 x and 2 y) that we could home to and would reset the squareness of the machine ?

If you know what I mean. 4 individual steppers, drivers, and stops for 2 X motors and 2 Y motors. Homing X would cause each end of the X axis to home individually to a known position (making it square once the same is done for Y).

I currently do this manually. Each time.

I activate the steppers and measure mine every time. If you put endstops on you will have to move and measure them every time as well that is why we don’t use them. They are useful only on repeat jobs.

So square things off then send “M17” ? That’s what I’ve been doing.

Would be cool to have use the endstops to square it like you suggest, maybe we could have it return to original position after.
It is a bit annoying to have to square it every time and also easy to make a mistake.

I’m using stops in series to square a long axis this way. To be clear, I am not using stops to home the machine or for repeat work, although I suppose I could with considerations in the code.

The way it generally goes down, one end hits it’s stop first and grinds until the other hits its stop and completes the circuit. I generally home it three times, as the first one might be slightly off, and if two is good, why not three? Once square, I jog the machine to my designated home and give it a G92 X0 Y0 Z0.

This assumes you’ve carefully measured the stop location so that each end of the axis is at the same position when the switch clicks, and very firmly secured your stops to the frame so they can not shift.

I’ve considered doing this to my short axis, but I haven’t had any trouble with it being out-of-square, so I leave it alone.

Hope this helps.


I put stop blocks on the ends I don’t have end stops. If the other end is too far forward it hits the block and grinds for a second, if it’s too far back I let it home, then kill the stepper power then pull both ends to the stops and hit home again. Close enough for everything I’ve done so far.

I’ve thought of doing this as well with the end stops. Is this not hurting the steppers forcing them to skip like that ?

Hey, that sounds pretty easy, Barry! I over-engineered…

I have one endstop / clamp on the x and y axis. Sounds like I need to add one to the other end too. I was not thinking along the lines of the machine getting off over time etc. But I can see how missed steps on one motor would skew the machine.

When I set mine up, I loosened the set screws on the motor gear to allow the machine to “relax”, then set the screws.

Interesting topic…

@PJM. Shouldn’t hurt them at all. It’s not a mechanical grinding, just the motor bouncing between the electromagnetic lines of force. I stuck a price of tape on the end of the stepper shaft to make sure it wasn’t grinding the belt, and on my setup it’s not.

Hey Barry
I also did the same thing I printed a piece flat plastic that i screwed onto the top of the corner block on the sides opposite the home sw - for both x and y
what i did was i went through and Squared up the machine I got the outer X frame bars to be the same distance from the corner blocks on both sides - as close as i can (<1/32 inch). I have a 4ft by 3ft build. did the same for the y, and then i squared up the gantry bars to the outer frame bars with the printed alignment - then i adjusted my X and Y limit switches so they just close (open - whatever) when the other side hits the printed block…

After changing a bit, or manually moving the gantry i will turn power off to the steppers (if they are energized) and manually cock them away from the switches like you said, then hit home, and it gives me that wanted grind on the one side when it hits my end blocks before the sw is hit, when it does that, i know it’s square.

I can run a number of repetitive runs and never have to re square it up. As long as i don’t manually move the gantry - but i always redo this when i change a bit

I do exactly what Barry says as well. 2 end stops 1 on X one on Y, then a block clamped to the rail. Measure everything about 10 times while adjusting every time and it homes square every time.

I have hundreds if not thousands of hours on my machine with no consequence to the steppers.

It sounds like the right approach. I’ll try it out soon. These are my endstop holders. They’re pretty solid so I’ll print a couple to use without the endstop in it for the ends the just get jammed up against it.

Show and tell. Here’s mine

Nice! I used pipe clamps… :sunglasses:

That may actually not be a bad idea at all Barry… I have had to adjust mine once in a while be cause they slowly slide if they get banged around a lot. If I tighten them too much the PETG snaps… too loose and they move. Pipe clamps… go to town

I use ABS. They won’t move.