4 Axis CNC Machining
4 Axis CNC Machining
Definitive Guide
This is my complete guide to 4 Axis CNC Machining in 2020.
In this brand new guide you’ll learn:
Why to use a 4th Axis
How a 4th Axis Works
4 Axis CNC Workholding
4 Axis for CNC Routers
DIY 4th Axis
So if you’re thinking 4 Axis CNC might be for you, you’ll love this guide.
Let’s get started.
Contents
Chapter 1
Introduction to 4 Axis CNC
Chapter 2
4 Axis CNC Workholding
Chapter 3
4 Axis CNC Programming: G-Codes
Chapter 4
How a 4th Axis Works
Chapter 5
4 Axis CNC Router Work
Chapter 6
4th Axis Fixture Ideas
Chapter 7
DIY 4th Axis Design Notes
CHAPTER 1:
Introduction to 4 Axis CNC
4th Axis machining is an interesting and important sub-part of the CNC milling
world. Haas actually got it’s start building a 4th axis before it ever built entire
CNC machines (pictured on the right). This is an article series to help beginners
understand how and why a 4th Axis is used on CNC Mills. In the first installment,
we’ll look at what a 4th axis is used for. In the second, we’ll look at how they work.
If you’re new to CNC, your first impression may be that the 4th axis is used in the
same way a rotary table is used for manual machining. Indeed, there are many
projects out there where someone converted a manual rotab to become a 4th axis.
While there is a grain of truth to this idea, largely it’s incorrect.
Most manual machining 4th axis work is about cutting features along an arc,
something that’s hard to do with a manual machine. With CNC, cutting along an arc
is easy–that’s what the G02 and G03 g-codes are for. There are cases where we do
continuous machining with a 4th axis–in other words, we want the cutter to be
machining as the 4th axis turns. But there are also many other applications.
Let’s go over three major categories.
4th Axis Indexing for Access
First thing to talk about is this term “indexing”. A 4th axis is typically either used in an
“indexing” mode or a “continuous” mode. When indexing, no cutting happens until
the 4th axis is stopped (and often locked with a brake of some kind). In fact, there
are some types which are called “indexers” that can only be used to index in fixed
degree increments rather than continuously rotating to any desired position. By
contrast, “continuous” means that machining happens as the part is being rotated.
For example, to produce a cam lobe.
You may wonder why you’d ever want anything but continuous machining, but bear
with me–there are lots of useful ways to take advantage of indexing. Also, you’ll
need much fancier CAM software to program continous machining. It’s very
powerful, but plenty of work (perhaps even the majority of 4th axis work) is done
simply with indexing.
The most obvious case for indexing is to gain better access to the part. Suppose
you’re making something complex, like a gear:
Machining a gear with a 4th axis…
The 4th Axis indexes each tooth into position, stops, and then the cutter makes a
pass back and forth until the tooth is done. They the next tooth is indexed into
position.
Gears are kind of an extreme case because it would be hard to imagine how to make
one if we couldn’t index the teeth. But, there are much simpler cases where indexing
is also extremely helpful. Suppose you have a part like a throttle body that has holes
on all sides. You could build fixtures and do a bunch of setups, one for each side.
Or, you could also use a 4th axis to index the sides so more than one can be
machined with a single setup.
In a future article, we’ll get into programming 4th axis indexing.
4th Axis Indexing for More Parts
They say that Horizontal Machining Centers can be tremendously more productive
than Vertical Machining Centers. One reason is that the chips are easier to keep
clear on a Horizontal since gravity is helping rather than forcing them further down
into the hole where they’re harder to get at. But another reason is that almost any
Horizontal Mill has a 4th Axis Tombstone arrangement:
CHAPTER 2:
4 Axis CNC Workholding
It should come as no surprise that 4th Axis workholding is pretty similar to
workholding on a plain old mill table. Heck, many Horizontal Mills don’t have
anything but a palletized 4th Axis Tombstone as their “table”.
So, we’ll work through the workholding options and they’ll seem pretty familiar.
Can be time
consuming to
individually
adjust the
jaws, but will
result in high
precision.
Can hold
4-Jaw pieces offset
High High Medium
Chuck for turning
cams or
eccentrics.
Can hold
irregular
shapes and
square or
rectangular
stock.
Great for
irregular
shapes.
Involves
clamps like a
Varies
Faceplate milling
w/ Medium Low
Turning setup. May
Setup
need
counterweigh
ts to keep
things
balanced.
The modern
alternative to
turning
between
centers.
Instead of
using lathe
dogs, which
are kind of a
nuisance to
set up, the
constant face
system uses
Constant
hydraulic or
Face High High High
other force to
Turning
grip and
drive the
spindle end.
You can now
buy these
systems
relatively
cheaply on
eBay (see
seller
800Watt who
sold me
mine).
These work
from the
inside out
rather than
Expandin
High High High the outside in
g Arbors
but are
otherwise
much like
collets.
“Repeatability” applies to the ease with which you can remove a part and put it right
back into the chuck in exactly the same position so you can continue machining. It’s
a big factor to consider, but typically isn’t as important for 4th Axis work as it is for
turning. When turning, for example, you often have to swap a part end for end, or
you may have to take an existing part and put it in the lathe to rework some aspect.
With a 4th Axis, you will often just stick in a piece of raw material, in which case
Repeatability is not a factor. Hence the ubiquity of the relatively non-repeatable 3-
jaw chuck for 4th Axis work.
Turning between centers happens fairly often with a 4th Axis just because you have
to make sure you’re supporting any part with significant overhang out at the end too.
How much is significant? I was taught 3 or 4 diameters was about a much as you
want to hang off the chuck on a lathe before you start looking for more support.
Collets are really nice for turning work (hence the ubiquity of the old Hardinge Lathes
and their 5C collet system). They get high marks on just about every aspect. It’s no
coincidence that the original Haas 4th Axis had a 5C indexer:
CHAPTER 3:
4 Axis Programming: G-Codes
The G-Codes needed to program 4th Axis motion are pretty simple, and logically
follow the g-codes needed for 3 Axis CNC Motion.
Let’s start with an axis diagram that makes it easier to see what’s going on:
The first 3 Axes are the familiar X, Y, and Z. The A and B axes are potential 4th
Axes. If the machine has both, it is a 5 Axis CNC Machine.
In other words, you can choose to install your 4th Axis as Axis A or Axis B. The
convention is that A has an axis that spins about the machine’s X axis and B spins
about the machine’s Y axis. In practice, since the 4th Axis is usually removable,
most of the time you’ll refer to it as the A-Axis whether it is aligned with respect to X
or Y. Aligning to X or Y is just a decision you’ll make based on the job you’re doing.
Let’s assume you choose to set your 4th Axis up as “A”. Then you can simply refer
to is as such in G-Code. So, for example, you can rotate to the 0 position via “A0”.
What About Units?
X, Y, and Z moves are expressed in inches or mm depending on which unit system is
in effect.
For rotational axes (which you’ll only be using on a 4 or 5 axis machine), we don’t
use dimensions for the units, we use angles, typically in degrees. Rotating the 4th
axis to the 90 degree position might be done as A90, for example.
Incremental vs Absolute and Offsets
With most controls, 4th Axis coordinates get all the tricks regular coordinates have
available. So, for example, you can use Absolute or Incremental Coordinates.
Work Offsets will contain not just an XYZ but also the 4th Axis coordinate. You can
imagine if you’ve got a tombstone with parts on 4 sides, you might want 4 Work
Offsets set up to correspond to each of the 4 sides of your tombstone. And, if you
there are 4 parts on each side, you might also have 4 sides times 4 parts or 16 work
offsets.
With those 16 work offsets, you can create 1 part program in your CAM software, set
it up as a subprogram, the set the work coordinate, call the part subprogram, set the
next work coordinate, call the subprogram, and so on, to make all 16 parts.
Part Zero in 4 Axis CNC Machining
Part Zero is, of course, the origin, when programming your part. It’s 0, 0, 0 when you
drew the part in your CAD program or set up the origin in your CAM software.
When 4th Axis programming, it is often convenient to have a part 0 on each indexed
face of a tombstone, for example. That way you can use Work Offsets as described
above.
That makes sense for 4 axis CNC indexing. But, when doing continuous 4th axis
machining, it might make more sense to have the axis the 4th spins on be 0.
Choosing part zero for continuous machining will require that you be very familiar
with your CAM software.
Programming for Continuous 4th Axis Work
The brings me to a discussion of programming for continuous 4th axis work.
That’s the most complex kind of 4 Axis CNC Machining. It’s not something you will
typically do by hand coding g-code. Instead, you will use one of 2 kinds of software
to help.
4 Axis Wrapper Software
4 Axis Wrapper Software is the simplest way to do a little 4 Axis CNC Programming
for continous work. In essence, you program the work on a flat XYZ plane. For
example, you might create some sort of text engraving. The 4 Axis Wrapper
Software will then transform that g-code so it is wrapped around a cylinder of a
particular diameter.
Fusion 360, a popular CAM package, can do 4th Axis Wrapping.
4 Axis CAM Software
Wrapper Software can be useful, but clearly it has many limitations. To do true 4
Axis Continous Contouring requires 4 Axis-capable CAM Software.
Fusion 360 does not only wrapping, but continuous 4 Axis CNC Machining. Here’s a
quick video showing Fusion 360’s 4 Axis Features:
CHAPTER 4:
How a 4th Axis Works
In this chapter, I want to talk a little bit about the mechanics of how a 4th Axis works
and what’s inside one. We have a lot of readers who are interested in the details and
even in building their own 4th axis.
To create a 4th Axis basically requires that the axis be well mounted so it can spin,
and that there be some means of controlling that spin via g-code program, preferably
with as little backlash as possible–backlash is the enemy of CNC. The mounting
process is not unlike mounting a spindle. Typically there will be a shaft between
bearings. I suppose you could even contemplate sleeve bearings as opposed to
precision angular contact bearings, although the latter are standard industry practice.
Tapered roller bearings can also work reasonably well for a 4th axis. There are
some cases I’ll get to where the 4th Axis is analagous to a lathe headstock, so that’s
another way to think about it.
Let’s dig into some of design issues and mechanism types for a 4th Axis:
CHAPTER 5:
4 Axis CNC Router
For the most part, the principals of 4th Axis use with a CNC Router on wood are
much the same as the more metal-focused articles that have come before. We’ll
focus on how it all looks on a CNC Router as well as common applications for the 4th
Axis on a CNC Router.
You can mount a typical 4th axis on a router table and go to town:
This sort of thing is ornamental turning work, and in fact, it is common to refer to the
4th Axis as a “Lathe Attachment” in the CNC Router world. Here’s a video showing
one of my favorite style lathe attachments which involves mounting the 4th axis
permanently alongside the table:
A 4th Axis installed on a CNC Router…
The video shows a lot of the typical pineapple and other shapes common to
ornamental turning. Slinging the workpiece alongside the table allows for quite large
work to be done and gets away from the Z-travel limitation that many router tables
have.
CNCZone has some neat pictures of a DIY lathe attachment for a CNC Router:
His solution for low backlash gear reduction was to build a “gearbox” using timing
pulleys. Clever!
Here’s a video of some 4th axis work on a CNC Router to create a gunstock. Very
cool work:
Some great how-to tips in this video of making a gunstock with a 4th axis…
One of the most exacting and beautiful uses for CNC 4th Axis Woodworking is inlay
work, particularly for custom guitars, pool cues, and similar work. We’ll close with a
video of some of this type of work:
Custom pool cues made with CNC…
CHAPTER 6:
4th Axis Fixture Ideas
Here’s a compendium of ideas for 4th axis fixturing that will save time and help make
your jobs more profitable.
Quickie: A lot of 4th Axis and Indexers have an MT taper hole in the center.
Purchase a few MT toolholders and you’ve got quick change holders for small parts
on your 4th axis!
A quick way to access a lot of small parts with a Fourth Axis. The cylinders can be
swapped out quickly for almost palette-changer like setup times.
Another cylindrical fixture for small parts. Note the washer cutout. Loosen the bolt
1/4 turn, slide the washer off, and the center hole allows the fixture to be removed
and swapped for another quickly.
Lots of small parts in a fourth axis fixture with pneumatic clamping…
Another setup for making lots of small parts. It overhangs the 4th and the tailstock so
the tombstone can use the full travels of the machine for maximum production…
Depending on your application, it makes sense to think about how to make setup
faster. Dialing in the fourth axis and tailstock can be a pain, but if you have a fixture
plate, you can set up for drop in repeatability. Next question is how to repeat
installing you fixtures on the fourth axis? This picture shows one of two Jergens Ball
Locks that are used together with two 3/4″ dowel pins (one right below that ball lock
in the pic) to provide the fixture plate equivalent of drop in repeatable setups on the
fourth axis.
This shop-made fourth axis tailstock that goes with the same Jergens locked
tombstone above has some cool ideas. There’s a pin operated by the lever that
engages an angular contact bearing in the tombstone.
On the other side of the tailstock is a little movable v-block that holds the tombstone
until the sliding ballnosed pin can be engaged to hold it securely. Very well thought
out!
Here’s a neat fouth axis fixture with 5C collets from PAWS workholding…
For this part, access on the two sides was important, and the fourth axis makes that
easy. Note the lever to release the pneumatic lock on the left.
Fourth axis fixture clamping round stock from the side…
Very slick tombstone trunnion from Stevens Engineering has quick locks for fixture
plates.
Another neat fixture from Stevens Engineering. If you’ve got a big enough machine,
mount 3 two-station vises!
Check out the uniforce clamps on this fixture for holding small parts.
Here’s a very special fourth axis fixture from Intellitool. Parts are supported via V-
block cradle and individually hydraulically clamped.
What kinds of neat fourth axis fixturing have you used on your jobs? Share
some examples in the comments below!
CHAPTER 7:
DIY 4th Axis Design
For the DIY CNC’er wanting to construct there own 4th Axis, here’s are some design
notes that will hopefully save time and result in a better 4th axis.
The first decision to make designing a fourth axis is whether you plan to build it
around a rotary table with its associated worm gearing or not. Taking that approach is
probably the fastest and easiest route, but it will have major shortcomings associated
with backlash.
The worm gears in import rotabs may actually have quite a bit of backlash. You can
try to adjust it out, and often that results in binding, which can be overcome with a
honking big motor, but which will eventually wear out your worm. In the meanwhile,
rapid wear will keep you busy readjusting it frequently.
The fancier approach is to use a Harmonic Drive. These are zero backlash devices
invented back in the 50’s for Defense applications. They’re common in CNC and
robotics, because they are compact and can have pretty high drive ratios. The other
approach one could take is to either direct drive, or use a timing gear pulley setup
such as you would often use to gear down the X, Y, or Z axes. I’ve seen really cool
4th axis setups built in this way out of spindexers or even small lathe headstocks, as
well as from scratch.
Since there are a lot of trade offs flying around, I put together a quick calculator in
Excel that you can download to do some back of the envelope calculations for the 4th
axis. It looks like this:
Avoid messing with the blue numbers, they’re formulas. Instead, enter your drive
ratio for either a Harmonic Drive or the worm gear setup on your rotab, any additional
timing pulley ratio, whether you will use a Step or Servo motor, and lastly the motor’s
torque. The calculator will do the rest and will even let you compare your design to a
Haas HRT160 indexer. The numbers I show in the example above represent the
design I will likely follow for my own project. I snagged some 80:1 ratio Harmonic
Drives on eBay that are brand new:
Harmonic Drive Systems CSF-20-80-2A-GR-SP NEW IN BOX!
I bought two of these units. They were not cheap, but not really egregious either and
a Harmonic Drive is just the ticket for a really slick 4th axis. It would be cheaper to
use a step motor, so I am still dithering about that, but the engineering calcs show a
servo. Performance if I apply an additional 2:1 reduction with a timing pulley setup
will be pretty comparable to the Haas. There’s oodles of holding torque available with
the high drive ratio and the big servo, so I don’t know if it is worth adding a brake. I’ll
probably set up the design to accomodate one and then wait to see if it is needed.
My thinking is a motorcycle disk brake caliper and a custom rotor would be an easy
add-on, although it may be even easier to fabricate a screw-driven caliper:
Being able to lock the axis opens up some possibilities…
Love the two speed belt drive too!
The starting point of a project like this is a spindle and bearings. Essentially a lathe
headstock is being built, and there have been 4th axis projects based on lathe
headstocks. My plan for this one is to use bronze bearing sleeve press fit into
aluminum. Lots of reports of how nice and tight older lathes with bronze bearings run.
It’s cheap and easy for a project like this too. The chief disadvantage is if you need to
run a lot of rpm, but the bronze with drip oiling is certainly good to 2000 rpm or so.
I’m not really working too hard at making my 4th axis act as a lathe, so I should be
fine.