Secrets of CNC

October 21, 2004

   Current Status of my Tree ill Journeyman 300 retrofit project

I have previously posted that I bought a Tree Mill Journeyman 300 off
ebay for $750. I plan to post my experiences in buying such a machine off
ebay, having it transported across country and retrofitting the controls in
the next few weeks so others can possibly share the knowledge to accomplish a similar project.
First of all, I have previously retrofitted a Tree Mill journeyman mill for
a customer that has a shop about 20 miles away. I was really impressed with
the excellent mechanical condition of his machine even though it probably
had 20,000 hours on it. In view of this and the fact that I was unable to locate
a suitable machine for sale at local machine shops, I turned to Ebay. Over a
period of 6 months I bid on several clean machine with working controls
similar or equal to a Bridgeport series 1 CNC. All of the machine sold for a
higher bid that I had been willing to pay. The one machine that I was the
high bidder was below the reserve price. I had budgeted $5000 for a good
machine in good condition with half way decent controls. Then I saw a Tree
Mill Journeyman 300 CNC vertical mill that looked good but it was being sold
as is because parts of the controls were missing. It turns out the cpu and
the crt were gone. I didn't want those anyway so I decided that for $750 and
some repair cost that I could end up with a very rigid machine with modern
controls once the retrofit was accomplish. As I previously mentioned I use "oil eater"   to clean 30 years of oil off the
machine. The table top looked pristine after it was cleaned. The X axis had
about .001  backlash. The spindle with the Kwik switch 300 holder assembly
was in good shape. The Y axis was probably the reason the machine was sold.
The Y axis had .030 backlash. Disassembly of the Y axis ballscrew assembly
reveals that the ball nut flange was fractured completely just beyond the
flange but before the first ball groove. Since the material is hardened I
was pretty sure it could not be welded . I checked around and found I could
buy a new ballscrew and nut for that machine for $1500.  Other replacement
ballscrews custom made would also run about $1300. Since the ballscrew and
ball nut were off the machine I chucked up the ballscrew in my lathe  and
measured the end play. It was nearly zero!. Then I remembered that really
hard material like carbide is brazed onto tool holder. So I got out my
oxy-acetylene torch ,  removed the balls and ball nut from the ballscrew.
Cleaned the mating surfaces of the flange and ballnut, fluxed them and the
brazed the two ends back together. I reinstalled the balls and found that it
did turn smoothly. When I reinstalled it on the machine and reassembled the
thrust bearings I found the Y axis to be very stiff. So I took it apart
again and found that even thought he races on the thrust bearing looked ok
they weren't. So I replaced the two thrust bearing at a cost of $9.32 each.
It now turns very smoothly, easily  and with about .0012 backlash which is
acceptable for my work.
    While disassembling the Y axis I noted there was a BEI   incremental
encoder mounted between the ballscrew and the servo motor. I removed it and
tested it. There was no output from channel A, B or the index. I called BEI
tech support and relayed what I had found. They asked me how much current it
drew. It was 70 MA. They told me that was too low and I would either have to
buy a new one for $400 or send it in for repairs and that repairs could cost
up to $200 if repairable. After thinking about it for a while I decided
that I could easily replace it with a US digital encoder for a lot less. But
I wanted to do a few more checks on the BEI encoder. I check quite a few
items and then realized that it must be the light source in the encoder. I
cut one of the leads and sure enough the encoder  light source was open. I
assumed it was an IR LED. I removed it and noted that this little light was
only .125D and about .187L. I looked at the circuitry and was surprised to
see no dropping resistor or the LED. It was wired directly to the +5
terminal and ground. Upon closer examination I could see that there was a
portion of a filament inside the miniature bulb. It was an Incandescent
Lamp!.
I went through my catalogs and found that Chicago Miniature makes hundreds
of different incandescent miniature lamps some of which were 5 volts. I
then was able to find that Mouser electronics carried this replacement bulb
for $1.60 . I needed to order some other parts for various orders I had so I
went ahead and ordered it. When it arrived I installed it and powered it up.
I could see the light on and when I connected my scope I could see that all
the channels were working properly. These little lamps  come with different
filaments so you can get them with 10,000 -40,000 hrs of life.
Failure analysis of the Y axis was probably caused by the encoder lamp
burning out. This most likely caused the Y axis to run uncontrollably into
the
column causing the Y axis servo amp to burnout, blow the fuse and fractured
the ball
nut flange.
    The spindle motor is a 4.75HP PMDC motor with tachometer. It is 180VDC
and ran off a three phase controller. I didn't want to spend $600 for a
rotary phase converter or phase inverter. I bought a KB electronics 5HP DC
speed controller that has a manual speed control or will take a +/-  analog
signal. It was pretty easy to install the KB speed controller and tested
just fine.

So the only remaining issues is that the spindle uses a bijur positive
displacement lube oil pump to lubricate the up and lower spindle bearings
and the quill. The sumps
needs cleaning and fresh lube oil installed. But I need to clean the sump
filter before I install the new oil.
I ordered a 3KVA isolation transformer  for the power supply ( 170VDC ) and
have started the retrofit of the controls for the new CNCTeknix servo amps
that I will install. hope to make chips soon.
Dan

 

Updated 3-1-2004

Hmmm, after looking at my web page I found it shamefully out of date. I have decided to update it but retain the Legacy Information.

I  am absolutely amazed at how far home CNC has grown since the early 90's. Today there are programs Such as Mach2 CNC  and DeskWinNc that are superb programs at a very low cost. Similarly, the cost of step and direction  Servo Amps and Stepper drivers made by Gecko Drives has made CNC a real alternative to the small businesses, home shop machinist and entrapuers. Half of the credit must go to NIST that developed the program called EMC ( Enhanced Machine Controller) and half goes to Gecko Drives.

EMC was developed as a free, open source machine controller than ran under Linux. The first versions were somewhat problematic in that there were some problems with the pulse stream that it put out for parallel port applications. Quite a few interested persons started working with the guys at NIST to eliminate the bugs and improve it performance. This Ultimately led to the group to develop; the Brain Dead Install ( BDI) version that made loading this very powerful and complex relatively easy. Concurrently, Art Fenerty and Karl Carken obtained the free source code and developed their interpretations of the EMC program fixing many of the problems and making it run much faster and better. Art ( www.artofcnc.ca) solved the problem with windows timing issues with the parallel port by using a internal timer found on most motherboards. This smooth out the pulse stream and now made using windows 95,98 and XP a viable alternative. His latest version called Mach2( cost $150) is and awesome program that is divided into to portions.One is for Lathe operations and the other is for milling, plasma cutting, routing etc. Karl's version solve the pulse stream problem by using a pulse shaper such as a PIC microcontroller to read the pulses and then run them at a steady rate relative to the G code that was ordered. This required an interface board that connects to the serial port. The board consists of a PIC microcontroller, a 7805 voltage regulator and a few other components. Cost is $225. Both programs will run pulses up to 44000 steps per second. Both are working to improve their products with ever more features and improvements. Either is a excellent program. I use both programs and find both programs fairly equal.

Gecko drives was the other reason for the exploding growth of CNC at low costs. They cam out with the G201 micostepper drives rated at 7A and did 10 microsteps for $99. This was at least 1/3 of the cost of other microstepper drives in that amperage range. They then came out with the G210 which is a G201 but has a daughter board internal that has jumpers. It can be set for X1,X2,X5 or X10 which multiplies the microsteps so that it takes fewer steps for applications where the steps per inch would be too slow for a program to work properly. For example the G201 with ten microsteps would take a standard 200 step per rev motors and cause it to take 2000 steps per rev. If this were commented to a 20 TPI leadscrew that would mean there would have to be 40000 steps to the inch.

On the other hand the G210 with the rate multiplier set would have a steps or 200,400,1000 or 2000 steps per rev and with a 20 TPI leadscrew would have 4000,8000, 20000 0r 40000 steps to the inch depending on the jumper setting. One additional feature of the G210 is that it allows for using common signal ground for the step and direction pulses. Whereas the G201 only supports using the +5 from the PC for the signal return path. I prefer the common signal +5 because it is better. Gecko drives also came out with one of the first low cost step and direction servo amps called the G320. This neat little servo amp can run servo motors with a power supply up to 80VDC but it is recommended to stay at around 72VDC and can carry up to 20A load. I am currently using these on my Enco 8X36" knee mill with three axis and the parts that are listed on my product page. Performance is silky smooth, quiet, very accurate and without a doubt better than the older stepper systems I had installed. I have been running them for several years without  burning one up. I have run the table into the stops but the 5A fuse and err/res circuit performed it function and prevent a burn out amp. The interesting thing about my set up is that I am using a 600 oz in servo motor to raise and lower the knee. With a 2.5/1 ratio timing belt and the knee .2" pitch it raises about  400 lbs with awesome power at about 30 IPM. I have ballscrews with zero backlash ballnuts for climb milling. Generally, I can bore a hole to within .001 TIR.

I will post more later.

 

Dan

 

 

 

At Home with Computer Numerical Control (CNC)

                    Copy right 3-11-1999

By Dan Mauch

The Internet, and in particular the easy access to home business/hobby web sites, has generated a need to automate the manufacturing of products made in home shops by hobbyist. From manufacturing identification tags for Fiddo, to machining parts for robots to making molds for jewelry, there is a need to improve the rate and quality of products produced in the home shops . This article will explain the concepts of CNC and will be the first step in automating the home workshop. It will detail many of the aspects of CNC but this article should be considered to be a general discussion of the concepts of low cost CNC.

Background

Several years ago (See attached articles below)I wrote three article that were published in Nuts and Volts Magazine. The October 1994 article had a general overview of CNC and it various applications from drilling printed circuit boards to running a metal cutting power band saw. The November 1994 issue carried an article on how to build a low cost three axis L/R stepper motor driver. Last, the December issue detailed the construction of a low cost stepper motor driven CNC operated printed circuit board (PCB) drilling machine. I intend to follow that same format but will significantly update the rapid developments in this area and build several new projects.

This article will provide an updated explanation of CNC and how it all works together in the home shop. The next article will show you how to build a low cost three axis chopper step motor controller. The third article will take an off the shelf low cost milling machine and convert it to CNC.

A Basic Overview of CNC

The parts that make up a CNC system are:

    1. The personal Computer (PC).
    2. Programs that allow the users to design their products.
    3. Programs that convert the designs into G code (see Glossary) instructions which are used by G code interpreter programs that in turn run the machine’s controller.
    4. Programs that interpret the instructions and operate the machine.
    5. The PC parallel port that sends the signals to the machine’s controller.
    6. The controller that reads the signals generated by the PC via the program and the parallel port, which operates stepper motors in a controlled manner.
    7. The stepper motors that moves the axes of the machine to the requirement of the instruction sent to the controller.
    8. The machine that moves each axis individually or simultaneously. Usually these are three-axis machines.

 

CNC EXPLAINED

A detailed explanation of the above parts of the CNC system is as follows:

The PC is the brains that runs the various software programs that then send signals to the parallel port instructing the step motor controller when and much to move the stepper motor attached to each axis. The PC used for most of the design (Computer Aided Design (CAD)) and Computer Aided Manufacturing (CAM) functions will be an 80486DX2-133 or faster computer. It should be Windows or Windows95™ based machine. The PC used in the shop should be a DOS based 486DX2-66 or better. The shop computer only needs a small hard drive of 100 MB and needs only 4 Megs of RAM. The shop computer must have a parallel port with standard parallel port addresses. A Pentium is probably overkill for the shop computer if it exceeds 133 MHz. SX type computers don’t work well because they do not have the math co-processor. The software generally requires an SVGA monitor.

There are several programs that are used on a PC. The first is a design program generally called Computer Aided Design (CAD) this is the program where you design your part. There are numerous CAD programs for creating the part to be made. AutoCAD ™ , and Turbocad ™ are examples of the range of programs available to the users. When starting out look for a low cost program that will save your files as DXF files because there are other programs that will convert this file format to G Code which will be explained below.

The next piece of software , which may or may not be part of the CAD program is the Computer Aided Manufacturing (CAM) program. This program reads the DXF file and

generates G code instructions, which are saved in a tool path file. A CAM program works with the user to generate the instructions for the machine. It allows the user to set the various speeds, feed rates and depth of cuts . The level of user inputs with the CAM program varies with the particular software. An example of a CAM program is called Deskam. A demonstration copy may be downloaded from www.deskam.com. This program reads the DXF file and the user sets various parameters. The program then creates a tool path file in G Code. The below listed file is an example of G code:

(Matl ¼" alum Plate, use 3/8D end mill, set work .5" below Z=0") Setup instructions

G90 (This instruction sets the absolute mode as opposed to G91 Incremental Mode

G00 X1.000 Y1.000 Z-0.4000 ( This instruction will cause the machine to move in a rapid traverse mode to a location designated as X=1, Y=1 and will move the spindle down .4 inch on a milling machine.

G01 Z-.8 F10 will cause the end mill to be feed at a rate of 10 inches per minute through the material

G01 X2.000 Y1.000(this will command the machine to move from the above coordinate to X=2" (The parameters are modal which means that the Feed rate will remain at 10 inches per minute until changed by the G code . Thus the machine has move to the location X=2, Y=1 and Z=-.8

G01 Y2.000 ( This again moves only the Y axis 1" from the Y location of Y=1 to Y=2"

The last piece of software used by the computer is called G code interpreters. These programs read a configuration file where the numbers of step per inch are declared as well as various other parameters such as backlash compensation. With that information, the G code interpreter reads the G code file, calculates the number of steps for each axis to move and then send signals to the stepper motor controller which in turn moves the various axes. DeskNC is an example of a low cost G code interpreter program. A demo copy may be downloaded from www.deskam.com. There are several other G code interpreters that are low cost and work fine. A free G code interpreter is available at www.metalworking.com .

The parallel port on most IBM compatible type computer has one of the following base addresses 3BCH (956D), 378H (888D) or 278H (632D). Usually it is 378H(888D) for LPT1. This is the address that is set in the configuration file of the G code interpreter program. The standard parallel port uses data bits 0-7 and pins 2-9 . The G code interpreter sends the step and direction signals to these pins. The controller attached via a cable receives these signals and translates them into step sequences that moves the motors.

 

The stepper motor controller as described above receives the signals. Most modern controller takes step and directions signals. One of the data bits received is used as a pulse stream of information and a second data bit is used to determine the direction. This bit is either logic high or logic low. The other axes are similar. For example data bit 0 is usually pin 2 and this is normally connected to the X-axis step signal line. Data bit 1 is usually pin 3 of the parallel port and is connected via a cable to the direction line of the controller. Data bit 2 is usually the Y-axis step signal line and operates pin 4 of the parallel port. Some G code interpreters produce phase sequences but that is inefficient and step and direction type controllers are predominately used.

There are several types of controller. L/R (Inductance over Resistance) types are simple, cheap and inefficient. Chopper type step motor controllers are much more efficient but are more expensive. They easily can handle much higher voltages than L/R types. A good chopper driver operates at several times the voltage rating of the motor. This allows the coils in the stepper motor to charge quicker and thus you get more speed efficiently. A L/R type uses large dropping resistors to limit the current. Other features of a step motor controller are that they have various settings for full steps or half steps. The best controllers use microstepping . The problems with most low cost controllers are that they are open loop. That means that if the stepper motor loses it position then there is no feedback to correct the position and the part is ruined. On the other hand, a stepper motor system can operate without losing steps if the software, the controller and the machine are set up correctly. In my next article, we will assemble and test a low cost chopper step motor controller.

 

Stepper motors are incremental motion devices. They are different from brush type DC motors. The main types of stepper motors used for CNC are bipolar or unipolar.

They require 200 step to make a full revolution. The software generates the pulses that the step motor controller translates in to phase sequences. These phase sequences increments the rotation of the stepper motor. The torque of the motor is rated in ounce inches. The faster the motor turns the less torque it has. The slower the motor turns the more power it has. Low inductance stepper motors, by their nature, will run faster than high inductance motors. Four wire stepper motors have two coils and are called bipolar. Unipolar stepper motors have two coils with center taps that create four coils. If the center tap is not used then a unipolar motor can be used as a bipolar series stepper motor.

 

The machines that can be constructed or retro fitted to CNC is unlimited. I know of inventors and technicians that have built machines to accomplish task such as precision dispensing of glue to making butterballs. Don’t ask me how! In general the home shop need a milling machine, or a lathe, perhaps an engraving machine, a drill press or even a plasma cutter. Most CNC machine uses two axes. The X-axis moves from left and right, the Y-axis move front to back. A third axis is used in a milling machine for moving the spindle up or down. Solid state relays may be added for turning on or off coolant pumps, glue dispensers , plasma or oxy-acetylene torches. Addition of solid state relays is software dependent and you need to check that out if you are purchasing a G code interpreter program. The most popular machines to retrofit are small desktop milling machines such as the Sherline (http://www.sherline.com/sherline). With a CNC retrofit kits amazing work can be done with these machines.

 

Wrapping it up

In general, one can move from the design stage to the manufacturing products in a matter of minutes once the design is completed and the G code is generated. For example I designed a motor mount that required a 1.000 +.001/-.001 hole and four 3/16-inch diameter holes. The design only took a few minutes using a CAD/CAM program (see www.bobcad.com). My milling machine already had the mill vice set up so it only took a few minutes using an edge finder to locate the X=0, Y=0, Z=0 location. The enter button was pressed and in less than 4 minutes the 3/16 end mill drilled the four holes and bored a .999 inch diameter hole. It was awesome to watch it make 11 more identical parts . It almost took more time to deburr each part and load blank and unload finished parts in the machine than it took to make the part. When you first start out using CNC operated machines there is a learning curve. It takes time to get the software and the hardware all working together but once it is set up then you are only limited by your imagination as to what you can accomplish. As a footnote, I was testing a raster to vector program that was machining an image of my granddaughter while I was writing this article. How is that for productivity?

In my shop I have CNC controls on my full size milling machine, a 13X25 metal cutting lathe, a mill/drill, 2 printed circuit drill machines, A desktop Sherline milling machine, a small vertical mill and a 8 inch bench drill press. You will not need as many machines for your home shop but I have found CNC at home to be very addictive!

What’s Next?

Look for an upcoming article on how to build a low cost, high performance,

three axes bipolar chopper step motor controller.

Glossary

G-Codes are industry standard commands used in CNC machines

Common Used G-Code Commands

Assumes G90 (Absolute coordinates) and uses incremental I and J (K) only. Commands.

G0 Rapid travel at maximum feed rate.

G01 Linear interpolation at current feed rate.

G02 Clockwise circular interpolation at current feed rate. X-Y plane only.

G03 Counter Clockwise circular interpolation at current feed rate. X-Y plane only.

G04 Dwell in tenths of a second. E.g. G04 X10 will dwell for 1 second.

G81 Drill cycle.

G90 Absolute coordinates (Assumed).

G92 Sets Coordinates

M0 Program Stop

M2 Program end

M7 Coolant On

M8 Coolant On

M9 Coolant Off

Txx Tool change to tool xx

 

   Secrets of CCNC

There is very little information available for the hobbyist that will explain the whole process of CNC from the computer to the machine. Even more appalling, is that if there is information available, it is limited to a single facet of CNC.  The folks that like to program don't seem to care about the mechanical end. Those that specialize in electronics may have trouble with the programming of a computer. The folks that are good with mechanical things may have problems with the programming or the electronic portion of CNC. In the following, I will explain the various aspects of home CNC and to make it simple. The following should go along way to explain the concepts of CCNC.

It is recommended that you study the glossary, photos, schematic and flow charts before reading the following information.

There are 5 elements to Cimple Computer Numerical Control (CCNC). They are:

  1. IBM compatible computer
  2. CAD Programs (Computer Aided Design)
  3. The CNC/CAM Programs
  4. Electronic Translator-Driver System(Controller)
  5. X-Y-Z Mechanism

An explanation of each element is as follows:

1. The Computer runs the CAD programs and generates files that are used on the same computer or are transferred to another computer for execution of the tool path file by a CAM program.  The computer that runs the CAM program must have a parallel port with a standard LPT1 or LPT2 port address of 378(HEX). Other CNC/CAM programs may use serial or other parallel port addresses. The computer that controls the CNC machine can be an obsolete IBM AT that will be operated in a rugged shop environment. No sense using your good computer for this task.  The computer must be 100% IBM compatible. These are generally
available for under $70 at swap meets. The computers should be equipped with the following minimum hardware:

monochrome monitor

single 360K floppy drive

640K of RAM

This configuration is more than adequate to operate a 3 axis motion control system. If a sophisticated computer is used, then an optical isolator should be installed between the translator-driver and the parallel port to protect the computer in case of an operator problem or malfunction of the electronics. CAD programs should be run on a 80386-25 or better computer with a minimum of an EGA color monitor, a hard disk, a 1.44K floppy drive and 4 MB of memory above the 640K base. After the part is designed, an XT/AT computer can be used to send commands to the controller.

2. The following CAD/CAM programs are known to work with the electronic motion control system that will be described below:

DANCAD3D ver 2.6 (Shareware)3D CAD

DANCAM ver 2.6 (Shareware)

CNC/CAM ùDANPLOT ver 2.6 (Shareware) CNC/PLOTTER

Protel Easytrax (Freeware) pc circuit board design.

Protel Autotrax (about $395) Schematic capture/plot/printed circuit board CAD programs

Optimizer ver 1.0 ($25) Excellon file conversion and drill pattern optimization program.


DANCAD3D is a 3 dimensional CAD program where the user designs the part to be made in 2 or 3 dimensions. It provides various outputs to plotters or printers for a hard copy of the part. More importantly, the CAD program will generate a tool path data file for use by the CNC/CAM/PLOT program. This file contains all the instructions read by the CAM/CNC program and provides, feed rates, and coordinates for the tool path. An example of a tool path to drill 4 holes in a 4 inch square pattern follows.

ENTER (starts tool path)

1ST X 1ST Y 1ST Z 2ND X 2ND Y 2ND Z FEEDS

0.000 0.000 -0.250 0.000 0.000 -0.460 1 0 0 0 (drill moves down)

0.000 0.000 -0.460 0.000 0.000 -0.250 1 0 0 0 (drill moves up)

-4.000 0.000 -0.250 -4.000 0.000 -0.460 1 0 0 (X=4, Y=0 drill down)

-4.000 0.000 -0.460 -4.000 0.000 -0.250 1 1 0 0 (drill moves up)

-4.000 4.000 -0.250 -4.000 4.000 -0.460 1 1 0 0 (X=4, Y=4 drill moves down)

-4.000 4.000 -0.460 -4.000 4.000 -0.250 1 1 0 0 (drill moves up)

0.000 4.000 -0.250 0.000 4.000 -0.460 1 1 0 0 (X=0, Y=4, drill moves down)

0.000 4.000 -0.460 0.000 4.000 -0.250 1 1 0 0 (drill moves up)

0 0 0 0 0 0 0 0 0 0 (End of file- return to home point)


If you were to view that tool path file in Dancad you will see four dots in a square pattern 4 inches long and 4 inches apart. The Z axis (drill head) would move down .460 inch and then move up clear of the work to .250 inch.

DANCAM is a vital program that reads the tool path file, calculates the number of pulses to move the machine to the coordinates indicated by the file. It sends steps and direction commands via the parallel port to the electronic translator-driver. The program receives input signals from the X-Y-Z home switches and out-of-range micro-switches via the translator-driver. These signals are essential for protection of the machines and for repeatability.

DANCAM provides numerous configuration setup screens to match the leadscrew/drive mechanism, motor steps per revolution, motor direction, backlash compensation, home switch set up, ramping of the stepper motor, pulses per inch of travel and just about any other variable one could think of including auxiliary relays and a fourth axis set up utilities.  DANPLOT is similar to DANCAM except that the Z axis (vertical) does not allow for a range of up or down locations for each hole/line but does allow the user to fix the up position and the down position. The tool path file only needs the X and Y coordinates. The Z axis up and down positions are set up by the user in the utility program.Version 2.6 allows the user to import HP-GL files and run them directly. It is great for engraving or sign making. 

PROTEL EASYTRAX is an outstanding freeware printed circuit board design program. It can provide an Numerical Control (NC) drill data file for drilling steel plate just as easily as is used to layout drill patterns for the circuit board drill machine. After the design is completed, the Easyplot portion of the program generates a numerical control Excellon drill file that will be used to provide the coordinates for the holes to be drilled. A laser transparency of the circuit traces can be produced for the artwork for the circuit board. Easytrax produces Gerber photo plot files which can be sent to a photo plot service for plotting the circuit on film. Dot matrix, Postscript and pen plotter printers are supported. The NC output is used by the Optimzer (see below) to read the X-Y coordinates and convert Excellon file formats to Dancam format. The following is an Excellon file:

T04 (Tool number)
XY0 (X and Y coordinates = 0)
X4 (X=4 inches Y=0)
Y4 (X=4 inches Y=4 inches)
X0 (X=0 inches Y=4 inches
M30 (end of file)

PROTEL AUTOTRAX is a combination schematic and printed circuit board design program. This is a low cost but very powerful program that has all the features of Easytrax but also has auto place components, auto-router, schematic capture and numerous other features required for professional electronic designs.

OPTIMIZER is a program that reads the Excellon NC drill file, optimizes the tool path for the shortest path to drill all the holes. It then plots the drill pattern on the computer monitor and then converts the Excellon file to a format the CAM program requires. This program is used only for CNC drilling. It takes the drudgery of converting the Excellon file to CAM. It also sets the drill bit up and down positions.

3. The CAM program recommended is DANCAM 2.52. This program was previously described. Other, user generated, programs may be written and sent via the parallel port to the translator- driver as long as the code sends the tool path to the same parallel port data lines as set on the controller.

4. A low cost ($85) L/R 3 axis motion control system is used with the shareware. Other controller that are PWM chopper drivers are better. See below for an explanation of the chopper drivers.The controller receives step and direction signals from the CAM program via the parallel port. X, Y and Z step pulses are sent from the computer parallel port via pins 2, 3 and 4 respectively. X-Y-Z direction pulses are sent via the computer to pins 6, 7 and 8 respectively. Pin 10, when pulled high by an open over-travel protection microswitch, sends a signal back to the computer that there is an over travel condition, stops the program, which in turn freezes the positions of the stepper motors and displays a message on the monitor that there is an open switch. The problem must be cleared before the program will allow the user to continue. This feature, usually found only in expensive controller, protects the mechanism from damage by preventing the machine from over travel should the operator send a command to the machine that is beyond the travel of the mechanism. When pin 10 is low, the CAM programs runs the tool path file and continues to monitor this line. Pins 11, 12 and 13 are X-Y-Z axis home switches inputs to the computer. The micro switches are normally open. The pull up resistors brings these pins up to +5. When any of the home switches closes it pulls the pin low and signals the computer that the mechanism has moved to a predetermined HOME point. When the CAM program commands the machine to Home up, the CAM hardware configuration file is read.  Next, the stepper motors simultaneous turn to move the X-Y-Z axis mechanism into the home micro switches. As each switch is closed the stepper motor is stopped by a logic low signal to the appropriate pin of the parallel port. Each stepper motors moves until each axis is at their respective home position and removes any backlash provided for in the configuration file. This feature is essential for repeatability.

The translator portion of each controller IC receives the signals from the computer and converts step and direction pulses into the correct stepping sequence for the stepping motor. The driver portion of the IC's are MOSFETS that are capable of delivering 1.25 amps per phase with two phases on to each unipolar stepping motor. Peak current is 1.5 amps per phase. Thermal shut down provisions provide some protection for the IC's. Heat sinks and a cooling fan are needed for heavy loads. A 78MO5 voltage regulator is used to take the 12VDC supply voltage and regulate the +5 volts for powering the IC's, supplies the 5 volts source to the pull up resistors and output voltage to the computer input lines. Power resistors are provided where needed to limit the current to stepper motors with a voltage rating of less than the 12 VDC supply voltage. Supply voltages to 35VDC will work with the controller with minor modifications. I also have a three axis chopper drive that is much more powerful than the unipolar drive. It will output 2 amps at 24VDC. It has a 20KHZ chopper and has numerous other features like All Windings Off. Inhibit or control chopping, and full, half or Wave drive.  It runs two-three times faster and is much more powerful that the unipolar drive. It will run 4,6 or 8 wire motors.

Unipolar, 4 phase, 2 phase on stepping motors are used with the controller that will be built in the next article. Typically they are 5 volt, 200 step, .88 amp per phase, 6 wire, 40 ounce inch stepping motors. The stepping motor is bifilar wound which means that two coils are wound on the same bobbin. By center tapping the coil, two coils are formed with a single common lead. These coils are called phases. Eight such bobbins are equally spaced in most stepper motors. The common leads are connected to +12 VDC. A current limiting resistor is used if the voltage of the supply is greater than the motor rated voltage.  This formula provides the value of the resistor:

RB=(Vs-Vm)-Vd/Im

Where:
RB = Value of current limiting resistor.
VS = Supply voltage to the steppers.
VM = The motor voltage rating.
VD = The voltage drop across the 1C's (usually 1 volt).
IM = The current rating of the motor.

The wattage of this resistor is calculated with the following formula: Im*Im*Rb

As the CAM program sends pulse and direction signals to the parallel port, these pulses are received by the translator. The translator is permanently configured for the full step mode.  This mode provides the maximum torque. The phases are then turned on or off in accordance with the following sequence:

STEP Phase
A B C D
1 ON OFF OFF ON
2 ON ON OFF OFF
3 OFF ON ON OFF
4 OFF OFF ON ON

The stepper motor phase (coils) are energized rotating the shaft the number of steps ordered. The motor is reversed by reversing the step pattern. This is accomplished when the computer program sends a logic high pulse to pins 6, 7, or 8 as called for by the CAM file. The translator reverses the stepping sequence starting with the previous step.

5. The X-Y-Z mechanism will vary from machine to machine but generally use the stepping motor to rotate a leadscrew or drive a timing belt. A leadscrew rotates in a drive nut. The drive nut is fixed to a cross slide thus converting the rotary motion of the leadscrew to linear motion. The X axis stepping motor is fixed to a base. The Y axis motor is mounted on the X axis cross slides and moves with the X axis. The Z axis is fixed vertically and is coupled to leadscrew similar to the X axis. The accuracy of the mechanism depends on the quality of the leadscrews and any backlash or looseness in the mechanism. For most CNC work .003 per foot maximum pitch error (the lead angle of the thread) is required. The greater the number of threads, the greater the resolution of the machine and the greater the force applied to the X-Y-Z cross slides. With a 20 thread per inch leadscrew the pitch would be:

Accordingly: P = 1/20 = .050

Therefore, a 200 step per revolution stepping motor directly coupled to leadscrew, would move the axis .050 inch per revolution.

Resolution of the stepper motor and the leadscrew is defined as:


R=P/S

Where:
R = resolution
P= leadscrew pitch
S= steps per revolution

Thus, a single step would move the mechanism .00025 inch (.050 / 200). A coarse leadscrew ie 5 TPI (threads per inch) would have a resolution of l / 5 = .200 and a resolution of (P / 200 (steps) = .001 inch. Multiple leads (starts) on a leadscrew with very high pitch will move the axis very rapidly but should be avoided because the resolution would be too coarse for most CNC applications. Generally, you will trade speed for accuracy.

The load that a small stepper motor can drive is significant when used with a leadscrew. A little 12 ounce-inch stepper motor when coupled with a 20 TPI leadscrew yields 16 pounds of force at low speed and 9 pounds at high speed. Neglecting friction, the following formula can be used to calculate the load that can be driven with a stepping motor and leadscrew:

L=F*6.2832R/P

L= load
R= radius from center of lead screw to the point that the torqueis applied
P= leadscrew pitch
F= force applied

The X-Y drive nuts are connected to the moving X-Y table. The table rolls on precision ball bearing slides or ways. The ball slides or ways keep the X-Y coordinates at right angles at all times. The Z axis stepper motor is similar to the X axis in that it is fixed to a stationary mount. As the motor turns the leadscrew, a drive nut connected to a ball slide or way converts the rotary motion of the motor to linear motion. This moves the drill power head or spindle up or down.

This completes the overview of Cimple Computer Numerical Control (CCNC).