![]() |
||||
![]() |
||||
|
Articles Products Resources About Camtronics |
Secrets of CNC Secrets of CNC The following is really outdated. It is from the '90s. Currently I am using Mach3 and most servo systems using Gecko servo amps and MCG motors.
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. An explanation of each element is as follows:
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.
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:
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.
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:
The wattage of this resistor is calculated with
the following formula: Im*Im*Rb
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:
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:
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:
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).
|
|||
© 2005 Camtronics, inc. Site by: Digital Platinum |
||||