Introduction: Lessons Learned From Small-Scale CNC

About: Engineer, designer, machinist, welder, guitarist, woodworker, amateur astronomer, and general analog hacker. Based in Detroit, Michigan.

There are plenty of resources, both in print and on the web, that detail the basic construction and design of small-scale CNC routers. The purpose of this instructable is not to present comprehensive instructions, but to share some of the more subtle lessons learned during the construction of my machine; these are they types of details that are frequently left out of the more "start-to-finish" style directions. I don't claim to be an expert on CNC machine design, nor am I a master machinist, but I did manage to build the machine pictured, and it does consistently cut parts that are dead-on accurate to the resolution of my measuring tools. I hope this information proves helpful.


Miscellaneous supplies - not an exhaustive list:

- 18 gauge shielded security wire, four-conductor plus drain wire for motors

- 18 gauge shielded security wire, two-conductor plus drain wire for limit switches

- GT2 belts and pulleys

- RCA jacks and plugs

- Top-adjustable leveling feet

- Two-flute 1/4" HSS end mill for use in a large fixed-base router for truing-up aluminum

- Aluminum beverage cans for 0.1mm shim material

- HSS counterbore set

- Electrical crimpers and terminals

- Optical center punch

- Vernier scribe

- Tapping guide

Step 1: Chassis Structure and Gantry - Bolted Joints Through Tubing

One thing that I have noticed is that a lot of small machine designs use 1/2" aluminum plate for the gantry arms and end plates. While aluminum is fairly rigid stuff, 1/2" solid plate has the disadvantage of being relatively flexible for its weight, because of it's flat profile. I substituted 2" x 4" rectangular aluminum tubing with 1/8" wall thickness for the more common 1/2" flat stock. This saves weight on the gantry and is actually more rigid than flat stock. The difficult part in making practical use of this rigidity is in the bolted attachments, which need to distribute load across both faces of the tube in order to produce a stiff, reliable joint.

To do this, I needed to produce internal spacers that were a precise fit between the inner faces of the tube. The spacers have the same inner diameter as the threaded fasteners that pass through them, and a wall thickness of approximately 2-3mm (depending on the fastener). Since the tubing I was using was 2" across, with an 1/8" wall thickness, this meant I needed to make short lengths of aluminum tube exactly 1.75" long, with accurate and square ends. These pieces needed to be very precise - too short, and they wouldn't touch both faces of the tube, and too long would make them impossible to slide into the tube in the first place.

An expert machinist could likely do this on a lathe, but my lathe skills aren't that good. I opted to instead cut the tube slightly long (say, 0.020" oversize) and then stick each piece into the chuck of my drill press. With the drill chuck spinning at low speed, I used a block of steel with a piece of 150-grit sandpaper glued to it to gradually reduce the length of the tube. By a series of grind / remove / measure iterations, I found I could quickly get the pieces down to within 0.001" of the nominal length, as checked with a set of dial calipers. After a period of experimentation, I learned how long I needed to hold the abrasive block to the spinning aluminum to remove a given amount of material.

The finished spacers all fit into the rectangular tubing, but were still tight enough to hold their position under their respective holes.

Step 2: Drive System - Belts and Pulleys

Small machines commonly use a "direct drive" architecture in which the stepper motors are connected directly to the ball screws that drive the motion of the gantry. This is a simple design, and is generally very robust, but it has a couple disadvantages:

- the overall ratio of the stepper to the ball screw is fixed, so if you need more torque you must install a different stepper motor, and if you want more speed, you need a faster-pitch ball screw

- the failure mode for a hard-crash condition is generally to stall the stepper motor or to break something

- the stepper motors stick out the ends and top of the machine, increasing overall size

Because my shop space is small, keeping the machine as compact as possible was a priority for me. I was also unsure of how much torque would be required to cut, and wanted a "tuning element" in the system that would allow overall changes to speed/torque. To achieve these goals, I opted to couple the stepper motors to the ball screws using 9mm GT2-profile belts and pulleys.

GT2 belts are commonly used as the main drive elements in 3d printers. They are readily available, quite stiff, and have high force capacity for their size. Because the belts are quite short, deflection in the system due to belt stretch seems to be so low as to be undetectable - I've tried to measure it using dial indicators and a DTI, but it seems to be below what I can accurately measure. I have cut test specimens like the one shown to measure as-cut versus nominal dimensions, and the results suggest that belt deflection isn't hurting the accuracy of the machine.

The double-pulley arrangement allows the steppers to be mounted parallel to the ball screws, which makes the entire package much smaller as the motors don't stick out. It also allows for easy ratio changes if needed, and in the event that something goes horribly wrong, I would expect the pulleys to give before anything more expensive is damaged - a sort of "mechanical fuse" in the system.

Step 3: Construction: Drilling Accurate Holes

Aluminum is a beautiful material to work with, as it cuts almost as easily as wood, but is much stronger and more stable. Unlike wood, though, it requires accurate bolted joints and doesn't accept adhesives well. To hold the entire machine together, I became skilled in drilling accurate holes.

First, drilling holes accurately is something that is much easier said than done. Methods using rulers, tape measures, pencils, and sharpie markers are not capable of consistently producing accurately-located holes. I found three tools to be indispensable for this task:

- a Vernier scriber caliper

- Dykem blue layout fluid

- an optical punch

The Dykem blue is an ink that you put on the metal to enable accurate scribing of lines for locating the hole; I use the kind that comes in a "bingo marker" bottle, because history shows that I will generally spill they kind in the larger screw-top bottles. The vernier scriber caliper - which has become one of my favorite tools - allows the accurate scribing of lines with an accuracy of down to 0.001" if you're careful. Once the lines are scribed accurately, the final step is the punching of a small divot where the hole is to be located. I have tried doing this in the past using a spring-loaded punch, of a small center-punch and hammer, but I could never consistently locate the dimple exactly where I wanted it. The optical punch solves these problems; you first use the magnifying tool to locate the punch base precisely on the scribed lines, and then use the punch to make the dimple in exactly that spot.

Once the dimple is accurately located in the metal, I start the hole with a center-drill in the drill press. I typically clamp the work in a "floating" drill press vise (i.e. one not clamped down to the drill press table) for this step, so that the drill can self-locate to the dimple. Once the "starter hole" is drilled with the center drill, finishing the through-hole with a regular twist drill is easy.

A note on drill-press safety: the "floating vise" method can go very wrong if not thought through properly - the danger is that a drill bit can grab the workpiece and spin it around. If the hole being drilled is small (say 3/16" or smaller) the drill press vise is heavy enough that the bit will typically break before it throws the vise around. On larger holes, though, the danger of having a large chunk of cast iron whipping around is real. On larger holes, I clamp a section of square steel tubing securely to the vise, extending rearward and resting against the post of the drill press. This way, the vise can still "float" an enable the center drill to locate to the hole, but there's no way for the vise to spin if the bit should grab. Whatever you do - be careful, and think through how things might go wrong before you start.

In many cases, I needed drilled holes that were threaded. There are lots of ways to do this, but the trick is to get the tap to go in straight. I was pleased that throughout this process I didn't break a single tap, and I think that my use of a tapping guide to ensure proper alignment helped this a lot. For thin pieces with holes on the edges, I clamp a pair of 1-2-3 blocks to the sides to make a wider face for the tap guide to sit on.

Finally, counterbores and countersinks are necessary for joints where the finished surface must be flat. Countersinks usually use a flat-head allen bolt, while counterbores are used with a regular allen-head cap screw.
Regular drill bits are typically a 118-degree angle on their tip. Metric flat-head bolts are typically 90-degree, and SAE flat-head bolts are 82-degree, so regardless of metric or SAE fasteners, a countersink is needed - you can't just use a drill bit. 82-degree countersinks can be had readily from big-box home improvement stores; the 90-degree metric ones are harder to find. Countersinks have the advantage of being self-centering, so if the hole is accurately located, the bolt will be as well. This can be good (if your holes are dead-on accurate) or bad (if they're not). In practice, I found it to usually be easiest to use counterbores and regular allen-head cap screws rather than flat-head bolts. I drill the holes slightly oversize (0.1-0.2mm) to give the parts just a tiny bit of "float", then tweak them to fit during assembly. The set of HSS counterbores I used is by no means a high-end set, but with liberal use of cutting oil (I used Tap-Magic brand) they cut through aluminum cleanly. The advantage of using counterbores is that they allow allen-head screws to sit flush with the surface, which for many parts was essential to the design.

Step 4: Construction: Leveling Feet

There's no point on making a rigid, square, accurate machine if you plan to rest it on a non-planar, out-of-level work surface. Because nothing in my garage is truly square, level, plumb, flat or straight, I decided to include adjustable threaded feet on my machine so that it would be both level and stable when in use.

I used leveling feet with a hex-shaped upper stem. There are other versions that use a slotted- or Phillips-head drive on top of the stem, but the hex makes it easier to apply torque without the tool slipping off the stem.

The use of rectangular aluminum tubing for the end-plates of the chassis made this much simpler. By drilling holes through both the top and bottom surfaces of the tubing, the threaded feet can by adjusted easily, as the inner jam nut can be easily tightened by passing a small socket extension through the top of the tube.

A side benefit of this arrangement is that it makes it easy to see underneath the machine, which is useful in diagnosing strange behavior, odd noises, or other issues during initial operation.

Step 5: Electrical Connections

While it's possible to wire everything direct to your control board, in practice, it's nice to be able to disconnect things for service and repair. To facilitate this, all of my stepper motors are connected to their respective wires with screw terminal blocks. These can be had readily from big-box home improvement stores, and make it easy to disconnect a motor when needed. I used crimp-on fork terminals on the wires to slip under the screws to ensure a solid connection, and to keep everything looking tidy. The control board itself, along with the power supply, a cooling fan, and all the connectors are housed in a box made from 1/2" plywood, with a plexiglass top that allows for visibility of the LEDs on the board.

My steppers were eight-wire NEMA 23 units. I chose to wire them in parallel rather than series, as this provides lower impedance which, in principle, allows for a more responsive motor. The motors are rated at 425 ounce-inches, but I've never had to turn the trimmers on the control board past the 1:00 position; the ball-screw drive is very low-friction and it doesn't take much torque to drive the machine. Keeping the current lower makes everything run cooler, and (in the event that I ever stall a stepper or miss steps on a job) I can always turn them higher if needed.

The motor wires are shielded 4-conductor security wire, with stranded wires for flexibility. The wires connect to the control box with XLR jacks, which are normally used for microphones, but worked well for this application. They have threaded collars that keep them positively secured when attached.

The limit switch wiring is shielded 2-conductor security wire.The limit switches connect to the control box with RCA jacks; originally I used 1/8" headphone jacks, but found that connections were not reliable, as jobs would occasionally fault mid-run due to a false trigger of a limit switch. (My system uses limit switches that are normally closed, so any brief interruption in the circuit is interpreted as a limit-switch trigger event.) The RCA jacks are more robust, and also easier to solder up.

All cables are routed through drag-chain to keep them from getting tangled or caught in moving parts during operation; this also makes the whole wiring job look more tidy.

The only switches on the control unit are a power switch, which is part of a standard computer plug connector, and the reset button, which I generally never use. (If something bad enough to require a reset has happened, I generally just turn off the power.) The emergency stop button is actually wired to the limit-switch connector for the (unused) fourth axis on my control board, so hitting it acts just like triggering a limit switch and kills all motion in the job. I haven't had to use it yet, but it's nice to have. I mounted the e-stop in a metal electrical box that is attached to the worktable that the machine sits one, to make it easier to access in the event that it' needed.

Step 6: Tramming and Alignment

During final assembly, getting everything square and aligned is critical, While one could probably write an entire instructable just on this topic, for the sake of brevity I will point out a few techniques and learnings.

1) have at least one good-quality square (mine is a Starrett) that you know is truly square; many cheap ones are not actually square, which can lead to a lot of frustration.

2) dial calipers are a fantastic all-around tool. The mechanical kind are my favorite, and even my cheap 20-year old ones still check out to be true to 0.001" on a gauge block. I know of no easier way to ensure that rails are mounted parallel to each other than checking them with calipers.

3) a dial indicator is equally useful, particularly when mounted in the carriage of the machine, for checking alignment to the work surface. I made a quick MDF adapter to allow me to mount it in the spindle mount, and this allows easy checking of alignment to the table.

4) a height gauge is a great tool, but a nice one can be quite expensive. I watched eBay for quite a while to find a nice used one; while not strictly necessary, it can be a great tool to have when setting things up.

5) linear rail should slide smoothly and evenly across its length; any binding or resistance is evidence of misalignment. Don't tighten everything down until you have the alignment where you want it. With the ball screws removed, you should be able to push the carriage through the full range of X, Y and Z motion with virtually no resistance if the rails are aligned properly.

6) ball screws are almost frictionless, and generate a lot for force from a relatively low input torque, but they require that that be almost perfectly parallel to the linear rails to work properly. Misalignment is most noticeable when the carriage is near the ends of the screw, near the bearings. To avoid this, design some play in the bearing mounts, and back the carriage all the way to the bearing before tightening down the bolts.

7) listen to the sound of the steppers when doing a long traverse move. The sound should be steady and uniform, with a smooth acceleration and deceleration. If the motors change sound during the middle of their motion, it can be an indicator that they are fighting against friction or mechanical binding.

8) shim stock can be purchased in a "variety pack" of various thicknesses, and is designed for shimming small gaps between adjacent parts. As an alternative, beverage cans are almost exactly 0.1mm thick, and can be easily trimmed to make shims. The only joint on my machine that was designed to be shimmed-to-fit was the X-axis ball screw nut, which ended up taking 3 thicknesses of beverage-can shim to bring it into alignment.

9) Limit switches need to be in the right place in order to work. I made all of mine adjustable; the switches are attached to a "clamp block" that grips the structure just next to the rails. This allows them to be easily repositioned to allow for maximum travel while still serving their function as travel-limiters.

Step 7: Final Thoughts

This was a really fun project, and (for my first CNC build) I was quite pleased with the result. That being said, if I had it all to do over again, there are some things I would consider:

- Using the flat style linear rail instead of round rail would have saved space; the round rail works well but the bearing blocks are rather large.

- I ordered my ball screws and linear rail up-front so I could measure them before completing the final design; in retrospect, I could have added another 75mm or so to the Y-axis ball screw and had additional travel. I may still make this mod in the future, but I wish I had designed around it in the first place. Lesson: complete design, then order parts.

- Using dual X-axis motors would have avoided the need to have the (single) X-axis drive under the table. It works fine in this position, but it's not readily accessible for cleaning/service without removing the table surface.

- This would be even more rigid if I had used steel instead of aluminum...and then using a low-speed spindle would (probably) make it a machine capable of cutting steel. Steel is harder to work than aluminum, but if this machine were steel it would be an absolute brick in terms of rigidity. I may consider this for a future build.

- The operation of the machine is a discipline in itself - just having the machine is one thing; knowing how to make efficient, effective tool paths is something else. I am still learning in this regard, but (coming from experience with 3d printers) I wrongly assumed that generating tool paths for the CNC would be as easy as slicing models for the 3d printer.

I hope that this information will be helpful to anyone else building a home-shop CNC. Best of luck to all!