Calibration and Squaring the Machine
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:
- Hello World --- the prototypical Hello World file has proven useful for diagnosing Y-axis issues, since the curved forms begin and end at the left-most extrema, so that any racking of the gantry, or backlash along theY-Axis will manifest as visible mis-alignment. Forum discussion in Testing and calibration &c.
- Prototype Calibration Pattern (with G-Code)
- Calibration ruler - a simplistic hand-coded Imperial ruler which may be of use to evaluate Y-axis accuracy
- Accuracy ? Let's try to measure it
- Ran the Circle Diamond Square test - The circle diamond square test (see below) is a traditional machinist tool to evaluate a machine's accuracy
- Visual alignment modification - Advanced calibration for PCB routing.
- TWForeman's blog has a number of helpful posts:
- ShapeOko Accuracy. Really. forum user twforeman was successful at both precision and accuracy, tweaking his Grbl settings to account for the belt stretching? Revisited for his SO3: http://www.shapeoko.com/forum/viewtopic.php?f=5&t=7507&p=60588
- Excellent discussion of leveling an SO3: http://community.carbide3d.com/t/x-rail-not-level/7445/8
There are several inter-relating workings of the machine which need to be addressed separately:
- 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)
- 1 Basic Adjustments
- 2 Runout
- 3 Diamond Circle Square Test
- 4 Adjusting Steps
- 5 Squaring the Machine
- 6 Leveling the Work Area
- 7 Squaring the Spindle
- 8 Spacing Material
- 9 Acceleration and Maximum speed
- 10 Deflection
- 11 Temperature Considerations
- 12 Video
- 13 References
The basic points of adjustment for a machine are:
- Pulley set screws: http://docs.carbide3d.com/shapeoko-faq/shapeoko-3-how-to-check-the-pulley-set-screws/
- V wheels / eccentric nuts: http://docs.carbide3d.com/support/tensioning-eccentrics
A quick first pass at determining runout is to simply cut a slot and measure it and compare it to the endmill diameter.
Alternately, cut a 4" square out of the material in question, then measure both the square and the resulting hole --- half the difference is the effective cutting width, less the endmill diameter is runout.
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. NOTE: This file was originally used with GrblController and seems to not work with Carbide Motion.
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:
- Inkscape and MakerCAM --- Tutorial CAD/CAM 3D Diamond-Circle-Square InkScape/MakerCAM
- OpenSCAD (incomplete, needs a link to processing the .stl using a CAM program)
Other test files
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.
Good dimensions in X and Y, but one diagonal shorter than the other: the machine is not square.
The numbers for this may be adjusted to make up for belt stretch. X and Y fine Tuning. Official Carbide 3D page: http://docs.carbide3d.com/shapeoko-faq/how-to-calibrate-the-machine-for-belt-stretch/
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..."
http://community.carbide3d.com/uploads/default/54/373405639a1b73fa.pdf --- for the Nomad
Squaring the Machine
Note that while some folks have used a ratchet strap to bring a machine into square, this is not recommended as a usual technique. Please check in with email@example.com before doing so.
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.
Simple way to check squareness of extrusion cut: http://www.shapeoko.com/forum/viewtopic.php?f=37&t=8248&p=64607#p64607
The important things to check are:
- Y rails are parallel to each other
- Y rails parallel to the base plate and the same height on all four corners
- X rail is perpendicular to the Y rails
- Both ends of the X rail are the same height above the base plate
- Z rails are parallel
- Z rails are perpendicular to the base plate
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.
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. It is possible however, that the extrusion was not cut squarely, if this is the case one will need to either have them machined or use shims.
Once one has a base to place the machine on, one may begin squaring the machine. Improbable Construct's methodology 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:
- Circle Diamond Square (initial measurements and adjustments)
- Even more accuracy for the ShapeOko (squaring the machine using a dial indicator and shims)
- Something, ShapeOko, something, something, accuracy (examination of the difficulties in evaluating accuracy)
- ShapeOko Accuracy. Really. (calibrating the machine by measuring holes and adjusting the # of steps/mm)
- ShapeOko Rebuild (rebuilding a ShapeOko 1 to use the new motor mount plates)
- Circle-Diamond-Square Redux (consequences of even small inaccuracy in machine setup/adjustment)
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: http://www.rockler.com/square-check-for-tape-measures 
- 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.
Drilling holes and measuring
Excellent technique for this described at: http://community.carbide3d.com/t/what-is-square-for-so3/5480/14
Further discussion at: http://community.carbide3d.com/t/squaring-s3-xxl/8174/6
Squaring Gantry to Front/Rear Plates
- Loosen all of the screws that hold the gantry together (4 on each side), these should still be loose from the initial assembly.
- Loosen the screws that hold the Y axis rails in place (16 total). These should also still be loose from the initial assembly.
- Slide the gantry to the front, so both Y plates are touching the front plate.
- While holding the gantry against the front of the machine tighten the front of the Y rails (8 total)
- Now - systematically begin tightening the 8 bolts on the gantry. Work your way from left to right, going back and forth in a X pattern (similar to tightening the wheel of a car).
- After the gantry has been secured, slide the gantry to the rear of the machine and tighten the 8 screws while keeping the gantry pressed against the rear plate
Be certain to loosen all the screws.
In some instances shimming extrusion ends/plates, or drilling/filing out holes in plates has been necessary.
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.
http://community.carbide3d.com/t/novel-way-to-get-a-headache/4789 --- flow chart and discussion (and link back here)
- http://community.carbide3d.com/t/wasteboard-plans-with-threads/3544/19 --- includes Carbide Create files: S3 BED LEVEL.c2d, S3 GRID 1 inch.c2d, 4 Clamps.c2d
- XL: http://community.carbide3d.com/t/notes-on-rapid-positions-and-wasteboard-leveling/8131 SO3_XL_810x366_5.c2d
- 3/4" door hinge mortising bit is a suitable option easily sourced.
- https://www.amazon.com/Amana-Tool-45560-Mortising-Cleaning/dp/B000P4O9CG 
- https://www.amazon.com/Amana-Tool-Spoilboard-Surfacing-Rabbeting/dp/B00O4TEBT4 
- Whiteside 6210 
- https://www.woodcraft.com/products/freud-16-106-mortising-router-bit-1-4-sh-1-1-4-d-29-64-cl 
- https://www.woodcraft.com/products/6210-cnc-spoilboard-surfacing-router-bit-1-4-shank 
- https://www.toolstoday.com/p-5785-insert-spoilboard-surfacing-rabbeting-flycutter-slab-leveler-surface-planer-and-bed-skimming-router-bit.aspx 
- 6mm collet option: http://www.banggood.com/6mm-x-22mm-Router-CNC-V-Groove-Bottom-Cleaning-Bit-Milling-Cutter-p-981850.html 
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 http://www.mylespaul.com/forums/luthiers-corner/179154-drill-press-101-a.html 
The actual adjustment can be done using spacers as shown in Re: Bits you use.
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
Acceleration and Maximum speed
Conventional wisdom for stepper motors is to increase the acceleration until the motors can't keep up, then reduce to half. Then increase the maximum speed until the motors can't keep up, then reduce by ~25%).
Answer on 3D printing StackExchange: http://3dprinting.stackexchange.com/questions/212/how-do-i-determine-the-acceleration-value-for-my-printer
It may be useful to measure the force which the motors can exert, then compare that force to how much various aspects of the structure will deflect. Useful tools for measuring this:
- https://www.amazon.com/Newton-Force-Meter-Spring-Scale/dp/B00VYNT6Q6 --- also useful for measuring belt tension
Excellent discussion of this, w/ hard numbers on thermal expansion from an engineering handbook: http://community.carbide3d.com/t/shapeoko-cold-climates-is-it-a-concern/3406/3