A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC...

34

Transcript of A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC...

Page 1: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

A Guide to CNC Machining

December 26, 2013

This document is a guide to making a PCB using the CNC machine. There are two ways to create a PCB, andchoosing one over the other depends on purposes and formats of �les. The two ways are:

1. Using a MATLAB code - If your PCB layout is simple to draw, is a black & white picutre, and has onlyone drilling depth, this might be the best way to go. This method uses a jpg �le of the circuit and creates aG-code based on the drilling depth and the same x and y scaling. This is the easiest way to go - just provideMATLAB with the picture, the drilling depth and the pixel ratio and MATLAB will generate a G-Code.There are several drawbacks for this method such as a uniform drilling depth, using black and white picturesonly, the tool to be used is similar for the whole job etc. This method is explaned in Part I - G-Coding anImage

2. Using DipTrace and CopperCam - DipTrace is a program many use to draw electric circuits. After usingthis program there is a simple procedure to follow to create a G-code for producing the PCB. Again. thismethod is more time consuming but after following the procedure the results are more percise than using theMATLAB code. This method provides a G-Code for every di�erent bit used during the making of the PCB,and so this method allows di�erent drilling depths, di�errent x and y scaling, and di�erent types of drills.This method is covered in Part II - G-Coding a PCB.

Contents

I G-Coding an Image 3

II G-Coding a PCB using DipTrace 4

III The CNC Machine 6

1 The CNC Machine 6

2 The Control Board 6

IV Mach3 Operation 9

V Bit Types 11

3 V-Shape Carving Bits 11

4 PCB End Mills 11

5 PCB Drill Bits 12

6 End Mills 13

1

Page 2: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

VI Appendix A: Stepper Motor Driver Breakout Board 14

2

Page 3: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Part I

G-Coding an Image

CNCing an image is done using a MATLAB script that converts the image to CNC code. There are several thingsto know before deciding on this method for CNC:

� First this method works for a B&W pictures only. This means that �rst, the image that is inserted to theMATLAB code must be black and white. If a picture that is not black and white is provided, the code will�round� the color of the pixel (i.e. if the color is dark, it will count it as a black pixel). This means that nogray areas should be present in the picture �le, and if there are some gray areas, you might be surprised.

� This method is not the most e�cient way to CNC a picture, but it works. The code is converting the imageinto three matrices (RGB). Then, these three matrices are converted to a gray-scale matrix, and this gray-scaleis then converted into G-code.

� Another thing to consider is, that this method does not compute the script with consideration to the toolused. For example, if one wants a hole drilled to the board, the program will calculate the path that the toolin use has to do, but will not consider the width of the tip of the tool etc. This means that if your work isdelicate, you might need to use some other procedure.

� The MATLAB scripts works well for pictures with more than 100 pixels per axis. If the picture has smallamount of pixels, the script might produce a code that won't resemble the actual picture. So, before usingthis script, choose a good-enough picture (at least 100X100 pixels).

After going over all the warnings before using this script, now is the time to start producing the G-Code:

1. Open MATLAB, and �nd the script �G_code_gen� in the MATLAB folder.

2. To start producing the code, write the following line in MATLAB: G_code_gen('�le adress','�le name','�letype',pixel ratio, depth of drill).

(a) File adress - put here the adress of the picture without its name, for example: 'C:\Documents adSettings\Ra� Cohen\My Documents\My Pictures'.

(b) File name - put here the name of the picture without its type, for example: 'earth'.

(c) File type - put here the type of the picture, for example: 'jpg'.

(d) Pixel ratio is the amount of milimeters to be equivalent to one pixel in the image. For example, if yourimage is 100X100 pixels and the real dimentions should be 1cmX1cm then the pixel ratio would be:

P.R. =1cm

100pxls=

10mm

100pxls= 0.1mm

Its best to check the dimentions of the �nal code after its production to make sure that the �nal dimentionsare the ones wanted.

(e) Depth of drill is the depth of the drilling. This �eld is stated in mm. An important advice: do notstart with a great depth since drilling deep applies an enormous torque on the drilling bit, and mightcause some damage. Start with a shallow depth and create several codes to reach the wanted depth. Forexample, if the �nal depth to be drilled is 1mm, start with a 0.2mm code, then 0.5mm code, then 0.8and then 1mm. The more codes in between the initial state and the �nal state, the safer the job is forthe machine, and for the drilling bits. Also the more codes you produce the better your job will be (sincegoing over a part several times will make sure that this part is actually drilled properlly).

3. Make sure if you are going to use the Free Demo version of Mach3 or the full one. There are several lines ofcode in the MATLAB script that are intended only for the demo version. If you are using the demo version,there is a limit for 500 lines of G-code per �le, so make sure the right lines inside the script are not markedas comments. If you are using the full version, select the lines inside the script and ctrl+R will make themall a comment.

4. That's it! Run the MATLAB code and wait for the �les to be created. If you are using the demo version, oneor several �les will appear inside the current folder, numbered in the order of operation. If you are using thefull version, you will get one long txt �le with the G-Code.

3

Page 4: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Part II

G-Coding a PCB using DipTrace

This method is used whenever one wants to create a complicated circuit board. For a simple circuit board, theImage method might be easier (if one can simply draw the circuit on a computer, and no special drills are needed).This method requires more work, but does create the drills with consideration of the tool used, and using DipTracecan make complicated circuits easier to make.

First, the basic assumption is that the circuit that has to be drilled is already planned in DipTrace. After thisis done, one must follow these steps in order to create several drilling �les:

1. Load the schematics in DipTrace PCB layout. If you don't have the schematics in DipTrace PCS layout thanopen the schematics in DipTrace Schematics, and press Ctrl + B (or �le-> Convert to PCB).

2. Press File-> Export->Gerber . A new window will open. Now choose from the list on the left the Top layer,and press the Export botton on the bottom of that window. Press yes on the popped window and save the�le. Repeat this process for the Board Outline layer.

Figure 1: File->Export->Gerber

Figure 2: Choosing Top layer (and later on the Board Outline layer as well)

4

Page 5: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

3. Now, go to File->Export->N/C Drill. Again, a new window will open. Now press export (on the bottom)and click yes on the popped window. Save the �le. Now close the window.

4. Open CopperCam. Press File->Open->New Circuit and choose the Top layer and press open (if you don'tsee your �le, make sure that you are watching �All �les� and not only CopperCam �les).

5. Press File->Open->Drills and choose the drilling �le saved before. Press yes if a window pops up.

6. Press File->Open->Additional Layers and choose the Board Outline from before. Again, if a window popsup just press yes.

7. Now, on the top line of CopperCam, press the right-most button (has a sign of 5) and change it so it has a 6

sign on it .

8. Move the o�set of the drilling job. Go toe File->O�set and choose the o�set if needed.

9. Press the green botton on the top row that has a small 1 sign .

10. Go to File->Origin and change the starting point of the machine.

11. Set PCB Isolating . A window will pop-up. Press OK.

12. Press the Copper button . Now the circuit should turn into copper color (instead of the green coloruntil now).

13. Choose Parameters-> Tool Library. In this library, insert the dimentions of the di�erent tools you are aboutto use. Press OK when done.

14. Go again to Parameters->Selected Tools. After selecting the tools for the job on the left, choose on the righthand side of the window �Use for each drill the closest smaller tool, with circular boring�. Press OK.

15. Press on the Mill botton (lightning and drill sign). Select only one Sequence at a time. Select the job to bedone (Engraving for example, with the selected tool for enrgraving), and mark the FlipX mark on the rightside. Press OK and the G-Code is ready for the Engraving part of the PCB. Repeat this process for all theother Sequences to be done (drilling and cutting). Notice that for each job you are getting di�ernet G-Codes.It might be a good idea to save the �les with names that contain the tool to be used.

16. The G-Codes are ready. Procede to Mach3 Manual in this guide.

5

Page 6: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Part III

The CNC Machine

This section will deal with the actual CNC machine, and its parts. The actual machine is built out of two majorparts - the CNC machine and the motor controll and power supply board. We will start with the CNC machineand then describe the parts in the control board that are connected to every of these elements.

1 The CNC Machine

The CNC machine is a triple-axis machine that has three axis motors, a spindle, home and limit switches and anemergency stop button:

1. The Axis Motors: the motors are esencially the parts that move the drilling bit to its destination andcreate the depth of drill. There are three motors - one for each axis that are responsible for the movement inthat axis. These motors get their power from the power supply from the control board which basically comesfrom the 220V power source (i.e. the wall). The tuning of these motors is done via the Mach3 program and afurther explanation of this process will be presented in Part V - Mach3. For now, we'll consider these motorsas the movement generators of the drilling bit.

2. The Spindle: the spindle is an extra motor that gets the drilling bit to rotate. When doing any job onthe CNC the spindle has to be turned on to get the spinning motor running - this will get the drilling bit tostart turning. If one is not cautios enough, and getting the drilling bit to go down and start drilling withoutturning this might cause some damage to the drilling bit, so pay attention before each job that before thedrilling bit goes down it starts spinning. Turn the ON-OFF switch on the top of the spindle to ON, and theG-Code will take care of the rest.

3. Home and Limit Switches: the hime and limit switches are used to tell the machine if it reached a pointthat it cannot cross. For example, if the work loaded asks the machine to reach 12� distance but the machineis only 7�, then while the machine moves it will press one of those limit switches, thus creating a signal thatwill stop the work. Same for home switches - the machine cannot go to -2 if the home switch is on the tip ofthat axis. The wiring of the switches is critical and we shall elaborate on this point. There are two types ofswitches available on CNC machines. The �rst type is Active High which means that whenever there are 5volts between the two terminals of the switch, that switch is turned on. When there are 0 volts between theterminals, the switch is turned o�. The second type of switches is Active Low, which basically means thatthe opposite happens - whenever there are 0 volts between the two terminals, the switch is activated, andwhen there are 5 volts between them the switch is turned o�. Our machine has the Active Low switches -so whenever a switch is not pressed the voltage di�erent between its two terminals is 5 volts and its notactive . When the switch is pressed, the voltage di�erence becomes 0 volts and the switch is activated. Thispoint is crucial and it will become clear as to why in the Mach3 section.

4. Emergency Stop Button: the emergency stop button is a big red button placed on the right hand side ofthe machine. Its purpose is simple - whenever something goes wrong, press this button and the machine willstop. Essentially, its pretty much the same as the limit switches, but the fact that its more accessible makesit easier to press. Anyhow, this is a very fast way to stop the machine, so know its there and keep in mindthat whenever something goes wrong you can press it and the machine will stop.

The machine part is the more mechanical part of the whole system. Whenever there is a signal but there is nomovement it might be a good idea to start checking the voltage supplied to the actual motors. The same with thelimit, home and emergency stop switches - checking them is the �rst thing to do when one does not get the signalintended. If the problem is not found on those mechanical components, the next step is to check the control board.

2 The Control Board

The control board is the voltage-supplying and signal-generating part of the system. There are two main purposesfor this board - to provide the motors and the di�erent elements on the board with su�cient power, and to generatesignals to the computer from whatever happens to the machine. The control board consists of four di�erent parts:

6

Page 7: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

1. The Breakout Board: this part is essencial for signal transfer to the computer. Its the blue board that'splaced on the corner of the whole control board. The breatout board gets inputs from the switches and fromthe motors and gets the information passed to the computer via parallel cabel (the big one with 25 pins). Also,this board has a USB connection which only supplies the board with power (and does not pass informationto the computer). This board also allows the computer to control the spindle. Connection to this board aredesctibed in the next three �gures:

Figure 3: Home switches wiring

Figure 4: Limit switches wiring

Figure 5: Spindle Relay wiring

2. The Switch Board: this board is a home-made board that makes the connections between the switches

7

Page 8: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

easier. If you noticed, several switches are connecting to the same place on the breakout board. This boardwas created in order to make those connections easier and to reduce the number of wires going straight intothe breakout board. The basic rule for the wires coming in to this board is this: green wires are the positiveterminals of the switches, red wires come from the emergency stop, and black are the ground wires. The wirescoming out of this board are: red for positive terminal of the limit switches and the emergency stop, yellowfor the di�erent homing switches and black are ground. If you are not sure about the connection go back andcheck the diagrams for the breakout board and things will come clear.

3. Three Driver Boards: these boards are connected to the 12V power supply and get the three axis motorsrunning. Each of those boards is connected to the main power supply with two cables (red for the positiveend and black for ground), four wires that are connected to the appropriate motor and additional four wiresthat are connected to the breakout board. You can see the connections in the following �gures:

Figure 6: Connections of the three motor drivers to the power supply and to the breakout board

Figure 7: connections from one motor driver to power (left) to the appropriate motor on the machine part (nextfour wires) and to the breakout board (the four wires on the right)

8

Page 9: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Part IV

Mach3 Operation

Mach3 is a program that allows control over the CNC machine using a computer connected to it with a Parallelcable. Since this program is complex, many of its features are not used in a standard job. Because of this, in thissection I will cover only the main crucial buttons and functions to know. If your needs are not satis�ed by the endof this section, take a look at the o�cial Mach3 Installation Guide.

The �rst thing to know about Mach3 is that it must operate on the Admin user of the computer and not onany other user. So, if you tried opening Mach3 using a di�ferent user that will cause problems. Another importantthing to note is, that when opening Mach3 use the Mach3 Loader icon, and not any other pre-made pro�le. Onceopened, Mach3 will present you with the di�erent pro�les available for your machine. Use the TB6560 pro�le - thisone was created especially for our CNC machine. If this pro�le is for some reason unavailable check the Mach3Installation Guide and use appendix A to get the correct con�guration to your machine.

Mach3 has 7 screens available. If you take a look at the top part of the window you will �nd this:

Figure 8: screen selection tabs

The main screens we will focus on are the Program Run and the Diagnostics. Other screens will be explainedbasically and for additional information please take a look at the formal Mach3 guide.

The Program Run screen is the screen were the CNC machine reports its position, its axes and the programrunning at the moment. Its important to understand this screen since most of your job is before and after runningthe G-Code and not while the machine is running. So, at the top left corner there is a gray window. While there isno code loaded this window will remain empty, but once you load you G-Code, the lines of the code will apprearehere. This allows easy track of what the machine is doing and what its going to do.

Right below this gray window, there are seven buttons that allow to open, edit and close a G-Code, to start ajob from a certain line, to reverse the run, and to do the job single bloke at a time. The four buttons that allow usto open and close a G-Code are of interest to us, since following the last two parts, one already has a G-code andjust wants to run it on the machine. The buttons are self-explanatory. If you want to load a G-code, press the loadbutton. If you want to load another G-Code after another, close the G-Code �rst, and then load a new one. Belowthose four buttons are a �Run from Here� button and �Set Next Line�. The �Run from Here� is a useful buttonsince if one stopped a job, and now wants to start it over but not from the beginning, the use of this button helps.

To the right of this section, there are three sections we will not go into very deeply - the tool information, theFeed rate and the Speed rate. These will be well de�ned using both ways of generating your G-code.

The three buttons on the left hand-side of the screen are also extremly important, especially the �Cycle Start�and the �Stop� button. The �Cycle Start� button allows one to start the G-Code loaded. The �Feed Hold� buttonholds the machine in the same place with the spindle running and waits for a start command. The �Stop� buttonstops the machine from operating - the spindle will stop rotating and the machine will stop moving along the axes.Its important to understand the di�erences between those three buttons if something suddenly doesn't look right.

The most important button in the Program Run screen is the �Reset� button placed on the left-side buttom ofthat screen. When this button is unpressed the machine cannot move at all and all movement commands from thecomputer will produce no movement from the machine what so ever. When this button is pressed, it turns greenand the machine can operate. Be sure to press this button when you want to start a job and press it again after youare done - you really don't want the machine moving after �nishing the drilling and cutting. Also, after pressingthe �Stop� button, the spindle will stop operating until after you press the �Reset� button twice - once for stoppingthe machine and another time to start it again. This is a �defense mechanism� of the program to prevent injuriesfrom the rotating spindle.

9

Page 10: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

The top right section of the Program Run screen is the axes section and it is crucial to understand how to usethis section before starting the job. There are three �elds showing the coordinates of the machine at the presentmoment. Next to each of those �elds, there is a Zero X/Y/Z button. Pressing this button will de�ne the zeropoint of that coordinate. Next to those buttons there is a long button �Ref All Home�. This button will move yourmachine to the zeros de�ned for each axis - so

10

Page 11: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Part V

Bit Types

For every work there are several bits needed. The bits are shapped di�erently and each is better for a certain job.Its highly important to use the right bit for the job at hand, for keeping the bit unharmed and doing the job right.This part contains a description of the di�erent bits at the lab (as of the moment) and a little explanation on eachof them.

3 V-Shape Carving Bits

The carving bits have a conical shape and are extremely sharp. Making the smallest head-on move might cause thetip to break so extreme care should be taken when using those bits. Those have a tip of 0.1mm, and the V-Shapeis 30 degrees. Those bits have a shank of 1.8mm and are good for small scale soft material carving with CNC.

Figure 9: V-Shaped Carving Bits

4 PCB End Mills

The PCB end mills are another type of bits. Those are designed for cutting trace patterns of PCB layouts. ThePCB end mills are made of titanium which gives extended cutting life. You will recognize them by the colored ringon the middle of the bits. Right of this moment, there are three types of PCB end mills in the lab:

1. 1.2mm PCB Endmill - has a green color. The cutter edge diameter is 1.2 mm. The shank diameter is 3.175mm (or 1/8 inch). The cutting edge length is 3/16 inch. The overall length is 1 1/2 inch.

Figure 10: 1.2mm PCB Endmill

2. 1.5mm PCB Endmill - has a pink color. The cutter edge diameter is 1.5 mm. The shank diameter is 3.175mm (or 1/8 inch). The cutting edge length is 3/8 inch. The overall length is 1 1/2 inch.

11

Page 12: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 11: 1.5mm PCB Endmill

3. 1.8mm PCB Endmill - has a blue color. The cutter edge diameter is 1.8 mm. The shank diameter is 3.175mm (or 1/8 inch). The cutting edge length is 3/8 inch. The overall length is 1 1/2 inch.

Figure 12: 1.8mm PCB Endmill

5 PCB Drill Bits

These bits are designed for drilling holes - just going up and down. No cutting is done with these so be careful. Wehave several drilling bits:

1. 0.5mm PCB Drilling Bit - 0.5 mm drill bit for PCB hole drilling and 1/8 inch shank.

Figure 13: 0.5mm PCB Drilling Bit

2. 0.8mm PCB Drilling Bit - 0.5 mm drill bit for PCB hole drilling and 1/8 inch shank.

Figure 14: 0.8mm PCB Drilling Bit

12

Page 13: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

3. 1.0mm PCB Drilling Bit - 0.5 mm drill bit for PCB hole drilling and 1/8 inch shank.

Figure 15: 1.0mm PCB Drilling Bit

6 End Mills

Right now, the lab has two types of drilling bits that are not made especially for PCB:

1. 1/8 Endmill - This is a pretty massive tip that's made out of carbide. This one have a 3mm tip, 3.175 mmshank and is suitable for cutting �at bottom or pro�ling.

2. 1/8 inch PVC Wood Pro�le Cutter - This carbide pro�le cutter is made of high quality material to insure thelong last and super clean pro�le cutting edge on soft material, such as wood, pvc and etc. 1/8 inch shank andcutting diameter.

Figure 16: 1/8 inch PVC Wood Pro�ce Cutter

13

Page 14: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Part VI

Appendix A: Stepper Motor Driver Breakout Board

� 3x Expandable Control Package Sample con�guration �le for Mach3(Available Here) (Some alterations maybe still be required)

� Printer Parallel Cable. (Male to Female) This will be used to communicate from your computer to thebreakout board via CNC control software.

� USB Cable (A Male - A Male USB Cable) A USB cable is need to give power to the breakout board.It canbe connected to a computer or our switchable power supply.

Features

� Compatible with Mach3, EMC2 Control Software

� Support up to 5 Axis stepper motor drivers

� Onboard spindle relay allows the on/o� spindle control through Mach3 software

� 5 Input signal pins for homing, probing and EStop/Limit switches.

� Using USB for signal processing 5V power supply

� Parallel port communication between the driver board and desktop computer (with Parallel port)

Pin De�nitions

� Pin 1 - Enable

� Pin 2 - Motor 1 Step

� Pin 3 - Motor 1 Dir

� Pin 4 - Motor 2 Step

� Pin 5 - Motor 2 Dir

� Pin 6 - Motor 3 Step

� Pin 7 - Motor 3 Dir

� Pin 8 - Motor 4 Step

� Pin 9 - Motor 4 Dir

� Pin 10 - Input Signal, can be used for estop and limit switches

� Pin 11 - Input Singal, can be used for X homing

� Pin 12 - Input Singal, can be used for Y homing

� Pin 13 - Input Singal, can be used for Z homing

� Pin 14 - Input Signal, can be used for Spindle on/o� control

� Pin 15 - Input Signal, can be used for probing

� Pin 16 - Motor 5 Step

� Pin 17 - Motor 5 Dir

14

Page 15: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Wiring Instruction

Figure 17: This diagram can be used as a reference throughout this tutorial.

Figure 18: Along with your recently purchased ZTW breakout board package, you will also need a male-male usbcord, stepper motors, and parallel port cable. You will also need some wires to connect everything together.

15

Page 16: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 19: Let's start by connecting a piece of 4-wire cable to the breakout board. Be sure the ends are strippedand the wire is exposed approximately ¼�. Start by connecting to one of the 3 front terminal blocks.

Figure 20: Be sure to tighten down the terminal screws snug enough so they will not pull out. I have the colorscoordinating as follows: Black=EN , Green=DIR , Yellow=STEP , Red=COM

16

Page 17: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 21: Do the same procedure for the other 2 terminals, being sure to keep the color order the same for each.This will make things easier later. DSCN7149.jpg Step 005 Now we can connect the other end of the wires to thestepper drivers. We will start with X and then move onto the other 2.

Figure 22: Now we can connect the other end of the wires to the stepper drivers. We will start with X and thenmove onto the other 2.

17

Page 18: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 23: Now, when connecting to the driver board, I used the following color sequence: Yellow=PUL- ,Red=PUL+ , Black=EN- , Green=DIR-

Figure 24: Now, since the COM terminal on the breakout board is positive, we want to connect all the positiveterminals on the stepper driver with jumper wires. So, start by inserting a jumper with our red wire and snug thescrew down.

18

Page 19: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 25: Now we will want to insert the previous jumper, along with another new jumper into EN+ together

Figure 26: Lastly, insert the remaining jumper end into DIR+. Essentially all we have done is connected PUL+,EN+, and DIR+ all together.

19

Page 20: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 27: Here you can see all the connections. DSCN7157.jpg Step 011 Now we can do the same procedure forY. Start by connecting the breakout board to the Y-Driver board the same as was done for the X.

Figure 28: Now connect all the jumper wires between the �+� terminals again.

20

Page 21: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 29: Follow the same procedure for a third time for the Z-Axis. You now should have all 3 stepper driversconnected to the breakout board.

Figure 30: Next, grab your power supply. I will be using our 12-24V switching supply, but the 12V supply includedin the kit work the same way.

21

Page 22: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 31: Connect the power supply to one of the driver boards. Be sure to get the positive from the power supplyto the �+� on the driver board and negative from the power supply to the �-� on the driver board. Don't tightenthe screws down just yet.

Figure 32: We now need to add two jumper wires to the previous connection. I will use the black jumper for thenegative and the yellow for the positive 12V. Plug those in and now go ahead and tighten the terminal screws,being sure both wires are tight and don't pull out.

22

Page 23: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 33: Run the other end of the jumper wires into the positive and negative on the next driver board. Alongwith those, insert another set of jumpers in order to connect the third driver board.

Figure 34: We now essentially have the 12V power supply connected to all three driver boards.

Figure 35: Here is the �nal setup.

23

Page 24: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 36: If you are using the switchable power supply or any other, be sure it is set up for 12V.

Figure 37: Now we can go ahead and connect your male to male USB cord to the power supply (or computer ifyour power supply does not have a port). This cable is not used for any data transfer, just for power.

24

Page 25: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 38: Connect the other end of the cable to your breakout board.

Figure 39: Here is what should be connected at this time.

Figure 40: Now, grab one of your stepper motors and let's determine the wiring.

25

Page 26: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 41: Begin touching pairs of wires together with an ohm meter to determine which pairs of wires are connectedto each other. Once you get 2 wires that give a resistance, keep them together (this will give us the �A� pair andthe �B� pair.

Figure 42: Here I have separated the 2 pairs of wires.

26

Page 27: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 43: Now plug in the �B� pair to the stepper driver. (Which pair is �A� and �B� does not matter at thistime.)

Figure 44: Finish by connecting the �A� pair to the stepper driver. Perform the last 5 steps over again for the other2 motors.

27

Page 28: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 45: Go ahead now and plug your parallel cable from your computer into the breakout board.

Figure 46: Connect your power supply's power cable.

Figure 47: Connect the power supply to the wall. You are now �nished with the hardware installation. Next wewill work on the software.

28

Page 29: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

After installing the Mach3 program (will be explained in the appendix) follow these instructions to set the rightcon�guration to the home & limit switches, the motors and the emergency stop:

Figure 48: Click the �con�g� tab, then choose �ports and pins�.Choose the �motor outputs�, and be sure to copy thesettings that you see in the above screen shot. If after completing this entire tutorial, your directions are reversed,you can return to this page and click the �Dir LowActive� for the axis that is moving the wrong direction.

29

Page 30: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 49: Now choose the �input signals� tab and copy the settings above over.

30

Page 31: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 50: Scroll down a little ways until you see the �Estop� signal. Be sure and copy these settings for the Estop.

31

Page 32: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 51: Lastly choose the �output signals� tab and copy over these settings. Then you can click �apply� and�OK�. You should now have the proper settings to run Mach3.

NOTE: If this is your �rst time setting up Mach3, you should check out our other wiki pages on con�guringMach3's settings.

Figure 52: Use the above diagram to wire up your homing switches. This method of wiring will work with the waywe just set up Mach3. There are several ways to go about doing this, so this is just one example.The switches shownhere are wired in the "normally open" position. If you do not have these exact switches, you can use a ohm meterto determine which 2 terminals are normally open. Basically touch the two terminals to the ohm meter, when theswitch is depressed the ohm meter should display 0.00 Ohms.

32

Page 33: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 53: Use the above diagram to connect your limit and emergency stop switches. Each of the switches getsone terminal connected to the common ground, and the other terminal gets connected to the Emergency/Limitterminal on the breakout board. Like before, there are several ways to do this and this is just one example. Allof these switches are wired in their normally open position just as before. If you purchased your emergency stopmushroom switch from us, you can wire it exactly as shown. Otherwise, use an ohm meter to determine whichterminals are used for the normally open setup. The setup of Mach3 performed earlier will work properly with thiswiring method.

33

Page 34: A Guide to CNC Machiningpoliscihuji.wiki.huji.ac.il/images/CNC_Guide_partial.pdf · A Guide to CNC Machining December 26, 2013 This document is a guide to making a PCB using the CNC

Figure 54: Use the above diagram to wire your spindle if you would like to be able to turn it on and o� via Mach3.This setup utilizes the breakout board's onboard relay to act as a switch. The relay is controlled via Mach3 to inturn control your spindle. If you set up Mach3 as shown previously, you will be able to utilize the relay to turn onand o� your spindle.

34