CONTENTS Build Your Own CNC Machine ■ ■ ■ Patrick Hood-Daniel James Floyd Kelly i (cid:2)(cid:3)(cid:2)CONTENTS Build Your Own CNC Machine Copyright © 2009 by Patrick Hood-Daniel and James Floyd Kelly All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-2489-1 ISBN-13 (electronic): 978-1-4302-2490-7 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. President and Publisher: Paul Manning Lead Editors: Jonathan Gennick Technical Reviewers: Darrell A. Kelly, Jim Burt Editorial Board: Clay Andres, Steve Anglin, Mark Beckner, Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Coordinating Editor: Kelly Moritz Copy Editor: Damon Larson Compositor: Lynn L’Heuruex Indexer: Ann Rogers/Ron Strauss Artist: April Milne Cover Designer: Kurt Krames Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit http://www.springeronline.com. For information on translations, please e-mail [email protected], or visit http://www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales—eBook Licensing web page at http://www.apress.com/info/bulksales. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. ii ■ CONTENTS Patrick wishes to dedicate this book to his father – “Everyday I attempt to approach his level of logic and perfection. Rest in peace.” Jim dedicates this book to his dad – “I’ve learned a lot from you and enjoyed the company.” iii ■ CONTENTS Contents at a Glance ■About the Authors .................................................................................................................. x ■About the Technical Reviewers ............................................................................................ xi ■Acknowledgments ............................................................................................................... xii ■Introduction .......................................................................................................................... xiii ■Chapter 1: Your CNC Machine ............................................................................................. 1 ■Chapter 2: Hardware and Tools .......................................................................................... 5 ■Chapter 3: Tips and Advice ............................................................................................... 13 ■Chapter 4: Movement Using Rails .................................................................................... 23 ■Chapter 5: Joining Methods .............................................................................................. 35 ■Chapter 6: The Electronics ................................................................................................ 49 ■Chapter 7: X-Axis, Part 1 ................................................................................................... 73 ■Chapter 8: X-Axis, Part 2 ................................................................................................... 81 ■Chapter 9: X-Axis, Part 3 ................................................................................................... 91 ■Chapter 10: Y-Axis, Part 1 ................................................................................................. 99 ■Chapter 11: Y-Axis, Part 2 ............................................................................................... 109 ■Chapter 12: Y-Axis, Part 3 ............................................................................................... 121 ■Chapter 13: Preparing for the Z-Axis ............................................................................. 135 ■Chapter 14: Z-Axis, Part 1 ............................................................................................... 149 ■Chapter 15: Z-Axis, Part 2 ............................................................................................... 159 ■Chapter 16: Z-Axis, Part 3 ............................................................................................... 167 ■Chapter 17: Mounting the Electronics ........................................................................... 183 ■Chapter 18: Software and Testing .................................................................................. 197 ■Chapter 19: Where to Go from Here ............................................................................... 209 ■Index .................................................................................................................................. 217 iv ■ CONTENTS Contents ■About the Authors .................................................................................................................. x ■About the Technical Reviewers ............................................................................................ xi ■Acknowledgments ............................................................................................................... xii ■Introduction .......................................................................................................................... xiii ■Chapter 1: Your CNC Machine .............................................................................................. 1 What is CNC? .............................................................................................................................. 1 Industrial Uses ................................................................................................................... 2 Personal Uses .................................................................................................................... 2 Your DIY CNC Machine ................................................................................................................ 3 What’s Next? ............................................................................................................................... 4 ■Chapter 2: Hardware and Tools ........................................................................................... 5 The Tools .................................................................................................................................... 5 The Electronics Vendors ............................................................................................................ 12 What’s Next? ............................................................................................................................. 12 ■Chapter 3: Tips and Advice ................................................................................................ 13 Cut Once ................................................................................................................................... 13 Protect Yourself ......................................................................................................................... 14 Protect Your Lungs .................................................................................................................... 15 Label Parts ................................................................................................................................ 16 MDF Sheets and Sizes ............................................................................................................... 17 Limit Your Cuts .......................................................................................................................... 18 Time Your Cuts .......................................................................................................................... 20 Encouragement ......................................................................................................................... 20 What’s Next? ............................................................................................................................. 21 ■Chapter 4: Movement Using Rails .................................................................................... 23 Bearing-Rail Assembly .............................................................................................................. 23 Riding the Rail ........................................................................................................................... 32 Tips and Advice ......................................................................................................................... 33 v ■ CONTENTS What’s Next? ............................................................................................................................. 33 ■Chapter 5: Joining Methods ............................................................................................... 35 Two Pieces of MDF ................................................................................................................... 35 Method 1: Cross Dowels ............................................................................................................ 38 Method 2: Bolt, Washer, and Nut ............................................................................................... 43 Which Method Is Best? .............................................................................................................. 44 Building a Jig to Drill ................................................................................................................. 45 What’s Next? ............................................................................................................................. 47 ■Chapter 6: The Electronics ................................................................................................. 49 The Required Components ........................................................................................................ 49 Preparing the Stepper Motor Wires ............................................................................................ 53 Preparing the Power Supply ...................................................................................................... 56 Preparing the Breakout Board.................................................................................................... 59 Providing Power to the Stepper Motor Drivers ............................................................................ 62 Wiring Motor Drivers to the Breakout Board ............................................................................... 64 Connecting Power to Motor Drivers ........................................................................................... 65 Connecting Stepper Motors to Motor Drivers ............................................................................. 67 Wiring the Cooling Fan .............................................................................................................. 69 Testing the Electronics .............................................................................................................. 70 What’s Next? ............................................................................................................................. 71 ■Chapter 7: X-Axis, Part 1 .................................................................................................... 73 The X-Axis MDF Parts ................................................................................................................ 73 The X-Axis Table ....................................................................................................................... 74 Cutting Rails for Tabletop Sides ................................................................................................. 79 Summary of Work ..................................................................................................................... 80 What’s Next? ............................................................................................................................. 80 ■Chapter 8: X-Axis, Part 2 .................................................................................................... 81 Drilling the Table ....................................................................................................................... 81 Drilling Holes for Legs ............................................................................................................... 85 Cutting the Table Ends .............................................................................................................. 86 Summary of Work ..................................................................................................................... 90 Hardware Required ................................................................................................................... 90 What’s Next? ............................................................................................................................. 90 ■Chapter 9: X-Axis, Part 3 .................................................................................................... 91 Drilling the Table Ends (Legs) .................................................................................................... 91 vi ■ CONTENTS Drilling and Mounting the Rail ................................................................................................... 95 Attaching the Table Legs ........................................................................................................... 96 Cutting the X-Axis Lead Screw .................................................................................................. 97 Summary of Work ..................................................................................................................... 98 Hardware Required ................................................................................................................... 98 What’s Next? ............................................................................................................................. 98 ■Chapter 10: Y-Axis, Part 1 .................................................................................................. 99 The Y-Axis MDF Parts ................................................................................................................ 99 Parts Q and R: The Y-Axis Gantry Sides .......................................................................... 100 Building BRAs for Gantry Sides....................................................................................... 105 Summary of Work ................................................................................................................... 108 Hardware Required ................................................................................................................. 108 What’s Next? ........................................................................................................................... 108 ■Chapter 11: Y-Axis, Part 2 ................................................................................................ 109 The Y-Axis MDF Parts .............................................................................................................. 109 Attaching BRAs and Gantry Sides ............................................................................................ 110 Part P: The Y-Axis Gantry Bottom Support ............................................................................... 114 Summary of Work ................................................................................................................... 119 Hardware Required ................................................................................................................. 120 What’s Next? ........................................................................................................................... 120 ■Chapter 12: Y-Axis, Part 3 ................................................................................................ 121 The Y-Axis MDF Parts .............................................................................................................. 121 The Rail Support ...................................................................................................................... 122 Finishing the Y-Axis Frame ...................................................................................................... 128 Tips on Final Frame Assembly ................................................................................................. 132 Summary of Work ................................................................................................................... 132 Hardware Required ................................................................................................................. 132 What’s Next? ........................................................................................................................... 133 ■Chapter 13: Preparing for the Z-Axis ............................................................................. 135 The Y-Axis BRA Supports ........................................................................................................ 135 Cutting and Drilling Parts C and D ........................................................................................... 136 Measuring for the Z-Axis ......................................................................................................... 144 Summary of Work ................................................................................................................... 146 Hardware Required ................................................................................................................. 147 What’s Next? ........................................................................................................................... 147 vii ■ CONTENTS ■Chapter 14: Z-Axis, Part 1 ................................................................................................ 149 The Z-Axis MDF Parts .............................................................................................................. 149 Part F: The Z-Axis Rail Support ................................................................................................ 150 Parts W and X: The Z-Axis Bearing Supports ........................................................................... 154 Z-Axis Bearing-Rail Assemblies ............................................................................................... 155 Summary of Work ................................................................................................................... 157 Hardware Required ................................................................................................................. 157 What’s Next? ........................................................................................................................... 157 ■Chapter 15: Z-Axis, Part 2 ................................................................................................ 159 Preparing to Drill ..................................................................................................................... 159 Drilling Part F: The Z-Axis Rail Support .................................................................................... 159 Drilling Parts W and X: The Z-Axis Bearing Supports ................................................................ 161 Mounting the Z-Axis Bearing-Rail Assemblies .......................................................................... 164 Summary of Work ................................................................................................................... 166 Hardware Required ................................................................................................................. 166 What’s Next? ........................................................................................................................... 166 ■Chapter 16: Z-Axis, Part 3 ................................................................................................ 167 Cutting the Z-Axis Rail Support Rails ....................................................................................... 167 Cutting and Drilling Parts M and N ................................................................................. 169 Cutting and Drilling Part V .............................................................................................. 173 Assembling the Z-Axis ............................................................................................................. 174 Attaching the Z-Axis to the Machine ........................................................................................ 176 Summary of Work ................................................................................................................... 181 Hardware Required ................................................................................................................. 181 What’s Next? ........................................................................................................................... 181 ■Chapter 17: Mounting the Electronics ............................................................................ 183 Cutting and Drilling the Motor Mounts ..................................................................................... 183 Mounting Your Router .............................................................................................................. 191 Summary of Work ................................................................................................................... 194 Hardware Required ................................................................................................................. 195 What’s Next? ........................................................................................................................... 195 ■Chapter 18: Software and Testing ................................................................................... 197 CAD, CAM, and Control Software ............................................................................................. 197 The Mach3 Control Software ................................................................................................... 197 Downloading and Installing Mach3 .......................................................................................... 198 viii ■ CONTENTS Configuring Mach3 .................................................................................................................. 200 Ports and Pins ................................................................................................................ 200 Motor Outputs ................................................................................................................ 201 Input Signals .................................................................................................................. 201 Motor Tuning and Setup ................................................................................................. 202 Configuring the Default Motor Units ............................................................................... 203 Testing Your Machine .............................................................................................................. 203 Testing the Router ................................................................................................................... 206 School Starts ........................................................................................................................... 207 What’s Next? ........................................................................................................................... 208 ■Chapter 19: Where to Go from Here ................................................................................ 209 Getting Familiar with CAD ........................................................................................................ 209 Getting Familiar with CAM ....................................................................................................... 210 Installing an Emergency Stop .................................................................................................. 210 Adding Limit Switches ............................................................................................................. 213 Adding a Solid State Relay ....................................................................................................... 214 Protecting and Painting Your Machine ..................................................................................... 215 What’s Next? ........................................................................................................................... 215 ■Index ................................................................................................................................... 217 ix