• Provides step-by-step instructions for building your own CNC mochine • Greot for use os teoching tool in metol/wood shop 0 oron the industriol floor GEOFF ,WILLIAMS (J l CNC Robotics Build Your Own Workshop Bot Geoff Williams McGraw-Hili New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi SanJuan Seoul Singapore Sydney Toronto ./ Cataloging-in-Publication Data is on file with the LibraryofCongress 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 anyform 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 was Pamela Pelton. It was set in Tiepolo Book by Patricia Wallenburg. Printed and bound by RRDonnelly. McGraw-Hili books are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training pro grams. For more information, please write to the Director of Special Sales, McGraw-Hili Professional, Two PennPlaza, NewYork,NY 10121-2298.Or contact your local bookstore. II\ This book is printed on recycled, acid-free paper containing a \:CI 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 neitherMcGraw-Hili nor its authors shall be responsible for any errors, omissions, or damages arisingoutofuseof this information.Thisworkispublished with the under standingthatMcGraw-Hili and its authorsare supplyinginformation butare 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" I- I I I 1,,1 1 Design 1 Why Build My Own I Gantry Style 2 Motors 2 Lineal Motion 4 Motor Drivers 9 Acme Screw 9 Deciding on the Dimensions of the Machine 9 Software 10 2 Electronics 13 Stepper Motor Driver and Computer Interface Boards 13 Stepper Motor Driver Circuit 15 The Interface Board 19 3 Making the Printed Circuit Board 77 Tools and Material 77 Artwork 78 Board Cutting and Cleaning 82 Toner Transfer 85 Etching 93 4 Driver Assembly 99 The Interface Board III v GNG Robotics 5 Software Setup and Driver Testing 113 Material Needed 113 Creating Test Files 121 Triangle Test 122 Circle Test 123 Putting the Electronics in a Case 124 6 The Frame 133 Tools and Material 133 Bolting 138 Assembly 141 Bearing Rail Support Bolt Holes 144 Paint the Frame 151 7 The Gantry and X-axis 153 The Gantry 153 The X-axis: Installing the Gantry Bearing Guide Rail 160 Bearing Holder 164 8 The Z and Y Axes 175 The Z-Axis 175 The Y-Axls 184 9 Motor and Lead Screw Installation 189 Tools and Material 189 X-axis 190 Y-axls 199 Z-axis 203 Limit Switch Installation 206 X-axis Limits 208 Y-axis Limits 209 Z-axis Limits 211 10 File Creation and KCam 215 KCam CNC Controller Software 215 KCam File Requirements 219 How to Create a File to Import 222 CorelDraw 223 ACME Profiler 239 vi Contents 11 Tool Holders and Testing 245 Tool Holders 245 Penholder Tool 246 Router/Dremel Holder 252 Testing the CNC Machine 257 12 Examples 263 Plotter 263 Mechanical Engraving Tool 268 Dremel Tool 271 Master Craft Rotary Tool 274 Router 278 Sources of Material 293 Electronic Components 293 L297/L298 Integrated Circuits 293 CANADA 293 United States, California 294 Lineal Motion 296 Distributor 296 Manufacturers 297 Stepper Motors 300 Metal 301 Index 303 vii Acknowledgments Imust thank my brother Karlwho inspired me to write this book and my editor Judy Bass whose faith and assistance made the booka real ity.I'dalso liketo thank PatriciaWallenburg who assembled mywords and images into book form. Judy and Patricia have made this book projectan extremelyenjoyable experience. Finally mythanks go out to all the people who have freely shared with me their knowledge and assistance while Iwas researching and.building my CNC machine. Imust thank the following companies forallowing me to include some of their copyrighted materialin this book. The NuArc Company, Inc. doesn't promote, endorse.or warranty any modified products. NuArc let me reproduce some of the images from the repair manual of the copy camera Idisassembled but they don't endorse the use of their products for anything other than their origi nally intended function. You can contact NuArc at M&R Sales and Service, Inc. I N.372 Main Street,Glen Ellyn, IL 60137, USAor on the Web at http://www.nuarc.com. Kellyware has allowed me to use screen captures of the program KCam 4. Kellyware can be contacted at POBox 563.Spirit Lake. Iowa 52360, USA or on the web at http://www.kellyware.com. The product data sheets included with Chapter 2 of this book have been reprinted with the permission of STMicroelectronics. The docu ments reproduced in this book and many more useful application notes can be found at the STMicroelectronics Web site located at http://www.st.com. Science Specialists, Inc. has given me permission to include screen captures of the software ACME Profller, Coyote Version 6.0. Science Specialists, Inc. can be reached at 1800 Sheckler Rd.. Columbia City, IN 4675, USA or on the Web at httpt/zwwwzfwt.com/ v.klmble/ scispec/scispec.htm. Design Why Build My Own I first thought about adding a CNC router to my tool collection after finishing a kitchen cabinet renovation in my home. I refaced the cabinets and built 26 new doors. during which I discovered that door building can become monotonous at best. As always happens when you tell or show your friends and family what you have done, someone will have a similar project and enlist your help. That someone was my friend 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 door that can be made from one piece of material cut to size and routed to create the look he wanted. Of course the prospect of building a whole Jot of doors and making templates to facilitate the routing wasn't too thrilling. That's when I thought a small CNC machine would come in handy. All the repetitive routing could be asslgned to the CNC machine and the doors would more closely resemble each other once human error had been removed from the 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 Internet, Iwas shocked to find how much the asking price is for a CNC machine. I did find a couple that were under 1