Making PCB Tutorial
First of all you will need to have Eagle software to make the circuits and PCB GCode Script for Eagle to generate the files that EMC, MACH3 or the software you use to control the CNC machine understand.
Eagle Free Version -> http://www.cadsoftusa.com/
PCB GCode Script -> http://pcbgcode.org/list.php?12
Install Eagle and after that go to install directory, and extract the PCB GCode Script to the Eagle ulp directory.
Now open Eagle and open the example project Singlesided, click on both files .brd and .sch
We will need only the .brd window since the schematic is already done. Click on the Auto Route button and choose the number of layers you want, on this example I will use only the bottom layer.
Click OK and the Auto Route will start, if the Auto Route can't make all the board and you need to move some components to try again you need to click on Ripup and then on the "traffic lights" and anwser yes to unroute all wires.
After you have all routed is time to run the PCB GCode Script, if is the first time you need to load the pcb-gcode-setup.ulp, to do this go to Menu File -> Run -> Navigate to ulp dir and open the script.
On the PCB-GCode Window you can explore all the options and make your own tests, I just change from in to mm on machine tab and on generation options I select Bottom Outlines and Drills...
Click Accept and wait a few seconds, on the directory of the project you will find the files you need to open on the CNC Control Program, when the script ends a window will open with a sample of what you will need to route...
On my computer the files created by the pcb script are on C:\Program Files (x86)\EAGLE-6.3.0\projects\examples\singlesided and they have *.tap extension, one file called singlesided.bot.etch.tap for routing and one singlesided.bot.drill.tap for drilling...
Update 2/20/2014 Lesson Begin
Making a PCB with the Zen Toolworks CNC using Eagle, PCB-GCODE, and Autoleveller
Software install and config
Software options and settings
Machine, Mach3, and PCB setup
Software install and config
Get the newest auto leveler software from http://www.autoleveller.co.uk/download/
get the newest version of pcb g-code, version 126.96.36.199 at the time of this writing http://pcbgcode.org/file.php/download/12/167/pcb-gcode-188.8.131.52.zip
get the newest version of eagle pcb cad. http://www.cadsoftusa.com/download-eagle/
install eagle using the default settings. Once eagle is installed and working, extract pcb g-code and copy the folder containing the pcb gcode files to C:\Program Files (x86)\EAGLE-6.5.0\ulp
Now that pcb-gcode is uncompressed, Eagle must know where it is located. In Eagle’s Control Panel, click Options , Directories, then put the path to pcb-gcode in the User Language Programs ﬁeld. Which should look similar to “$EAGLEDIR\ulp;$EAGLEDIR\ulp\pcb-gcode-184.108.40.206”
To complete the setup, pcb-gcode must be told which type of g-code it should generate. Open a board in Eagle, then click File, Run ULP.... Locate the folder where pcb-gcode is and select pcb-gcode-setup.ulp Select the style g-code that most closely matches your controller
You will receive the warning . If this is the ﬁrst time pcb-gcode has been run, just click Yes and skip the rest of this paragraph. After clicking Yes, pcb-gcode-setup will be run again
PCB-GCODE is now installed
Software options and settings
Click the Machine tab to view the machine options. First select the preferred unit of measure by selecting it under Units.
Now set the settings for the Z axis. Z High should be high enough to clear any clamps or ﬁxtures that hold the PCB down. Set Z Up high enough to clear the board when moving from location to location.
Set Z Down to the depth into the board that the tool should cut.
Drill Depth should be set deep enough to drill through the PCB.
Drill Dwell is the time, in seconds, that the drill should pause at the bottom of the hole.
The Tool Change options are the position where the tool should be moved for changing the tool.
The Spin Up Time in the Spindle box should be set to the length of time in seconds that it takes the spindle to come up to speed. If the spindle is manually controlled, this can be set to 1.
The Feed Rates should be set for X Y moves as well as Z moves. Rates here will usually be quite low unless the machine has a very fast spindle. See a machinist’s reference on how to calculate the optimal feed rate, use trial and error, or post to the Yahoo! group email list for advice.
Epsilon is the minimum move that will be written to the g-code ﬁle. For instance, if Epsilon is set to 0.000100 and the g-code ﬁle will not contain movements less than 0.000100 . This option will rarely need to be changed.
The Default Drill Rack File option allows for the selection of a rack ﬁle to be used if one has not been setup for a particular board. In most cases this can be left blank to start with.
Now that reasonable values have been set for the machine, click the Generation Options tab. This is where the various ﬁles produced by pcb-gcode can be selected, and common options can be set. A description of the options follows:
Top Side Options having to do with the tracks on the top of the board, and drill holes made from the top side of the board.
Generate top outlines Generate g-code to cut out the tracks, pads, pours and vias on the top side of the board.
Generate top drills Generate g-code to drill holes from the top side of the board.
Bottom Side Options having to do with the tracks on the bottom of the board, and drill holes made from the bottom side of the board.
Generate bottom outlines Generate g-code to cut out the tracks, pads, pours and vias on the bottom side of the board.
Generate bottom drills Generate g-code to drill holes from the bottom side of the board.
Mirror X coordinates for the bottom of the board are usually negative. This makes setting the origin for a two-sided board easier. Turning this option on causes the X coordinates to be positive, however, the bottom tracks will be a mirror image of what they should be. So in general, leave this option off.
Board Options that apply to the board in general.
Show preview Use the previewer in pcb-gcode to preview the g-code generated.
Generate milling Generate g-code for any wires the user has drawn on the Milling layer 46. Depth sets the milling depth.
Generate text Generate g-code to engrave any vector text the user may have placed on the Milling layer. Depth sets the engraving depth.
Note that text on the top or bottom layers will be outlined just as the tracks are, whereas text on the milling layer is engraved. That is, the tool along the center of the lines that make up the letter.
Spot drill holes Spot drilling helps the drill bits center themselves and helps prevent "walking." Depth sets the spot drill depth.
Isolation The cutting tool can make several passes around the tracks at an increasing distance each time. This helps eliminate slivers of copper that remain.
Single pass When turned on, only a single pass will be made around the tracks on the board.
Minimum The minimum distance the cutting tool will be away from tracks. That is, the starting isolation amount.
Maximum The maximum distance the cutting tool will be away from tracks. The maximum isolation amount.
Step size The amount the isolation increases with each pass.
Etching Tool Size The size of the cutter used to cut around tracks on the board.
Once all the applicable setting are in place, click “accept and make board”
I usually use the settings
Now that a set of G-codes has been created, we need to run the AutoLeveller software.
Simply select the file you created that ends with the .top.etch.tap. Let it load and select “create leveled g-code” and do the same for the .bot.etch.tap file
machine and pcb setup
For the machine setup we need to insure that we have setup the probe port in the mach3 controller software and on the breakout board.
Using some extra lengths of wiring connect one wire to the ground port and another wire to the probe port. In mach3 go to “Config” next to “file” at the top of the window and select “ports and pins” then go to the “input signals” tab and scroll down until you find “probe” set the probe to “enable”, set the “port #” to 1, and set the pin to 15, depending on your setup you may need to customize the setting to get it working perfectly.
To test if we set the probe up correctly open the diagnostics window and touch the probe and ground wire together, if you see a light for “digitize” appear. If you see the digitize light you have set the probe port up correctly.
Load the AL.top.etch.tap file that was created by autoleveller, into mach3. Click start cycle then tap the ground to the spindle to test that the digitize function is still operating within specified parameters and that the machine stops moving down once the probe is detected. Then stop the cycle.
Once we have verified the probe port is functioning we will then secure the pcb to the right hand side of the work surface using some double sided tape. Securing the pcb to the right is important because when we do the back of the board we will need enough room the rotate the board along the y-axis causing the far right side to become the far left side and if the board does not start on the right side there may not be enough room the flip the board correctly. Secure the ground wire to the surface of the copper clad board with a piece of tape, and secure the probe wire to the spindle of the machine using an alligator clip. Position the spindle over the lower left corner of the pcb and zero your X and Y axis. Lower the Z axis to just a few MM above the pcb and zero the Z axis.
Start the cycle. The machine will begin probing the surface of the pcb, be careful to make sure that probe connection is being made, otherwise the machine will plunge the endmill into your pcb and break your endmill.
Once the probe process is complete, remove the alligator clip and the ground that is taped to the pcb. And start the cycle. The machine will begin to cut the traces for the top of your pcb. If you have a “text” layer gcode for the top of the board run it as well. Once the traces are cut and text are cut we will drill a few reference holes. I usually place one hole at (0,-5) and another at (0,y) where y is the coordinate just above the upper left corner of the board. The important thing is that they are aligned perfectly vertical of each other along the Y axis. Drill deep enough to penetrate the pcb and into the waste board bed of the machine.
Remove the pcb from the machine and flip it so the far right side of the board becomes the far left side of the board. Align the pcb by placing a drill bit into each of the holes we drilled and secure the pcb to the waste board with double sided tape and remove the drill bits.
Zero the Z axis a few mm above the pcb then select “goto zero” the spindle should move to 5mm above the hole we drilled at (0,-5) if everything looks ok, reconnect the probe wires and load AL.bot.etch.tap and select “cycle start”. The machine will begin probing the bottom of the pcb. Once complete run the cycle. This will mill the bottom traces into the pcb. once complete, if there is any bottom text load the gcode for the text and run it.
Zero the Z axis just above the pcb within a mm and select “goto zero”, load the bottom drill file. Run the drill cycle and this will drill all the holes in your pcb
the final step is to load and run the bottom milling gcode. Zero the Z axis just above the pcb within a mm and select “goto zero” run the milling cycle. This will cut the new pcb from the rest of the copper clad board.
Above are the pcb-gcode settings I have been using with my Zen Toolworks machine using a 1mm endmill for the drill pass, and a Zen Toolworks 15 degree V carve bit for everything else.