











|
|
CNC Guide
GUIDE TO UNDERSTANDING
BUILDING A CNC ROUTER YOURSELF
How
it started
I never not stop creating when my work day is over at my shop, my nights
and weekends are spent working on the things I truly enjoy RC,
about 10 years ago I was constantly taking tools home from my business
to use for my hobby, and always ether forgetting to bring
something home or forgetting to return a tool to the shop , there had to
be a better way, but ten years ago a cnc router was very expensive for just home use,
so I built my first home 3 Axis hobby CNC
Router, at last a single tool that could do so much more, drill any size
hole, cut any shape, again and again with the same precision from part
one to part one hundred, pc based motion control electronics and DOS programming was
very crude back then, and the machine was costly and time consuming to build
and run, as there were few
known examples to look at or even talk to someone about, but wow that original
machine was the future, and when friends and family
saw what it could do they had to
have one too, I found myself building machines on my time off, (and
unfortunately you cannot make any profit from friends and family)
instead of building things for my RC hobby, and that's how these plans
were initially created , I drew up some plans for a CNC machine that the
average person could build, using standard woodworking tools and parts
purchased from local hardware stores, and handed
them out to anyone who wanted to build a machine, I do not consider
myself a pioneer of PC based motion, but I was there and very involved
in the beginning, today 10 years later,
with great control software and many electronic drives available,
together with our time tested
plans I have gotten the Homemade CNC down to a simple art, the plans and
instructions we sell today did not appear overnight and have been
refined and tweaked over a ten year period, so purchasing our plans
today you will feel confident building your DIY CNC
that your finished machine will perform as advertised, I have been vigilant
to keep these plans at the lowest cost possible to insure all can
benefit from this wonderful technology, and want thank the many
thousands of supporters and all who have helped in making this current
plan set a truly global machine able to be built almost anywhere worldwide.
N. Adamo
Rockcliff Machine Inc.
CNC (Computer Numerical Control) or Motion Control is the programmed
controlled movement of a machine or object based on either
speed, distance or load.
This document will help
you understand general motion control and CNC equipment with priority
given to the DIY machine builder using motion control from a PC.
Selecting a CNC Router
Machine Style
Flying Gantry Overview:
A flying gantry or moving-gantry machine is designed in to save space,
but at the same time has the option of being made into an open-table
bed. This is useful for applications like cutting straight through the
table; it is slightly more complex than one traversing axis (example
Axis Y will traverse with Axis X and Z). This design arrangement must
bear the load of all three axis' and is not considered to be as strong
as a fixed gantry layout, and is best suited for machines like plasma.
laser, and light duty routers.
Fixed Gantry Overview:
With a fixed-gantry machine style, one axis or slide will be fixed to
the gantry (example Axis X) with Axis Z traveling or attached to it;
Axis Y is separate and fixed to the base. A fixed gantry can be made
stronger because two of the three axis' can be attached to a solid,
non-moving structure, but at the same time this arrangement will result
in a larger machine footprint. A fixed-gantry design is almost
exclusively used on full-size, vertical milling machines. A fixed gantry
cannot be made in open table design.
Open Table:
An open-table design is designed for cutting straight through- it is
basically a flying gantry with the bed removed, and the machine is
usually propped up on four legs or is mounted to side rails. This style
of machine is useful for applications like plasma, laser, or if you need
to cut a part that cannot be moved, like an inlay on a floor or wall. It
can also be mounted to a table, if required; this style is prone to flex
in the sideways axis, as the side rail bearings cannot be supported
along the entire length.
Closed Table:
A closed table is a machine that will have the cutting surface designed
in a way that incorporates the side rails onto the base. With this style
of design, the machine can be made more rigid, but will have limitations
on the part size to be cut, as the bearing rails block off space on the
sides.
Selecting a Linear Bearing Style
Linear Bearing:
Linear Bearings are bearings that can travel in a straight line, with
any type of machine cutting the linear bearing must be as rigid as
possible and able to glide as free as possible, with a machine like a
cnc router the clearance between rail and runner block should be very
small or zero, large cnc milling machine will actually be preloaded,
there are many types of commercial and DIY linear bearings, the quality
of the linear bearings will directly reflect the quality of the cutting
and hardness of material that the machine can cut.
Supported Linear Bearing:
A supported rail system is the most rigid system; in a supported rail
system, the rail will be supported or bolted down the entire length of
the rail, the runner blocks will house hardened ball bearings, and the
rail will be a hardened shaft or rail, supported linear bearings will
cost more than all other types of linear bearings, and will the best
results.
Unsupported Linear Bearing:
In an unsupported rail system the rail will be mounted only at the ends,
this style of linear bearing will have some flex and will not be as
rigid as supporting the entire length of the rail, but will cost less
than a supported rail system, and can be good for light cutting, if made
in shorter lengths, an unsupported linear bearing can be purchased or
made at a low cost with bronze bearings and precision ground shafting.
DIY Linear Bearing:
Because of the high cost of purchasing a linear bearing from a
manufacturer, some builders make their own. A DIY linear bearing can be
made for both supported or un-supported versions. A linear bearing made
yourself can have great results, and can be made with standard tools.
Our version is a fully supported design.
Selecting a Z-Axis Slide Design
Fixed Z-Axis Motor Design:
The Z axis can be arranged to only move the slide and cutting tool; in
this arrangement there will be less weight to move, as the motor is
fixed to a opposite axis.
Moving Z-Axis Motor Design:
a moving motor is the standard, in most commercial applications; it is
usually as strong and will give more clearance in moving motor design
the rail and motor move while the runner block is fixed to the opposing
axis.
Motors
Stepper Motors:
The stepper motor is an electro-magnetic device that converts pulses of
electricity into mechanical shaft rotation. Stepper motors are low cost,
with high reliability, high torque at low speeds and a simple,
construction. Some disadvantages in using a step motor is the resonance
effect often exhibited at low speeds and decreasing torque with
increasing speed. Stepper motors have multiple coils. when a specific
coil is energized in the proper order, the motor will step in the
appropriate direction , a typical stepper motor will usually have 200
steps to make up one turn because of this design stepper motors can keep
count without the need of an encoder making electronic controls for
stepper motors fairly simple and making them ideal for low cost and easy
use.
Motor Mechanical Power
Ratings:
Motor power ratings are measured in ounce inches or (oz.in.) example: A
100oz.in. rated motor simply means, if an arm was attached on the motor
shaft sticking out one inch from center and if a 100 ounce weight was
hung from the end of the arm the motor will lift it.
How to Select and Identify Stepper Motors:
Bipolar Stepper Motors:
Bipolar Stepper Motors will have 4 wires. They produce more torque and
will require a more complicated, electronic control circuit to run
properly. They are used in more applications, because can develop more
speed and power than Unipolar motors.
Unipolar Stepper Motors:
A Unipolar stepper motor will have 5 or 6 wires. The drawback to using a
unipolar drive, is its limited capability to energize all the windings
at any one time. This means the torque will be reduced by around 40%
compared to other motors. Unipolar motors are good for applications that
operate at lower step rate speeds.
Variable Reluctance
Stepper Motors:
Variable reluctance stepper motors or Hybrid motors are the simplest to
control over other types of stepper motors. Their drive sequence is
simply to energize each of the windings in order, one after the other
Stepper Motor Frame Sizes:
NEMA 17
NEMA 23
NEMA 34
Connecting Stepper Motors:
Series Connected:
There are two ways to connect a stepper motor, in series or in parallel.
A series connection provides a high inductance and will give higher
performance at low speeds.
Parallel Connected:
A parallel connection will lower the inductance but increase the torque
at faster speeds.
Motor Resonance:
Motor Resonance is a condition where vibration or oscillation will cause
missed steps and noisy operation. Naturally all stepper motors will have
more vibrations, as they are moving in a series of steps, this can cause
resonance; it can be caused for various reasons that include: incorrect
electronic pulse timing of the steps, loose components. There are many
types of dampening hubs that can be installed to stop this issue.
Inductance:
Stepper motors are rated in terms of inductance. A high-inductance motor
will provide a greater amount of torque at low speeds and a low
inductance motor will be opposite.
Sizing a Motor:
Sizing a motor is important when selecting a stepper motor or servo
motor - having more power will always be a better choice. Not having
enough power can cause overheating in servos, and can cause stalling in
a stepper motor. It is always difficult to calculate the exact power
requirements needed to drive slides on a machine, as there are many
factors to consider, like slide friction, lead screw pitch and nut
friction, and size of machine - these will all effect what size and
power are needed in general with DIY machines the most common motor
frame is a Nema23 the range of this size frame will be from
approximately 100oz.in. to 500oz.in
Servo Motors:
Servo Motors are generally the standard in most high end systems, they
can come in many sizes and are either brush or brushless. Because a
servo motor is basically a dc motor, it cannot count position on it's
own; it will need what is called an encoder, an encoder can be rotary or
linear , a rotary encoder is usually mounted to the motor shaft and a
linear encoder will be mounted to the slide or table. The purpose of an
Encoder is to count the pulses or position, for example: if a rotary
1000 count encoder is used, it will count 1000 pulses per one turn of
the motor. This count is sent back to the motor controller electronics,
for the controller to position the motor. This routine is called the PID
Control Loop. Servo Motor control is much more complicated to perform, a
servo motor controller system will cost much more than a stepper motor
controller.
Lead Screw Description
Lead Screw:
A lead screw is basically a long screw made with a continuous thread. In
a CNC machine this lead screw is attached to a motor, either directly or
by timing belt with reduction. And the drive nut, which is attached to
the table or slide as the fixed motor spins the screw, will drive the
table to to specified position, it is important to have minimum
clearance between screw and nut, excessive clearance will result in
chatter and inaccurate cutting.
Resolution Accuracy:
Whether you select servo or stepper motors, they will both have a number
or count associated to one revolution of the motor shaft - this number
or count is called resolution. For example, a stepper motor with 1.8
degrees, with no Micro stepping, will have to step or index 200 times
per turn. The resolution can be increased, by using a Micro stepping
controller, this will allow one single step to be increased by 8, or
1600 times per turn. However, with a servo motor resolution is
determined by the encoder. An alternative way to increase resolution is
to select a finer pitch lead screw; however, with the increased finer
pitch, a slower maximum speed will incur.
Lead Screw Diameters:
The lead screw diameter is measured from the tip of the threads -
Example: 3/8-16 this thread diameter would equal 3/8"
Lead Screw Pitch:
Pitch is used to determine the thread spacing of the lead screw and
matching nut. Pitch is the distance the nut travels along the screw when
the drive nut is turned. One turn example: 1/4-20 is a 1/4" in diameter
and has a pitch of .05", if the nut turns 20 times it will move one inch
20 x .05 =1.0".
Lead Screw and Nut Options:
In low cost lead screw applications, a drive nut will often be made from
plastic or bronze; making the drive nut from these materials will give a
low friction solution, at the same time no lubrication is needed.
UN Thread:
A UN thread (Unified Thread) is the standard thread shape that is used
on general nuts and bolts that you find on most items attached with nuts
and bolt.
Acme Screws:
Acme screw threads can be made much more coarse than UN threads. They
are square cut threads and can hold much more load than a v style or UN
thread; they are common components that are generally found in
industrial machines, they are readily available .
Ball Screws:
A Ball Screw uses ball bearings in a recalculating housing. Ball screws
use hardened ball bearings and the screw is hardened steel, and either
come in a lower cost, rolled screw or precision ground screw. Most high-
end milling machines will use ball screws - they have high efficiency
and can be very accurate. They will, however, be the most costly to
purchase, and, as there is no ball retainers in the drive nuts, they
will have to be handled and assembled with care.
Multiple Start Threads:
Multiple start threads are threads that have multiple entry points, they
exist because a screw can be made stronger in coarse pitches and can be
used for lead screws, they are made in 2, 3, 4, 5, start configurations
Allthread:
Allthread screws or threaded rod will come fully threaded and are
threaded with UN threads. This is the standard thread found on most
machine screws and fasteners. Allthread is very common and can be
purchased at most hardware stores and can be used as a very low cost,
lead screw.
Anti-backlash Nut:
An anti-backlash nut will have zero clearance between the screw and nut,
it is manufactured to allow preload to be applied to the screw. An
anti-backlash nut is very useful in a CNC machine, as it allows very
precise transmission from a rotating screw to linear motion. When
cutting in any machine, holding the work as rigid as possible will make
for smoother, chatter-free cutting. Anti-backlash nuts can be purchased
in UN, Acme and Ball screws.
Supported Lead Screws:
In longer length slides screw, end supporting is important. A supported
screw will have a bearing mounted to the lead screw on the opposite end
of the motor, this bearing support will help eliminate a condition
called lead screw "whip"; at higher, lead-screw speeds an un-supported
screw will become unbalanced. To mount a bearing correctly, the threads
will have to be machined off to a clean diameter, in order to fit the
inside of the bearing; and the bearing will have to be mounted to the
machine.
Motor Couplings:
Three-Piece Coupling: A three-piece coupling is a flexible coupling that
will help when trying to align a motor shaft to drive screw. Some types
of flexible coupling are made from three-pieces: two connectors and a
rubber spider. When using a three piece coupling, the lead screw must be
supported at both ends.
Helical Coupling: A helical coupling is another type of flexible
coupling; it is made from one piece and there will be a spiral cut made
like a spring, allowing some misalignment of the motor shaft and lead
screw.
Solid Coupling: A solid coupling is what most drive screws will be
attached with, they are not flexible and must be aligned correctly.
There are a few different styles, including set screw locking, and clamp
style. They can be made from aluminum or steel, and there will be no
need for screw support on the motor end - when using a solid coupling as
the motor bearings will support the screw.
Electrical Systems Overview
Motor Controllers
Determining Motor Controller Requirements:
Step and direction control is by far the most common PC based motor
controller. There are many companies that offer motor controller
circuits and systems; we recommend using a motor controller that is made
or purchased with Step and Direction Circuit design, and capable of
using a PC Parallel port for control. This is the most common design,
which means you will many choices of control software to use, like Mach,
EMC , Turbocnc
PC Parallel port or USB:
Currently, the most common control software and motor controllers will
use the PC parallel port (25 pin connector printer port). USB
connections are available but are still a rare item. Gecko systems have
just released a controller for USB but it is still in the design phase.
Do It Yourself Motor Controller:
If you have some knowledge of electronic components, there are many
motor controller kits which only require soldering. But DIY kits, that
include all parts and a circuit board, can be successfully completed,
with only novice skills. There is nothing more satisfying than building
anything from scratch, but electronics are a different animal and
mistakes can cost money, and injury. So unless you are familiar with all
aspects of electronics and know what you are doing we do not recommend
tackling it with your first machine. Buying a pre-made controller will
be more expensive, but will give you the knowledge of what to expect if
you ever decide to make one yourself.
Chopper Current Motor Controller:
A chopping circuit can limit the current, without getting electronic
components too hot, and will be much more efficient. The chopping
circuit will switch the operating voltage on and off, at high
frequencies; this routine is called pulsed width modulation. The on time
will determine how much current gets through to the motors. The chopping
current control is best for stepper motor control, and is considered
newer technology.
Resistive Current Controller:
Normally, with stepper motors, the voltage is set higher than the
voltage rating of the motor - a way of limiting the current going to the
motors, is to use a current limiting resistor. These motor controllers
are called L/R drivers, L=Inductance, R=Resistance. This resistor is
placed in series with the winding, and will take some current from the
motor and will dissipate it with heat.
Integrated Control:
Integrated control means the motor controller is embedded and will
accept commands from the host computer "direct connect" during the
motion process. Communication, operator interface and the I/O functions
are separate elements of the system. The motion is done by the computer
and in this case the controller acts as an independent device. CNC
(computer numerical control) applications are well suited for integrated
control because the data input is "dynamic", or changing frequently.
Motor Step Modes:
Stepper motor controllers can have different step modes- full, half and
micro-stepping. The type of step mode output of any motor is dependent
on the motor controller and motors
Full Step:
Standard stepping motors have 200 full steps per revolution of the motor
shaft. Dividing 200 steps into the 360 degree rotation equals a 1.8
degree full step angle. Normally, this full step mode or 1 pulse from
the controller will equal 1 step
Half Step:
Half step means the controller will send is rotating at 400 steps per
revolution. In this mode, one winding is energized and then two windings
are energized alternately, causing the rotor to rotate at half the
distance, or 0.9 degrees Half stepping is a more practical solution
however, in industrial applications. Although it provides slightly less
torque, half step mode reduces the amount "jumpiness" inherent in
running in a full step mode.
Micro-stepping:
Micro-stepping is a relatively new stepper motor technology that can
control the current degree that will subdivide the number of positions
between a single step. Micro-stepping is a function of the electronic
motor controller, it will enable one single step of the stepper motor to
be divided into multiple steps, giving the stepper motor more
resolution, and a smoother operation; most newer and higher quality
motor controllers will have this function. Micro-stepping is typically
used in applications that require accurate positioning and a fine
resolution, over a wide range of speeds. Micro-stepping will make a
stepper motor run more smoothly and more accurately.
Controlling External Devices
E-Stop software controlled and hardwired control
E-stop stands for Emergency Stop there are a few ways to E-Stop a
machine when the motion is going wrong or is about to, Mach3 control
software has a large button that will immediately stop all motion, this
is considered a software controlled e-stop. A hardwired e-stop is a
physical button or switch that is wired and connected to an input of a
breakout board and can be configured to stop all motion, a physical
hardwired switch is a more reliable way to e-stop a machine than a
software e-stop, a hardwire switch to an actual power output is
considered hardwired, and will stop all motion no matter what the
software program is telling the controller to do.
Breakout Board:
A breakout board can be used to isolate and extend the parallel port,
for external devices like limit switches, and turn devices on and off,
like a rotary tool, automatic clamping, vacuum table, or whatever device
you want to control while running your machine. Most pre-made motor
controllers will have connection points or external devices, but if the
DIY controller is made a breakout board would be advisable. An
opto-isolated breakout board will isolate connections to protect your
computer port from accidental short-circuits. The opto-isolated circuit
sends the signal through a LED, and will receive the light with a
phototransistor. When
the parallel port switches the signal to on or high, an LED will turn on
- the phototransistor sees the light and relays the signal. Your
computer sensitive electronics are isolated from your external devices.
The input signals are transmitted with light and not through hard wired
connections, so any higher destructive voltages or accidental shorts
will never reach your sensitive computer electronics. An opto-isolated
breakout board is not an absolute must, but will help to protect your
PC, also some motor controllers are single axis drives, and using
a breakout board can make it easier to connect multiple axis's.
Charge Pump:
A charge pump is an electronic circuit board which is a safety device
used on PC based CNC. controls like Mach it will send a 12.5 KHz signal
through one of the computers parallel port pins. A charge-pump board
will act like a traffic light, if the charge pump sees a 12.5 KHz signal
it will continue; but, as almost everyone knows, Windows can do
unexpected things like stall, crash, blue screen. When any issues with
Windows happens and Mach looses control, the charge pump board will stop
all motion to the machine.
Limit and Home Switches:
Limit switches are used for two purposes, one is to stop any damaging,
over travel; a slide can only travel as per its design. Using a limit
switch will tell the control software when it is at its maximum travel
limit, and to stop all motion before a crash occurs. Limit switches are
not
mandatory but will help in a crash. The second use, for a limit switch,
is homing - this function
is used at start up, or in between cuts. Homing will set a reference
point or machine zero for the starting point; homing is a useful feature
for making multiple parts when using fixtures. It will reference all
motion from the same point every time, eliminating the need to manually
find an exact starting point.
Parallel Port Description and Pin Outs Interface Chart
Pin No
Name
Direction
1
Strobe
Out
2
Data0
In/Out
3
Data1
In/Out
4
Data2
In/Out
5
Data3
In/Out
6
Data4
In/Out
7
Data5
In/Out
8
Data6
In/Out
9
Data7
In/Out
10
nAck
In
11
Busy
In
12
Paper-Out
In
13
Select
In
14
Linefeed
Out
15
nError
In
16
nInitialize
Out
17
nSelect-Printer
Out
18-25
Ground
Machine Control Software and Computer Requirements
Overview:
Machine control software is the program that runs on a PC, and will
communicate with the motor
controller to command the correct amount of steps and the direction to
the motor controller, and
eventually to the machine. A control program is also capable of storing
the machine specifications
to correctly calibrate the amount of steps to equal the linear movement
commanded, and at the
same time will also do other functions like manual jogging, zero points,
and conversion in inch
and metric units.
ARTSOFT Mach3:(Windows XP)
Control software is the most common control software, it can run from
Windows, and control
up to six motors. It also includes lazy cam which will convert CAD
drawing to motion, and has
many features required in CNC Machine tools, we will use Mach3 for our
make a part and cut
tutorial. Computer Requirements for Mach3 is Windows XP with a parallel
port.
EMC (Linux)
Enhanced Machine Control (EMC) is a software system for computer control
of machine tools
such as milling machines and lathes, EMC is free software with open
source code, It can
simultaneously move up to 6 axes and supports a variety of interfaces.
The control can
operate true servos (analog or PWM) with the feedback loop closed by the
EMC software
at the computer, or open loop with "step-servos" or stepper motors.
Motion control features
include: cutter radius and length compensation, path deviation limited
to a specified tolerance,
lathe threading, EMC runs on Linux using real time extensions. Computer
Requirements for
EMC is a PC with a parallel port.
TurboCNC (DOS)
Turbocnc is another great stable Control Program it runs from DOS (Disk
Operating
System) and will run gcode Computer Requirements for Turbocnc is a PC
running DOS with
a parallel port. Turbocnc is good low cost alternative for using a lower
speed PC that cannot run
Windows and is used by many.
G-Code
G-code is the name for the programming language that controls CNC
machine tools.
It was invented by the Electronic Industries Alliance in the early
1960s, and is still
used today, and is the programming language, that we will be using in
our example.
M-Code
M-Codes are mostly used to operate external devices within the program,
turning
coolant on and off, or spindle on off, they are also used to end the
program.
|
|
|
|