Development of a Computer Numerically Controlled Router Machine with 4 Degrees of Freedom Using an Open Architecture
Total Page:16
File Type:pdf, Size:1020Kb
Development of a Computer Numerically Controlled Router Machine With 4 Degrees of Freedom Using an Open Architecture Leonardo Romero Munoz˜ Moises Garc´ıa Villanueva Mario Santana Gomez´ Facultad de Ingenier´ıa Electrica´ Facultad de Ingenier´ıa Electrica´ Facultad de Ingenier´ıa Electrica´ UMSNH UMSNH UMSNH Morelia, Mich., Mexico Morelia, Mich., Mexico Morelia, Mich., Mexico Email: [email protected] Email: moises@correo.fie.umich.mx Email: msantana@correo.fie.umich.mx TABLE I Abstract—A CNC router machine, of low cost, medium preci- ESTIMATED ANNUAL SHIPMENTS OF INDUSTRIAL ROBOTS IN SELECTED sion, using an open architecture, with four degrees of freedom, is COUNTRIES [9]. presented. It is described its hardware and software components. Also some applications to do simple tasks are presented. Country 2010 2011 2012* 2015* America 17,114 26,227 30,600 35,100 I. INTRODUCTION North America ( Canada, Mexico, USA) 16,356 24,341 28,000 31,000 Central and South America 758 1,886 2,600 4,100 Asia/Australia 69,833 88,698 98,900 116,700 Industrial robots have been used with success to do multi- China 14,978 22,577 26,000 35,000 ple tasks including: automotive industry, electrical/electronic India 776 1,547 2,000 3,500 Japan 21,903 27,894 31,000 35,000 industry, metal products and many others (see Figure 1). Republic of Korea 23,508 25,536 26,800 25,000 Taiwan 3,290 3,688 4,400 5,500 Thailand 2,450 3,453 4,100 7,000 Other Asia/Australia 2,928 20,483 4,600 5,700 Estimated worldwide annual supply of industrial robots at year-end Europe 20,483 43,826 44,100 47,200 by industries 2009 - 2011 Czech Rep. 402 1,618 2,000 3,000 France 2,049 3,058 3,300 3,500 Electrical/electronics* Germany 14,061 19,533 19,000 20,000 Motor vehicles ylatI 4,517 5,091 4,600 4,900 Automotive parts Spain 1,897 3,091 2,500 3,000 Chemical, rubber and plastics United Kingdom 878 1,514 2,000 2,200 other Europe 6,937 9,921 11,100 10,600 Metal products Africa 259 323 350 500 Food 2011 Total** 120,585 166,028 180,950 207,500 Industrial machinery 2010 Sources: IFR, national robot associations. Communication 2009 *forecast Consumer, domestic appliances **including sales which are not specified by countries Glass, ceramics Medical, precision & optical instruments Others Unspecified are interested in helping the small guitars factories in Paracho, 0 5,000 10,000 15,000 20,000 25,000 30,000 35,000 units *incl. computers Michoacan, Mexico, to improve their competitiveness against Source: IFR Statistical Department factories in other countries that already use robots. We are taking into account developing a machine with Fig. 1. Estimated worldwide annual supply of industrial robots at year-end low cost, open and easy to use (hardware and software). An by industries 20092011 [9]. Open Architecture should have the capacity to integrate pieces of equipment from several different manufacturers and to Table I shows how the shipments of industrial robots are obtain control solutions with several programmable application distributed over countries. Most of them are used in Asia interfaces, maintaining the same performance at lower costs. (in particular China, Japan and Korea) and Europe. These While there are some efforts to define a Open Architecture, for countries are taking advantage of the benefits of using robots this project we follows the OSEC (Open System Environment in their industries. for Controller) Architecture which is based on a standard Unfortunately, industrial robots are expensive and many personal microcomputer IBM-PC to control manufacturing small and medium size companies in Mexico can not afford equipment [2]. The cost of the machine developed is less to buy and use industrial robots. than half the cost of a commercial CNC machine with similar In the Michoacana University we are developing a CNC characteristics. router table with medium precision, suitable to do tasks over This paper shows the hardware and software components of soft materials like wood, plastic or aluminum. In particular, we the CNC router developed as well as some applications. The 978-1-4799-2370-0/13/$31.00 ©2013 IEEE rest of the paper is organized as follows: Section II describes the general characteristics of the machine developed. Section III presents the control software and some applications in 2D. motor Z Section IV describes how to post-process Gcode files in order motor Y to optimize execution time. Finally, Section V presents the conclusions and future work. Z Y X II. THE CNC ROUTER MACHINE A motor A Figure 2 shows the machine developed, an XYZA CNC router table, using a Dewalt DWP611 router. Additionally it includes a commercial vacuum cleaner to absorb the materials arising from the workpiece when the router is operating. The vacuum cleaner is under the router table and its hose is located motor X next to the Dewalt router. (a) The four degrees of freedom (b) Rotation around the X axis Fig. 3. The CNC router table. precision nuts (5 turns per inch). Each axis uses a Nema 23 stepper motor, model 23HS9430 from Longs Motor [8], 425 oz-in, 3 A, 30 V and 1.8 deg/step. Fig. 2. The CNC router developed. Figure 4 shows the box with four stepper motor driver DM542A, 1850 VDC, peak 4.2A; the Power supply S-350- The router can move in the X, Y and Z directions, and the 24 of 350Watts (24VDC/14.6A); and the Breakout board (all workpiece can be rotated around the X axis, using the motor from Longs Motor). The DM542A applies a PWM (Pulse A, as shown in Figure 3 (a) and (b). The characteristics of the Width Modulation) current control scheme to move the stepper machine are shown in Table II. motor. The stepper motor is controlled by two signals, a P ulse signal (or Step signal) to move the motor a single step, and a TABLE II Direction signal to indicate the direction of the movement. MACHINE SPECIFICATIONS The parallel port from the breakout board is used to connect Travel distance Resolution Speed to a Personal Computer (PC). The parallel port outputs are X-axis 16” 0.0005” 1”/s used to control the four stepper motors and the parallel port Y-axis 8” 0.0005” 1”/s inputs receive the status of limit switches for axis X, Y and Z-axis 2.5” 0.0005” 1”/s Z A-axis − 0:45o 1800o=s , and the status of an emergency button (a red button used to stop the machine in an emergency situation). The 5 V supply required by the breakout board is supplied by a USB cable from the PC. Figure 5 shows the connexions between the A. Hardware components different components of the CNC router machine. The CNC router machine has a solid frame of steel and All these components make up a robust CNC router machine aluminum. The axis X, Y , and Z use lead screws and controlled by the parallel port of a PC. NIST first became interested in writing a motion control package as a test platform for concepts and standards. Early sponsorship from General Motors resulted in an adaptation of the fledgling version of EMC using PMAC intelligent control boards running under a ”real time” version of Windows NT and controlling a large milling machine. Early considerations focused on replacing the expensive and temperamental ”real time” Windows NT system. It was proposed that a relatively new (at the time) real time extension of the Linux operating system be tried. This idea was pursued with success. NIST set up a mailing list for people interested in EMC. As time went on, others outside NIST became interested in improving (a) Driver box (b) DM542A EMC. Many people requested or coded small improvements to the code. As this community became larger, the EMC mailing list and code archives were moved to the SourceForge and the LinuxCNC web site was established. LinuxCNC has many features and brings a lot of function- ality (a flexible and powerful Hardware Abstraction Layer that allows you to adapt it to many kinds of machinery, a software PLC controller, easier installation, a new trajectory planner, and more). LinuxCNC also has a Simulator version, without (c) Breakout board using realtime, that works on standard Linux systems [6]. LinuxCNC is precompiled with Ubuntu LTS (long term Fig. 4. The motor driver box. support) versions for ease of installation and longevity. We use the version of Ubuntu 10.04 LTS in a Personal Computer. Figures 6 and 7 show the parallel port setup and the X axis configuration, respectively. Configurations for axis Y , Z and A are similar. Fig. 5. Connexions between different components. III. SOFTWARE COMPONENTS We select a realtime version of Linux operating system on the Personal Computer to control the CNC router machine. This environment is called LinuxCNC [7]. A. LinuxCNC LinuxCNC is a software system for computer control of Fig. 6. LinuxCNC Parallel Port Setup machines such as milling machines, lathes, plasma cutters, cutting machines, robots, hexapods, etc. LinuxCNC is Free The linuxcnc program executes CNC machine programs in software released under the terms of the GNU GPLv2. the G Code format. The LinuxCNC G Code language is based LinuxCNC is a descendent of the Enhanced Machine Con- on the NIST RS274/NGC language. troller (EMC) created by the National Institute of Standards and Technology (NIST), which is an agency of the Commerce B. Making simple drawings Department of the United States government (see [1] for a Here we review four programs for Linux related to the task survey in 1995 of the NIST realtime control system).