A CAD render of the full CNC machine seen from a low front corner, with an aluminium extrusion frame around it and a stand of panelled bays below

Machine tool designDrawing 32 of 47

3/4/5-axis
CNC machine

A CNC mill I'm designing from scratch, so I can make the parts I want. The table on top lets it machine plates, and there are three bays underneath: one for the tool changer, one for 4-axis machining and one for 5-axis machining. It's still in development. So far it's about 40 hours of general design and about 60 hours of research and development, I expect it to cost around $7,000 to build, and I plan to build it within a year.

Sheet 02 of 11/The brief

What it has to cut

I sized the machine for three jobs: aluminium plate parts up to 30 mm thick, one-off prototypes in mixed materials, and carving foam for molds. The trunnion adds tilted plate and block work on top of that.

An isometric CAD render of the CNC machine from above, with the gantry at the left end of the bed and the granite slab around it
PL 03From above the front corner. The gantry sits at one end of the bed and travels along it.
An isometric CAD render of the CNC machine from the rear corner, with the screen on its arm to the left
PL 04From the back corner, with the operator screen on the left.

Sheet 03 of 11/Layout

Why the gantry spans the short side

The gantry spans the 600 mm side of the work area and travels along the 1000 mm one. How far a beam bends goes up with the cube of its span, so spanning 600 mm instead of 1200 mm cuts the bending by 8x.

The table stays still and the gantry moves. A moving table would have needed about 2 m of floor to travel through, and at a 600 mm span it wouldn't have made the machine any stiffer.

A top view CAD render of the CNC machine, with the gantry across the short side of a white vacuum plate and bare granite beside it
PL 10Plan view. The gantry spans the short side of the vacuum plate and travels along the long one, and the rest of the granite is open.
A close CAD render of the gantry: a grey side plate with bolt holes, the beam carrying two rails, and the spindle hanging over the white vacuum plate
PL 12The gantry up close, with the side plate, the beam and its rails, and the spindle in its bracket on the Z axis.

Sheet 04 of 11/Stiffness

What bends the most

Every part of the machine bends a little, like a spring, and the springs add up in series, so the softest one decides how stiff the machine is. With a 6 mm tool, the softest spring is the cutter itself.

Cutter stiffness, carbide as a cantilever, 3EI/L³
CutterStickoutStiffness
6 mm carbide20 mm5.9 N/um
6 mm carbide30 mm1.7 N/um
10 mm carbide25 mm23.2 N/um
12 mm carbide30 mm27.8 N/um

A 6 mm cutter sticking out 20 mm is softer than the target for the whole frame, so the frame stops at 8 to 12 N/um instead of going all the way to 20. The cheapest stiffness on the machine comes from shortening the stickout. Pulling the same 6 mm tool in from 30 mm to 20 mm makes it 3.5x stiffer.

Sheet 05 of 11/Frame

Frame and accuracy

The first spec called for welded steel tube filled with epoxy granite. I went with bolted 80x160 aluminium T-slot instead, with sand or resin fill for damping. At a 600 mm span the joints are weaker than the beam, so every joint gets a gusset.

The accuracy budget comes out around 0.05 to 0.1 mm, which is good for a hobby mill but falls short of a precision machine. The biggest single source of error in it is heat. An aluminium frame grows about 0.14 mm over its travel for every 5 °C.

A front elevation CAD render of the CNC machine inside its extrusion frame, with the gantry at the left end
PL 06Front elevation, looking along Y. The gantry side plate and the Z column sit on the left, over the X rail.
A back elevation CAD render of the CNC machine, with the gantry at the right end and the screen on the left
PL 07Back elevation. The same machine from behind, with the screen on the left.

Sheet 06 of 11/Motion

How the axes move

X runs on two ball screws with one motor on each side, slaved together in software, so the machine squares itself off two home switches every time it powers on. The motors are NEMA 34 closed-loop steppers, 12 Nm on X and Y and 6 Nm on Z. Every driver's alarm output is wired back to the controller, so a stalled axis stops the job instead of scrapping the part.

The Z motor has a brake built in. The spindle and its plate come to about 30 kg, and that weight back-drives a 5 mm lead screw at only 0.26 Nm. Without the brake, the spindle would drop into the part every time the power goes out.

The Z rails are fixed to the gantry and the blocks ride on the moving plate, so Z is as stiff fully extended as it is retracted.

An end elevation CAD render of the CNC machine, with the gantry beam across the bed and the screen on an arm at the left
PL 08Left end, looking along X. The gantry beam spans the bed, with the Z column at one end of its travel.
An end elevation CAD render of the CNC machine from the right, with the spindle under the gantry beam
PL 09Right end. The spindle hangs under the beam, and the screen arm reaches out to the right.

Sheet 07 of 11/Stand

The stand and the slab

The machine sits on a granite slab, and the slab sits on a 700 mm stand of bolted 40-series extrusion. Granite needs support about every 700 mm, and without it a strip model of the slab sags about 0.7 mm.

The slab only touches 80 x 80 x 10 mm steel pads. They get ground flat to each other after the stand is levelled, so the frame's own flatness can't bend the slab.

Under the table there are three bays: one for the tool changer, one for 4-axis machining and one for 5-axis machining.

Modelling it showed that the 80x80 legs only have four 6.7 mm core bores and nothing in the middle, so a levelling foot can't screw into the end of a leg. Each leg gets a bolted steel base plate to carry its foot instead. As modelled, the stand is 47 parts and 137.4 kg, with zero interferences.

A trimetric CAD render of the CNC machine showing clear hinged doors on the front of the stand and dark panels on its side
PL 05Hinged doors close the front of the stand, and dark panels close its sides.
A CAD render of the CNC machine seen from below, showing the bottom panels of the stand on a grid of extrusion
PL 11From underneath, showing the stand below the table that holds the bays for the tool changer, the 4th axis and the 5th axis.

Sheet 08 of 11/Control

Controller, spindle and the stop button

It runs LinuxCNC on a desktop or mini PC instead of a laptop, through a Mesa 7i96S and 7i76U. Both cards together come to $268. LinuxCNC was the only open-source controller that could handle a 5-axis mill with a tool changer, and it drives six outputs: X, X2, Y, Z, and the trunnion's A tilt and B rotate.

The spindle is a 4.5 kW BT30 tool-change spindle. It's 8-pole for 18,000 rpm, water-cooled, and runs on 220 V single phase. The E-stop is a hardwired button that drops a contactor and cuts the drives and the spindle at the same time, so it still works if the PC hangs.

Sheet 09 of 11/More axes

Adding the 4th and 5th axes

As drawn it's a 3-axis mill, and the 4th axis has its own assembly started in the model. For five axes, the plan is a trunnion I build myself, tilting on A and rotating on B. The trunnion has to fit in whatever height the frame leaves, so the frame doesn't have to wait for it. The 4th axis and the 5-axis setup each get their own bay under the table.

The main limit on five axes is the CAM. LinuxCNC runs 5-axis code fine, but generating that code takes expensive software and real skill.

REF 13Trunnion, general arrangementassets/projects/cnc-machine/13-trunnion-general-arrangement.webp

Sheet 10 of 11/Tool changer

Tool changer and rack

The tool changer gets its own bay under the table. There's no published drop-in rack for BT30 tools, and every fully documented build uses ISO20, ISO30 or TTS. I've started a tool mover assembly in CAD, and the rack spacing has to wait for the spindle nose drawing.

A CAD render of a gantry CNC machine: a grey gantry side plate and beam, a vertical Z column with the spindle, a white vacuum plate edged with pleated panels, and a screen on an arm at the right

Sheet 11 of 11/Status

Where it is now

Nothing's been built yet. Everything on this page is the SolidWorks assembly and the sizing behind it, from about 40 hours of general design and about 60 hours of research and development. I expect it to cost around $7,000 to build, and I plan to build it within a year.

The plan is to prove it with cut tests instead of calculations. I'll shim the rails to a straightedge, push on the spindle nose and measure how far it moves, run a ballbar, and then step up the depth of cut in 6061 until it chatters.

PL 01The main assembly as of September 2026, with the gantry, the Z column and the spindle over the vacuum plate, and the operator screen on its arm on the right.