Calibration and Squaring the Machine

From ShapeOko
Revision as of 20:50, 2 December 2015 by Pepik (Talk | contribs) (Diamond Circle Square as 3D Tutorial: spelling)

Jump to: navigation, search

There has been quite a bit of forum discussion on calibration, as well as the posting of some useful G-Code. Notable information thus far:

There are several inter-relating workings of the machine which need to be addressed separately[1]:

  • Calibrate for machine movement in X and Y --- one way to do this is by drilling holes --- measure distance from center-to-center or left-edge to-left edge (or right-to-right) (see Adjusting Steps below)
  • end mill runout / diameter --- cut slots going left to right, back and forth, and at 45 and 135 degree angles --- measure each
  • Perform the Circle-Diamond-Square test (see below)


A quick first pass at determining runout is to simply cut a slot and measure it.

Diamond Circle Square Test

A traditional test of a machine's accuracy and capabilities is to cut a diamond, circle and square, each stacked upon the other. Forum discussion here.

File:Circle-diamond-square-50-45-40mm.txt --- Hand-coded G-code to cut this standard machining test in HDPE using a 1/8" bit @ 355mm/min, w/ 1.5mm stepover and 0.5mm depth advance (the last value is probably too small --- edit the file as needed to suit your set-up). Thickness is appropriate to a "half-inch" cutting board. Code leaves the tool at the end of the path and should be homed before shutting down, and doesn't use a proper finishing pass. Run-time a bit over an hour.

After cutting it, note the orientation and then measure it to determine your machine's run-out and precision. The dimensions of each (less run-out and the diameter of the end mill) will be:

  • diamond --- 40mm
  • circle --- 45mm diameter
  • square --- 50mm on each side

Diamond Circle Square as 3D Tutorial

As a simple and straight-forward form, this test is didactically useful as an exemplar for 3D programs. Here is a list of such tutorials:

Other test files

Other techniques

Cut out the same circle twice from blocks of the same material, mark the two circles as to orientation, then stack one on top of the other and rotate it. Any mismatch indicates a calibration or other issue in the machine cutting accurately.

Adjusting Steps

The numbers for this may be adjusted to make up for belt stretch. X and Y fine Tuning.

An interesting technique which would also calculate runout would be to, "Mill multiple sizes and graph the results as actual/expected. Linear regression will reveal that there is a constant error (cut size not exactly equal to nominal cutter diameter) and a proportional error..."[2]

Squaring the Machine

There are a number of things which all inter-relate to determine how square a machine is. This also determines how level one's work-surface can be, and the two will inter-twine and one may have to iterate between the various aspects of this several times before everything lines up.

Construction levels are typically accurate to 0.0005" per inch at best, roughly 0.024" for 4 feet.

The first consideration is how rigid, level and square the base the machine is mounted to is. One good option for that is a torsion box. While one will be able to machine this work-area (ideally a spoil board attached to the work-area), it is best to begin with the most level and rigid surface possible. One examination of that is the book Foundations of Mechanical Accuracy, by Wayne R. Moore.[3]

Given the precision with which the Aluminum Extrusions are formed, the machine should be quite square when assembled. One interesting technique for assuring this is the use of spring washers.[4] It is possible however, that the extrusion was not cut squarely,[5] if this is the case one will need to either have them machined or use shims.[6]

Once one has a base to place the machine on, one may begin squaring the machine. Improbable Construct's methodology[7] for this is:

  • Square the left Y makerslide to the front extrusion.
  • Then square the right makerslide to the front extrusion.
  • Then check that the X axis is parallel to the front extrusion.
  • There is no need to be concerned about the back of the machine if you square the gantry off the front every time the motors are locked.

This then takes one to the matter of squaring the bit to the table and the balance of the machine's structure, which is “a bit of (a) chicken and egg situation” with two options: Flatten the spoilboard first or square the spindle first?

TWForeman examined this in detail in a series of blog posts:

There was also a very detailed Forum thread (with tables) Accuracy ? Let's try to measure it.

Even in the absence of specialized equipment for measuring, one can still square one's machine using simple, home-made tools such as pinch-sticks, or even with just a piece of string: Re: Squaring the machine. An affordable and elegant option: [8]

Further discussion:

  • Squaring the Shapeoko 2
  • Re: When is a circle not a circle?
  • Re: Help squaring shapeoko
    • ... squared up the ends. After putting everything back together the squareness was better, but still off. So next I put some 0.025" shims between the motor mount plates and V-grove wheels. I put shims on the two front wheels on the left motor plate and two shims in the back wheels on the right plate. This helped some more. After this, over 6" along the y-axis the x-axis was 0.008" out. Then I dialed it in by adjusting the drive belts. A lot of trial and error to finally get it right.

Shapeoko 3

Have you squared the base? I measured corner to corner. I had to use a clamp to bring it into square corner to corner. I was out 1/16" consistently on the base until I completed this. Make sure you are on a level flat surface. I placed the assembly on some 1"x2"x30" MDF runners on my bench so the PEM nuts weren't touching anything and could move with minimal force.

Use a machinist square to make ensure your rails are square to the base. I shined a flashlight behind my square so I could see if I had any gap. I was able to get my Y rails square to the waste board while tightening without removing paint or enlarging any holes. Overall my Y axis rails were within .0015" to the waste board overall. Close enough for my tolerances.

Check all of your steel plates for flatness. One of my Y carriages was not perfectly flat, I did not notice when I was assembling. Trying to figure out how to square the X axis without tearing it down again, I was able to put a block on top of the Y rail between the end plate and Y axis plate on the Side which hit the end plate and uses a quick grip clamp on the side with a gap to pull the X Gantry square. It took a couple of tries, you need to make sure you don't over-do it. It doesn't take much force. Not the most orthodox way to do it but I didn't feel like tearing it down to flatten the plate. I did check my rails and nothing bowed while I did this. I had to use 1-2-3 blocks clamped to the X rail to check square to the Y rails. Using this method got me to be right on for square.

Leveling the Work Area

There have been a number of discussions of doing this on the Forums. There are two basic options, one can adjust the corners where the machine is mounted, or one can machine the work-surface, a process known as “tramming”. It is probably best to do both, but if one only does one, one should ensure that the base which one mounts the machine to is as level as possible, and square the machine to it.

Adjusting the machine

One especially elegant way to do this is to use a caliper in its depth mode, mounting it to the spindle as shown by Claudio in Re: Making a spindle square.


One straight-forward approach is:

  • start to flatten the spoilboard and if I see ridges I stop and make adjustments.
  • start with .1 mm passes to surface the spoilboard but usually end up making adjustments enough times to end up taking about .5 mm off.[9]

Total Indicator Runout over wasteboard

Fly Cutter

A 1/4" shank tool intended for this usage: Micro Fly Cutter[10][11]

A tool suited for this in the stock spindle is a Dremel 115[12]

Software Probing/Auto-leveling

Chilipeppr: PCB Auto-Leveller for ShapeOko / TinyG


Mechanical levelling [13]

Squaring the Spindle

Once all other aspects of the machine have been adjusted to one's satisfaction, one must mount the spindle so that it is square. Discusion of the importance of this in forum discussion: Re: spindle power / feed rate.

Example of difficulties caused: Round is not round.

The professional tool for doing this is a “Spindle Square” --- the design for which is shown in danimal’s Forum post Making a spindle square. A field-expedient way to do this is discussed in the forums: Aligning DW660 to be perfectly vertical --- mount a 1/8" diameter rod in the spindle and bend it with two right angles as shown in:


If video isn't an option, see instead [15]

The actual adjustment can be done using spacers as shown in Re: Bits you use.

Spacing Material

While spacers are a specific category of part, many alternatives can be used:

  • washers, precision or no --- Metric washers come in multiple forms w/ differing thicknesses, manufacturing variations allow fine adjustments
  • metal sheets or foil --- aluminum cans are a useful source, and kitchen supplies can be used. Alternately: Precision Brand Carbon Steel 1008 Shim Stock