|
|
![]() |
|||
|
|
![]() |
|||
|
|
||||
|
Articles Products Resources About Camtronics |
CNC Explained At Home with Computer
Numerical Control (CNC) 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:
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.
|
|||
|
|
||||
© 2005 Camtronics, inc. Site by: Digital Platinum |
||||
|
|
|
|
|
|