Tài liệu Cnc robotics - geoff williams

  • Số trang: 321 |
  • Loại file: PDF |
  • Lượt xem: 809 |
  • Lượt tải: 0
tranvantruong

Đã đăng 3224 tài liệu

Mô tả:

CNC Robotics - Geoff Williams
• Provides step-by-step instructions for building your own CNC mochine • Greot for use os 0 teoching tool in metol/wood shop or on the industriol floor GEOFF ,WILLIAMS (J l CNC Robotics Build Your Own Workshop Bot Geoff Williams McGraw-Hili New York London Chicago Madrid San Francisco Mexico City New Delhi San Juan Singapore Sydney Seoul Toronto Lisbon Milan ./ Cataloging-i n-Publication Data is on file with the Library of Congress Copyright © 2003 by The McGraw-Hili Companies, Inc. All rights reserved. Printed in the United States of America. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a data base or retrieval system, without the prior written permission of the publisher. 3 4 5 6 7 8 9 0 DOC!DOC 0 9 8 7 6 5 4 ISBN 0-07-141828-8 The sponsoring editor for this book was Judy Bass and the production supervisor wa s Pamela Pelton. It was set in Tiepolo Book by Patricia Wallenburg. Printed and bound by RR Donnelly. McGraw-Hili books are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. For more information, please write to the Director of Special Sales, McGraw-Hili Professional, Two Penn Plaza, New York , NY 10121-2298 . Or contact your local bookstore. II\ \:CI Thi s book is printed on recycled, acid-free paper containing a minimum of 50 percent recycled, de-inked fiber. Information contained in this book has been obtained by The McGraw-Hili Companies, Inc. ("McGraW-Hili") from sources believed to be reliable. However, neither McGraw-Hili nor its authors guarantee the accuracy or completeness of any information published herein, and neither McGraw-Hili nor its authors shall be responsible for any errors, om issions, or damages arising out of use of this information . This work is published with the understanding that McGraw-Hili and its authors are supplying information but are not attempting to render engineering or other professional services. If such services are required , the assistance of an appropriate professional should be sought. For Margaret, whose help and patience made this book possible. Contents II" II I I 1 ,, 1 1 Design Why Build My Own Gantry Style Motors Lineal Motion Motor Drivers Acme Screw Deciding on the Dimensions of the Machine Software 2 Electronics Stepper Motor Driver and Computer In terface Boar ds Stepper Motor Driver Circuit The Interface Board 3 4 Making the Printed Circuit Board 1 I 2 2 4 9 9 9 10 13 13 15 19 77 Tools and Materia l Artwork Board Cutting and Cleaning Toner Transfer Etching 78 82 85 93 Driver Assembly 99 The Interface Board III 77 v GNG Robotics 5 Softwa re Setup and Driver Testing Material Needed Creat ing Test Files Triangle Test Circle Test Putting th e Elect ro nics in a Case 6 The Frame Tools and Ma teria l Bolting Assemb ly Bearing Ra il Support Bolt Ho les Paint the Frame 7 The Gantry and X-axis T he Gantry The X -ax is: Insta ll i ng t he Gantry Bearing Guide Rail Beari ng Holder 8 The Z and Y Axes T he Z-Axis The Y-Axls 9 Motor and Lead Screw Insta llat ion Tools and Ma teria l X-axis Y-axls Z-axis Lim it Switc h Install at ion X -axis Limi ts Y-axis Limi ts Z-axis Limits 10 File Creation and KCam KCam CNC Cont rol ler Software KCam File Require ments How to Create a File to Import CorelDraw ACME Profile r vi 113 113 121 122 123 124 13 3 133 138 141 144 151 1 53 153 160 164 175 175 184 189 189 190 199 203 206 208 209 211 215 215 219 222 223 239 Contents 11 Tool Holders and Testing Tool Holders Penholder Tool Router/Dremel Holder Testing the CNC Machin e 12 Examples Plotter Mechanical Engraving Tool Dremel Tool Ma ster Craft Rotar y Tool Router Sources of M aterial Electronic Components L297 /L298 Integrated Circuits CANADA United States, California Lineal Motion Distributor Manufacturers Stepper Motors Metal Index 245 245 246 252 257 263 263 268 271 274 278 293 293 293 293 294 296 296 29 7 300 301 303 vii Acknowledgments I must tha nk my brother Karl who inspi red me to write this book and my editor Judy Bass w hose fa ith and a ssistance made th e book a rea lity. I'd also like to thank Patricia Wallenburg who assembled my words and images into book form . Judy an d Patr icia have made this book project an extre me ly enjoyabl e expe rience. Finally my tha nks go ou t to a ll the people who have freely shared with me thei r know ledge a nd assistance wh ile I was resea rchi ng and .bui lding my CNC machi ne. I must thank th e following co mpan ies for a llowing me to include some of their cop yrighted materia l in this book. The NuArc Company, Inc. does n' t p romote, endo rse . or wa rra nty an y modified products. NuArc let me reproduce so me of th e imag es from the repair ma nua l of th e copy ca mera I disassembled but they don 't endorse th e use of thei r p roducts for anyt hing ot her tha n the ir origina lly inte nded fu nction . You can co nta ct NuArc at M&R Sa les a nd Service, Inc. I N. 372 Main Street , Glen Ellyn, IL 60 13 7, USA or on the Web at http:/ / www.nua rc.co m. Kellywa re ha s allo wed me to use sc ree n ca ptures of the progra m KCa m 4. Kellywa re ca n be contacted at PO Box 563 . Spirit La ke. Iowa 52 36 0 , USA or on the we b at http:/ / www.kellyware.co m. The p roduct data sheets included with Chapter 2 of th is book have been reprinted with the pe rm iss ion of STMicroelectron ics . The documents reproduced in this book and many more useful app lication notes ca n be found at th e STMicroe lectronics Web site loca ted at http:/ / www.st.co m. Scien ce Speciali st s, Inc. ha s given me permiss ion to include sc ree n captures of th e softwa re ACME Profller, Coyot e Version 6.0. Scien ce Spec ialists, Inc. ca n be rea ched at 1800 Shec kler Rd.. Columbia City, IN 4675 , USA or on th e Web at http t/ zwwwzfwt.co m/ v. klmble/ sc ispec/scispec. htm . Design Why Build My Own I first th ought about adding a CNC ro uter to my too l collectio n after fi nishing a kitchen cab inet renovatio n in my home. I refaced the cabinets and bui lt 26 new doors. during w hich I d iscovered t hat door buildi ng can becom e mo noto nou s at best. As always hap pens w hen yo u tell or sho w yo ur fri ends and fam il y w hat yo u have don e, som eone w i ll have a sim ilar p roject and enlist yo ur help . Tha t someone was my frie nd Geoff S. He wanted to do the same thing to his kitchen-reface and install new cabinet doors. I agreed to help him and he decided on a style of doo r that can be ma de from o ne piece of ma terial cut to size and routed to create th e look he wanted . Of cou rse t he prospect of bu il ding a w ho le Jot of doo rs and making temp lates to faci litate the routi ng was n't too thrilling. That's w hen I t ho ught a sma ll CNC machine wo uld co me in han dy. All th e repeti ti ve rou ting cou ld be asslg ned to the CNC mach ine and t he doors w ou ld more closely resemble each other o nce huma n erro r had been removed from t he equation . Now the project didn't seem too bad at all! I started to look for an affordable machine to do the job, After searching the Intern et , I was shocked to find how mu ch the asking pri ce is fo r a CN C mach ine. I did fi nd a cou ple t hat were under 1 1- CNC Robotics 56000 U.S., bu t I ca n never co nv ince myse lf to buy a too l wo rth so much . Even if the cost of the ma chin e seems reasona ble you st ill have ship ping a nd du ties to pay, and in my case the excha nge ra te be twe en U.S. and Ca na dian dolla rs. All things considered, it was going to cost me in excess of 510,000 Canadian to get a CNC ma ch ine in my shed . I can 't afford that kind of pr ice tag! I sea rched for plans or a book that described what I wanted to bui ld. I did find some plans on the Internet but either the machine was too sma ll and inaccurate or the plans were expensive and requ ired the use of expensive components. I cou ldn 't find any books in print about a similar project. I won't buy plans that I can't get a good look at first , so the Inte rnet plans were out of the qu estion. I prefer books bec a use I ca n ho ld them and flip through the pages before I hand ove r th e cash. Books also cost less. I decide d to build my ow n ma ch ine us ing some off-t he-she lf linea l mot ion co mpo ne nts a nd so me co mpone nts tha t I salvaged or modified to suit the project . I thou gh t the most logica l thing wo uld be to docum ent my p rogress a nd share the inform a tion through a book . To sum ma rize, I deci ded to build my ow n ma chin e because I love a cha llenge a nd I learn mo re whe n I have a pra ctica l project; a lso, I ca n keep the cost low. It's that simple. Gantry Style In my op inion, a gantry styled CNC mach ine is sim plest to imp lement. A few years ago , I built a ba nd saw mill fram e and gantry, so the design of a more accura te system didn't seem too to ugh a pro ject. I a lso like the idea of moving the tool over the material ra th er tha n the mat er ial under the tool. A mach ine built to move ma teria l would not have as la rge a wo rking a rea for a given footpri nt. Con sidering my work shed is only 22 X 12 feet , a gantry mach ine is most suitable. Motors The first purchase to make was the stepper motor. My loca l Princess Auto has a grea t s urplus department, so I headed there 2 - - - - - - - - - - - - - - - - - - - - - - - I Chapter 1 / Design first. Sure enoug h, they had some step- syn motors (seen in Fig u res 1.1 and 1.2) . They ar e Nema frame size 34 , draw 1.4 amps per cha n nel , and have a rating of 4.6 volts. Figure 1,1 Ste p-Syn steppe r motor side view. Figure 1.2 Step-Syn ste pper mot or top view. U'~ LOT NO. 1'y o 8201 "; :' 0[ IN .; .\ P A "J 6038285-1 DPNK \ 0 ... C 3 ,- CNC Robotics These motors we re used in an IBM produ ct-probabl y a pr inter. They are unipolar, but if yo u run th em as bipolar the y produce more to rqu e (see Figure 1.3). 1 also discovered that t hese steppe r motors work better if t hey are given 12 vo lts ins tead of the 4.6-volt rating on th e motor body. The strength of a s tepper motor is rated in ou nce inches of holding torque. The ste p-sy n information 1 found ind ica ted tha t these motor s ar e an ywhere from 90 to 220 ounce inch es. I so metimes wo rk ba ckward s, and bu ying the motors first is ce rta inly just th at ! Norma lly, you would calculate w ha t strengt h of motor yo u nee d to run th e machine and then p urc ha se a s uita b le motor. Here's how to calculate the st re ngt h of motor you need to run this mach ine. If you can 't find any surplus mo tor s, investigate a company called Pacific Scientific-they ha ve a va riety of s teppe r motors and also make available soft ware for do wnloa d, w hich you ca n use to determine the size of motor yo u ne ed . Spe a king with them , I was impress ed with how we ll I wa s treated, cons ide ring 1 would only need th ree of the ir motors. Remember that although brand new motors ar e expe ns ive, you kno w the y will work and you ca n match the s trength to the machine. New motors could also speed up t he ma ch ine considerabl y. When 1 sa y "speed up ," it is important to not e that I am referring to travel s peeds, not cutti ng s peeds . Cutting speeds for most material s will be slow with this sty le of machine, rega rdless of whi ch motor you choose; you ca n't run a route r thro ugh wood at 200 inches per minute and ex pect the cut to look good . Cutting speeds of 10 to 30 inch es per minu te define the ra nge we can expect from th is mach ine wit h these motors. A faster ma chine can be expected to travel quickly w hen not cutti ng and slow down when cutti ng through mat erial. Lineal Motion There are a va riety of off-the-shelf lineal motion products , but mo st of the systems we re too expensive for thi s proj ect. Thinking th at it would be useful some day. 1 acq uired a NuArc co py cam era a few years ago (se e Figure 1.4 ), so 1 took it apart and found it 4 - - - - - - - - - - - - - - - - - - - - - - - - - - r-----------------------------.-. --~ Chapter 1 / Design STEP-SYN 103-820-0240 4.5V 1.4 AMP 2DEG/STEP WIRING DIAGRAM RED C rrI l l ' Wiring diagram of a Step-Syn stepper motor. + MOTOR SUPPLY UNIPOlAR CONNECTKlN ..lAllA} Figure 1 .3 PHASEA BLACK REDiWH lTE - BLUE WHITE PHASEC BLUEN/HITE - PHASE D BIPOLAR CONNECTIONS BIPOLAR HAlF WINDING (MORESPEED) r- PHASE A RED BLACK - All Al } C rrr rl) - PHASE B REDfWHITE - NOr CO NNEC TED BLUE - -- PHASE C WHITE - - PHASE D BLUEN/HITE- NOTC O NNEC TED L- BIPOLAR FULL WINDING (MORE lORQUEJ RED - C .u.. r'rrY) BLACK- - - PHASEA ~ W N" NOTCONNECTED !Jk'ir o REDiWHITE - PHASE B !J \C" ~No IJ,Wf. t< 7f' r1"'<' 10 71711"'<> J.AOI\ --'"88 85 86 ; 64 7 r- CNC Robotics Figure 1 .6 Closeup of the slide showing the bearings numbered 40 and the location of lead screw nut numbered 33 . Of the eight bearings, I found that onl y four were st ill in satisfactory condition fo r use. I decided that the x-a xis could be built in the same ma nner, employing open linea l bearings running o n a ra il tha t ha d been drilled a nd ta pped to allow the use of s upport bo lts. I also ch ose to ma ke my own bearing ho lders for th e x- ax is beca use the co st of preb uilt p roducts was more t han I co u ld justify. Rail s up port ma teri al is ava ilable a s we ll, but t he cos t of th is prod uct made me belie ve it wasn't required a nd t hat the bolts wo uld give the rail e no ugh su pport. I noti ced th a t t he copy came ra d idn't have any ext ra s up port under the rails. If you wanted extra s upport in a pro ject like this, it co uld be fashioned from two pieces of angle iron with a spacer, but the su rface it would be mounted on-conside ring the rail would be in con tact with the support-would have to be perfectly flat. As I had no intention of using perfect steel to bu ild this machine, having the bolts pro vide the support meant that they could be adjusted to bring the rail to a flat plane. Simi lar beari ngs an d ra ils cou ld be used for the z-axls, but I decided ins tead to use a sw iveling TV tray assembly bo ught a t the Home Depot. The glides ar e ra ted at 100 Ibs. to ho ld a te levisio n hori zontall y. My p ro ject would use t he glides vert ica lly, so they would be p lenty s trong, w ith la rge ba ll be a rings an d e nough tra vel for the z-a xls. The NuArc ca mera used 3/4 -i nc h bearings and support ra ils, so I decided to use th e sa me bearing and rail size on th e x- axis. 8 - - - - - - - - - - - - - - - - - - - - - - - - Chapter 1 / Design Motor Drivers At thi s point in the proj ect 1 had al read y pu rchased motors, so I looked at simple driver so lut io ns. The be st solution was found in th e form of th e 129 7 and 1298 integrated circuits manufactured by ST Microe lec tronics . The ir Web site ha s all the information needed to build a bipol ar stepper moto r d river using these two integrated c ircuits, w hich ar e often refe rred to as "chips." A driver built from these ch ips can ea sily pr ovide th e vo ltag e and amperage needed by the step sy n motors. Acme Screw The qu estion of how to move the gantry and a xes slides was a lso res olved by co st. I had originally conside red using ball screws, but afte r co mpar ing th e cos t of the ball screw wit h that of an acme screw, it didn 't ma ke se nse to spe nd three times a s mu ch on ba ll screws. The ad vantage s to usin g ball screws ar e tha t a sm aller motor ca n be used to move a given load, and with a pre load ed nut, the re is ve ry little ba ckla sh in the system. As mentioned ea rlier in thi s c ha pte r, this is a machine th a t will not s peed through its a ssign ed jobs so we can compe nsa te for ba ckla sh in the softw a re. Thi s mean s the project ca n be built usin g les s expensive a cme screws. I also had to de cide how many turn s per inch to put on the acme sc rew. My experiments w ith ready rod proved t hat too man y tu rns made fo r a nnoyingly slow movem ent and too few turn s redu ce s th e qu al ity of resolution tha t a llows the machine to make sm all , pr ecise movem ents. 1 sett led on a 1/2 -in ch acm e screw with eight turn s per inch, and a 6- foot length with a nut at a co st of $ 135 Canadian. ' Deciding on the Dimensions of the Machine Earlier in th e cha pte r 1 expla ined tha t I made t he deci sion of ma chine footprint size based on the a rea in my wo rks hop. 9 CNC Robotics Becau se I on ly have a space 12 X 22 feet a nd tools and mate ria ls cu rrently occupy most of th a t space, my mac hine wo uld o nly be ab out 7 fee t lo ng a nd 4 feet wide. The next step in this projeci was to ge nerate concept drawings, since I was going to use some of the components fro m the NuArc horizontal camera. The dimensions of the frame ended up being longer than the support rails in order to accommodate the bearing holders and the motor mount with a little roo m 10 spare. The width of the frame is a few inches sho rte r than the balance of a 6-foot acme lead screw, after the length needed for the z-a xis has been cut from it. The follow ing illustrations are the concept drawings 1 created to guide the co ns tr uctio n of the machine. Figure 1.7 is a drawing of the ma chine fro m the side. Figure 1. 7 View from side of proposed machine. The next illustrati on, Figure 1.8, is the width of the mach ine, viewe d from the front. Software After figur ing out the approximate shape and dimensions and de cid ing on stepper motors and drivers, the next questio n was which software to use to control the machine once finished. 1 looked a t a variety of software solutions and , since my level of experience wit h CNC machinery was nonexistent, I wanted a pro gra m tha t was easy to use. To communicate to the stepper moto rs 10 r- - - - - - - - - - - - - - - - - - - - - - - - - - - - - Chapte r 1 / Design Figure 1 .8 ~ Front view of machine - r- ~ ~ u u along its width . ~D [ 0 L0- a how to move so th e tool being used will follow the desired path, a p rog ra m is w ritten in G-code and M-code . The G- and M-codes are used to tell the machine w here to go in the xyx-axes areas of travel a nd what to do when it ge ts there. Very simple programs describing th ings like boxes o r circles are not ve ry comp licated to w rite yourself. 1 wa nted software that wo u ld allow me to create my own desig ns in a drawing program like CorelD raw and t hen import the drawi ng a nd a uto matica lly cre a te the necessary G- and Mcode file. 1 looked at some freeware but was disa ppointed by t he level of d ifficulty to imple me nt t he so ftware and get it doi ng what I wanted. Furt her research revealed software ca lled KCam that wou ld do exactly w ha t was necessa ry. See t he screen capture from KCam in Figure 1.9. KCam isn't freewa re, but it ce rtai nly isn 't expe nsive e ither at $100 U.S. pe r copy. The fact that KCam is not expensive s ho uldn't lead yo u to be lieve it is ineffective softwa re. It is extremely easy to use an d a llows yo u to customize the use of the p rinter port . KCam will 11
- Xem thêm -