View Full Version : Setting the Y-axis square to the X-axis

Sat 27 January 2007, 14:03

It is not the motors' duty to get the gantry square. The gantry's v-rollers must get it square. The motors' duty is to help to hold it square when a big offset load is put on the gantry.

A gantry, with motors disengaged from the racks, must sit perfectly down with the V-rollers all making equally firm contact with the rails. If the motors can twist the gantry square from this seated down position, without lifting a roller, then you either have an already-square position, or a faulty (flexible) gantry. (The original ShopBot gantries could be flexed into a square position by the motors - the MechMate gantry is too stiff for that) Mach3's facility for auto-squaring a gantry tends to assume a flexible gantry - we don't use it.

To be able to check a gantry's natural squareness, it follows that one must have reference points that are independent of the motors. The adjustable fixed stop blocks on the MechMate rails serve this purpose.


Before starting this exercise, make sure that the x and y rails are straight and the V-rollers seat properly for the whole range of travel.

1. Get two thin sheets of MDF, the full size of your table. (After squaring they will be slightly smaller, but still mostly usable for other jobs.

2. Nail one sheet of MDF to the table. 4 nails are enough. nail about 200mm [8"] in from the edges. Drive nails fully in till heads are flush.

3. Write the numbers 1, 2, 3, 4 on the second sheet of MDF. Write mirrors of the numbers on the back of the sheet as well - so that you can find corners 2 & 4 by looking at the back of the sheet.


4. Nail the second sheet over the first, leaving the heads proud so that they can be pulled out easily later. stay 100mm [4"] away from the edges.

5. Switch stepper motors off, manually pull gantry hard against the adjustable stops at A & B. Switch motors on while holding the gantry against the stops.

6. Using the stepper motors and router/spindle, trim all four edges of the MDF boards flush with each other.

7. Remove only the top sheet of MDF, turn it over and place it face down on the lower sheet so that corner 2 is now in position J. Get corners J&M to match exactly, and get edges JM to lie exactly together. (If you cannot get lines JM to match exactly over the two boards, your x-rails are not straight - fix that before resuming the squaring process)

8. Inspect corner K to see if lines JK of the two boards have diverged. THIS IS WHERE YOU SEE IF Y IS SQUARE TO X. If you see an error, S, realise that the actual squareness error is only half of your reading - flipping the board doubles the error.


9. Adjust stop A to correct the error. Get the top MDF board back into the starting position. Start process from paragraph 5 above again. Repeat steps 5 to 9 until you get the best result.

10. Also put corners 3 and 4 of the top board in position J. Perfect alignment and straightness of all corners and edges should be achieved.

11. Now adjust the V-roller shims under the gantry at positions E and F..... Drop the x-pinions out of the racks and roll the gantry against stops A & B. If the gantry does not naturally hit stops A & B at exactly the same time, the shim washers at E and F must be adjusted. (G and H do not need adjustment).

12. Re-engage pinions to racks and repeat steps 5 to 10 until happy that your machine is set up square.

13. Drive gantry to the stops C and D. Adjust those stops to touch the gantry simultaneously.


When a motor is switched on, it defaults to the nearest full step position, not to a micro-step. To reduce the level of "clunk" heard when switching the motors on, you can try turning the pinion to a different tooth before engaging it with the rack. For technical reasons, folk with gearboxes will have more joy than those without. Also, pinions with odd number of teeth will be better than the even numbers. Theoretically, folk with 20 tooth pinions on direct drive motors will get no difference.


Having followed this procedure, your gantry will have a natural tendency to default to a square position if the motors are off. There is no need to force it square before switching it on. The key is to get the gantry's v-rollers into a naturally square orientation - use shim washers, not hammers!

Sun 28 January 2007, 13:16
As an example, let's say that our table with a Y dimension of 1830mm, overlaid with test boards 1830 wide, gives a S error of 0.5mm....

The EG end of the gantry must move towards A to become square. A must be adjusted slightly more than half the S error because dimension AB is bigger than JK:

The adjustment amount is (S/2)*(AB/JK)
= (0.5/2)*(2254/1830) = 0.308mm

The drawings call for M8x1.25 pitch screws for the adjustable stops. For a 1.25mm pitch screw to move 0.308mm, it must be turned about 89 degrees.

To set the wheel shims in step 11, Let's take an example of the gantry naturally lies 1.3mm away from one stop (use feeler gauge). Distance EG is fixed by design at 475mm. This is much narrower than dimension AB. So the shim must change by:
475/2254*1.3 = 0.27mm. Shims at E must be reduced by 0.27mm and shims at F must be increased by 0.27mm.

While the motors are switched off, their detent torque holds the gantry square. But, if the gantry gets knocked out of line, it is easy to check it either against stops AB or CD (either end of the table). We often go months without checking the squareness. The MechMate stops are very visible from the top and it is quick to see if there might be something wrong.

If we hit the end stops by mistake, we know that we have hit it into a square position. In fact, when we wonder if the machine is still square, we just gently run the gantry against the stops (either end of the table) and jump a few motor steps.

Mon 08 November 2010, 16:20
Get corners J&M to match exactly, and get edges JM to lie exactly together. (If you cannot get lines JM to match exactly over the two boards, your x-rails are not straight - fix that before resuming the squaring process)

Lines JM have a .013" (.33mm) difference in the middle of the two boards. I assume that the X-rails are not straight by half of this measurement, .0065" (.165mm). When you say 'exactly' is there any tolerance? Should I try for straighter rails?

Gerald D
Mon 08 November 2010, 20:56
That is a question that you will have to answer for yourself, guided by what you plan to produce with your MM.

Tue 09 November 2010, 18:58
That is a question that you will have to answer for yourself, guided by what you plan to produce with your MM.

You scare me with responses like that,:rolleyes:

Seriously, I spent the day tweeking the rails until I was able to 'Get corners J&M to match exactly, and get edges JM to lie exactly together.'

After that the rest was a piece of cake, thanks Gerald!:)

Wed 10 November 2010, 05:30
"the answer lies within the person asking - the response is often a choice between perfection and lazy" (that was from some proverb I read while in college.....lots of stuff stored in my head that often never gets out):rolleyes:

Gerald D
Wed 10 November 2010, 07:28
Well, if you are cutting lawn figures (reindeer, sleigh, santa claus), then the .013" (.33mm) is absolute perfection! :)

Wed 10 November 2010, 07:33
I hear you loud and clear! :)
Thanks for all you do Gerald.


Wed 05 September 2012, 23:59
I recently had cause to recheck my machine after a move. I was not confident in the position of my end stops. I scored a rectangle in the table surface using the router and measured. The pairs of edge measures were spot on but the diagonal measures were off by 3mm. The even edge measures told me I had a parallelogram (i.e. a "fallen over" rectangle). I confirmed this by checking the rails were parallel, but I couldn't figure out how to shim the y-axis bearings to reduce or remove the error (actually I managed to increase the error in my first "use logic" effort.

I tried to draw the parallelogram using CAD tools. Forget it at my level of CAD expertise. Many CAD tools assume 90 degrees, and there's more than one possible position where the measures fit.

Using Pythagoras' a^2 + b^2 = c^2 doesn't work for checking the diagonals because the corner angles are not 90 degrees.

Then I came across some high school maths that helped me calculate the angle:
d^2 = a^2 + b^2 - 2ab cos()

Use the edge lengths for a and b, and the diagonal length for d. cos() is the (acute) angle between a and b. The angle at the other end of the edge is 90-().
Rearrange and use a fancy (mobile phone?) calculator to get arccos(), and you have your angle. e.g.

d^2 = a^2 + b^2 - 2ab cos()
my x-travel is 2200mm; y-travel 1100; diagonal measure 2468:
2468^2 = 1100^2 + 2200^2 - 2 x 1100 x 2200 cos()
cos() = ( 6091024-(1210000 + 4840000))/ -4840000 = 0.008476
() = arccos(0.008476) = 89.51... degrees
I can also determine that the correct diagonal should be 2459.7mm.
Now I have a fighting chance of adjusting the correct shims because I know which way the Y-axis is skewed on the x-rails.

Of course you may be a lot better than me at using a square, or have a fancy 90 degree laser, in which case the above is unnecessary.

Gerald has a nice post above on figuring out how much shimming you need.

Thu 11 October 2012, 20:24
i have some problem the Y
my local wood store have this machines
they suppose to cut on perfect square.
if a order a squared board i can use it for reference. considering that the Y rails cannot be moved.

what do you think?

Gerald D
Fri 12 October 2012, 01:44
Fernando, you will waste a lot of time if you tried to build a square table before doing any cutting. It is much easier to build a table within about 5mm accuracy, and then later you use your own motors to make everything square.