There are more and more hobbyists building their own CNC machines. In this series I'm going to try to explain the various parts of a CNC machine, how it might relate to the hobbyist trying to build their own, and give examples and pictures where I can. This is going to be a constantly growing article - so check back often for updates and additions!

First off... What does "CNC" even mean?
The letters in "CNC" stand for "computer numerically controlled" - so if you have a CNC Machine, then you have a machine that is computer numerically controlled... Simple enough, right? OK so I understand the computer part, you need a computer - but what's this "numerically controlled" business? Basically what numerically controlled means is that the computer drives the machine using numbers - X, Y, and Z coordinates specifically (and actually sometimes more but that's a topic for later, let's keep it simple for now)

XYZ CoordinatesOh boy, X, Y, and Z coordinates? You remember back in math class when you worked on X and Y coordinates, right? Well if not, basically, THAT world is laid out on a grid of numbers with zero being the very center and the X Axis going east and west and the Y axis going north and south. Going to the east would take your X numbers increasing in the positive, while going to the west would make them decrease going in the negative direction. the same goes for the Y axis, north is positive, and south is negative.

OK, what about this "Z" business? The Z axis represents up and down in our world. with up being positive and down being negative and below the zero.

What does all that mean for CNC? Well that's the basis of it all really! The computer "tells" the machine to go to a certain X, Y and Z position! It's as simple as that! We will get to calibrating a machine and making sure it knows where all the coordinates are, but basically if a computer tells a machine to go to X1.250, or in other words "go 1.250 inches in positive direction of the x axis", then the machine will do just that. How does it do that? you ask? we'll get to that, trust me :)

 

 


 

 

CNC Programming

Continuing our discussion on the basic understanding of CNCs, the next logical topic would be a CNC program. While you could stand at your machine and type individual commands for it to go to a certain XYZ position and do something, and then type another command to have it go somewhere else, this is generally handled by a "program" that you (or some CAM software) would write. Don't worry, we'll get to what CAM is shortly.

A CNC program is nothing more than a list of XYZ coordinates, or moves, that the machine executes line by line. These programs are also called G-Code. G-Code is a standard of instructions that was developed for controlling CNC machines, and there's a lot to learn about G-Code, and you can do a lot more than simple XYZ movements with G-Code. We will get to G-Code as well, but for this simple example, we don't need it yet.

Ok so a simple CNC program might look like this, for this example lets assume we have a CNC router, and that router is above a board we are going to cut, and the TOP of the board is at Z0 (Z Zero) and the board is 1/2" thick

G1Z.5
G1X2.5Y3.6
G1Z-.5
G1Y0
G1X0
G1Y3.6
G1X2.5
G1Z.5

Lets examine this simple program line by line...

G1Z.5 - This line tells the machine to go to the position where .5 or 1/2 inch is in the positive Z axis... what will happen is, if the machine is positioned currently BELOW Z.5 then it will raise the Z axis until it reaches .5" and if it is ABOVE .5 then it will come down. You will normally see a Z movement as the first movement because you'd want to make sure you move at a height ABOVE your workpiece so that you don't make cuts that you're not intending to.

G1X2.5Y3.6 - This line tells the machine to go to the position of 2.5 inches in X and 3.6 inches in Y

G1Z-.5 - This line tells the machine to plunge down into your workpiece 1/2 inch, basically going all the way through it

G1Y0 - This line tells the machine to move to Y0, and what the machine will do, since it's still 1/2" into the piece is rout a line from Y3.6 to Y0

G1X0 - This line tells the machine to move to X0, routing a line from X2.5 to X0

G1Y3.6 - This line tells the machine to move to Y3.6 again, so now we should have a U shape routed out so far

G1X2.5 - This line completes the box by taking the machine back to X2.5, so the machine is now at X2.5Y3.6 basically back where we started

G1Z.5 - This line takes the Z axis back up to a "safe" spot above the workpiece at .5 inches

Ok so basically what this little program has given us is a 1/2" part that is 2.5" wide and 3.6" long - pretty simple, right?

 

 


 

 

CAD/CAM

OK I realize that the last example was really simple, but understanding those basics are crucial to understanding the other more complex parts of a CNC machine.

To sit down and write your own complex program would be difficult, and take a lot of time. So what can we do? We turn to CAD/CAM applications to help us out!

CAD is "Computer Aided Design" and in a CAD application, such as Autocad or BobCad, or a hundred other options, you will DESIGN the part you want to make using lines and arcs, circles, squares, etc... Then you would load that design into a CAM, or "Computer Aided manufacturing" program where it would look at your design and, taking into consideration your router bit size and materials, it will generate the G-Code program for you. All you have to do after that is load that program into your CNC machine and cut away!

There are many CAD applications and there are just as many CAM applications, there are even some that do both the design and g-code generation, such as Mastercam. There are also many FREE CAD/CAM applications that you can use - it all depends on your budget and what you are trying to accomplish. Some programs are geared around making simple 2 dimensional parts, some are mainly for making signs or doing engraving, and some can make full 3D G-Code programs that mill out a 3D shape - of course HOW you cut that out on your machine is another topic that we will discuss when we get to the various types of CNC machines in the next few sections.

 

 


 

 

CNC Parts

OK so we've talked about HOW a CNC machine works with g-code and what "numerically controlled" is, but just how does the machine work - physically?

In this section I'll try to explain the various parts of a basic CNC machine, and a few of the various CNC machine types there are. There are many options for all of the various parts, and we will cover each topic, but this is just a quick overview of the parts.

The basic parts of a CNC machine are:

  • Computer - The computer tells the motors how far to turn, you also need a certain software to interpret the G-Code program and send signals to the Motor Controller
  • Motor Controller - The motor controller interfaces with the computer and the motors, and basically takes the small signals from the computer and turns it into bigger signals to drive the motors
  • Motors - You need a motor for each axis. Most people (at least in the hobby world) use a "stepper motor" because they can be accurately tuned to turn to an exact position
  • Lead Screws - Lead screws are screws attached to the motor via some coupling and when the motor turns, it turns the screw
  • Lead Screw Nut - a Lead screw nut would be attached to whatever you wanted to move, say the X Axis, and when the lead screw turns it pushed the nut, essentially pushing the axis
  • Linear bearings - a linear bearing, or linear motion, is what the axis' will move on, there will be a whole section on linear bearings and the various types
  • Axis - Each axis serves to move the spindle or the table, when the lead screw turns ir pushes the nut that is attached to the axis, so the whole axis moves
  • Spindle - the spindle is like a router, and can even be as simple as a router, that is used to actually mill the workpiece

In the next sections we will go over each item in more detail, but the list above are the basic parts that go into every CNC machine.

 

 


 

 

Computer and Software

Your computer can be nearly anything, some people use regular desktop computers, some use laptops, and some have even written programs for micro controllers (such as the Arduino) that run G-Code, Basically you need something that can convert the G-Code into "steps" to send to the motor controller.

Most people will end up using an older computer that no longer functions as a decent desktop, just about any old "hand-me-down" will do. After that you need some software that will convert and drive the machine.

There are a few options:

  • Mach3 - probably the most popular because it is fairly cheap and fully featured
  • EMC2 - Open source and runs on Linux - this one is also very popular because it's free

There may be more (and I'm sure there is) so when you read this and you know of other CNC controller software - This email address is being protected from spambots. You need JavaScript enabled to view it. so I can add them to my list

 


 
Motor Controllers
 
There are many options in this category, so I'm sure I will miss a lot.
 
Your motor controller is a piece of electronic hardware that will takes signals from the computer and convert them to "steps" that drive the motors. Sometimes the Controller and Motor Drivers are all on one board, and sometimes they are broken up into a board that receives the signals (controller) and boards that drive the motors (drivers)
 
Note - I don't go into Servo controllers on purpose because in my opinion servos are generally out of the price range of most hobbyists
 
Here's a list of the most popular choices for stepper motor controllers:
  • Hobby CNC - An all in one board that you assemble, this is a great product if you don't mind soldering and want to save money in this category.
  • Gecko Drive - A great and very popular choice - the Gecko boards come ready to go out of the box with no soldering or assembly required.
  • There are a lot of various controllers on EBay and your mileage will vary with them
  • Making your own - There are many schematics for stepper motor controllers out there - if you are handy at electronics, this may be the way to go
As with every section, if you know of one I messed, This email address is being protected from spambots. You need JavaScript enabled to view it. and let me know!
 
 

 
Motors
 
There are two types of motors that I've heard of being used in CNC machines. Within those two types there are many variables and different types, so this is by no means a complete, all encompassing list of all features and possible types. This is only to briefly describe the two types of motors.
  • Stepper Motors - Stepper motors are wound in such a way so that they can be controlled in "steps", the controller board sends a "step" to the motors and it's supposed to turn an exact degree. I say "supposed to turn" because there are cases when the motor does not turn and it stalls, and, in my experience, is the biggest problem using stepper motors. Basically, if you try to push your machine too hard or too fast it could stall and ruin your workpiece. Stepper motor systems are cheaper and easier to set up and configure in the long run, which is probably why they are the most popular among the hobbyists. Stepper motors have a speed to torque ratio that looses torque at higher speeds.
  • Servo Motors - Servo motors are more like a standard motor with an encoder that feeds back information to the computer about it's position. If the controller tells the motor to turn a certain distance, it can tell the computer that it's actually gone that distance, so there is less ruining of workpieces. Servos have a more consistent torque at all speeds, but they are more expensive and the setup and controlling systems are more expensive, essentially putting them out of the price range of most hobbyists.
I am sure there are many more topics that can be covered here, again, this is just a basic overview, and there are better sites if you want more detailed information about steppers and servos. Since, in my opinion, stepper motors are more prevalent in hobby cnc machines, the rest of the discussion will be based on stepper motors. You should just know that there are always choices.
 
As with every section, if you have any comments, This email address is being protected from spambots. You need JavaScript enabled to view it. and let me know!
 
 

 
Lead Screws and Nuts - or maybe this should be called "drive systems"
 
Your lead screw / lead screw nut are a very important part of your CNC machine. They are what drive the axis back and forth! The biggest issue with adrive system is backlash - backlash is basically where your nut and lead screw have some play between them - and the problem is when the computer tells the motor to turn the screw and the screw turns but the nut doesn't move (because there's a small amount of play) then the computer "thinks" the table is in a position that it's not. For an example of backlash, thread a nut onto any bolt and, without turning the nut, pull it back and forth - notice the little bit of play the nut has? That's backlash...
 
As will all things there are a few choices in this area too. (Pictures and animation coming soon!)
  • Standard threaded rod and standard nuts - you can get these at your local hardware store, you can get threaded rod in various thicknesses and lengths, it's cheap and quick, but has a high potential for backlash.
  • Acme Threaded Rod and Acme Nuts - Acme threaded rod has a slightly different profile than standard threaded rod, it's flatter and doesn't come to a point like it's cheaper counterpart - it's also manufactured to a slightly higher standard, which means there's generally less backlash.
  • Ball screws - Ball screws are a system in where there are ball bearings in the "nut" that ride along the ball screw track - basically giving you a much less backlash system - but also more expensive and harder to set up.
  • Rack and Pinion - While not a "screw and nut" technically, these are also used to drive a machine back and forth. In this set up a gear is attached to the motor shaft that turns and mates with a toothed rail.
  • Belt and Chain Drives - Again, not technically a screw and nut, but another way to drive the axis of a machine. In this scenario the motor has a sprocket or timing pulley that mates with a chain or belt and drives the axis back and forth.
In my opinion, the Acme threaded rod and nuts win this category. Acme threaded rod isn't that much more expensive than regular threaded rod and there are numerous anti-backlash solutions out there that are priced for the hobbyist.
 
As with every section, if you have any comments, This email address is being protected from spambots. You need JavaScript enabled to view it. and let me know!
 
 

 
Linear Bearings
 
This is a very broad subject, as your options for linear bearings are many. For most hobbyists, making some kind of home made linear bearing is the way to go at first, or finding a good deal on "real" linear bearings on eBay or similar sites. There are many good designs that can be made from regular skate bearings and aluminum angle. It's beyond the scope of this article to try and describe all of the many home made designs or even the many different styles of the ones you can buy, so in this section I will try to explain what a linear bearing is and a few of the different styles.
 
Linear bearings provide free motion in one dimension, or basically they allow your axis to slide back and forth - constraining the movement to that one axis or dimension. For example, the X Axis allows movement in the positive and negative directions on the X line, but it cannot (or should not) move in either the Y or Z directions. if it does then that's called "slop" and that, along with backlash, are the biggest problems your will probably encounter if making your own machine. Slop and backlash cause accuracy problems, for instance if you program a part to be 4" X 4" but you have .01 backlash and your x and Y axis aren't very tight, then you'll likely end up with a 4.02" X 3.97" part instead - and probably skewed and not at all square... Not good...
 
Most of the linear bearing solutions are comprised of the bearing which has the rolling technology and those ride on some form of rail that's stationary and goes along the axis.
 
The few types of linear bearings that I've worked with are
 
  • Roller Bearing - There are many styles of roller bearing, from the home made skate bearings riding on aluminum angle, to V bearings riding on a steel rail
  • Ball Bearing - Ball bearing linear bearings have small ball bearings in the linear bearing that ride in a groove on the rail, these are very accurate, but more expensive for the bearing and the rail
  • Friction Bearings - Friction bearings are just two materials sliding together. Some are made of self lubricating materials such as Delrin or Acetal, but some are also made from steel and cast iron and need some lubricating grease to slide smoothly.
There's a few things in this section that I need to elaborate on, and probably some that I can add as well, but as I said this is an ever growing document and I will be adding as I can and as people This email address is being protected from spambots. You need JavaScript enabled to view it. suggestions :)
 
 

 
Axis
 
Depending on what type of CNC machine you have, your axis description might differ.
 
For a "flying" gantry type of CNC machine - the tabletop is stationary, and the X Axis moves north and south along the table and carries the Y Axis, and the Y Axis carries the Z Axis and moves it east and west, and of course the Z Axis holds the spindle and moves it up and down. In a flying gantry machine you can basically think that the X, Y, and Z axis are moving the spindle north, south, east, west, up, and down...
 
For a stationary gantry machine, the Y Axis is stationary and does not move, and the X Axis actually moves the tabletop that your workpiece is secured to north and south under the Y axis, which still holds the Z Axis, which holds the spindle. A stationary gantry is thought to be more stable, but at the cost of milling capacity.
 
Another machine I want to mention is an X-Y table CNC Milling Machine - in this machine the X and Y axis move the tabletop underneath the Z Axis. Basically the X Axis Moves the Y Axis which holds the tabletop, and the Z Axis is stationary and only moves up and down.
 
and the last CNC machine I can think of is a CNC lathe, which has two axis that move a cutting tool along a spinning part. Moving the tool holder basically the same way a X Y table would, just along a spinning piece...
 
Hopefully these descriptions portray the different parts, but they may be a little on the "loose" side :) Feel free to This email address is being protected from spambots. You need JavaScript enabled to view it. and give me some tips on better explaining them!
 
 

 
Spindles
 
Your spindle is what will actually be driving the bit or end mill that's contacting and milling your workpiece. For most hobbyists this will (at first) be something like a Dremel or Rotozip, then will eventually graduate to a full router or milling head of some kind - depending on what you are working with. For wood and such a router is the perfect choice, and for metals you'll probably want some other form of milling head with a motor that can be slowed down to speeds appropriate for milling metal.
 
The spindle will be attached to your Z axis.
 

 
Conclusion
 
Although this article was rather brief - My hope was to keep this article as short as possible and still cover some of the topics you might deal with. CNC is a very wide topic and one couldn't possibly hope to explain every single nuance associated with it. I'm sure that many of you will read this and have opinions that agree with mine and some that totally contradict what I might think I know - I'd love to hear from you and expand even my own horizons from this article. Please This email address is being protected from spambots. You need JavaScript enabled to view it. ANY comments you might have!
 
And while this section says "Conclusion" remember that I will be adding to this article, possibly even whole sections, I'll be adding more pictures, videos, and animations as well :)
 
Jamie