EAGLE Circuit/PCB Layout Tips

These notes are mainly for myself, as reminders for how to do operations I just learned or tend to forget.

Supply

What’s up with GND and GNDA and AGND? How do I tie them together? I need to write a more complete answer about why EAGLE has different grounds and where to tie them together.

Meanwhile, the short answer is to insert the GND-GNDA component from the supply1 library, (apparently) tie GND-GNDA’s GND to GND and GNDA to AGND or whatever you’re using, and then follow these instructions on a SparkFun forum to activate layers 53 and 54 to make a jumper appear in a new later on your board connecting the two.

How do I connect power supply and ground pins on ICs? EAGLE is supposed to connect them automatically, but that seems to depend somewhat on using the right supply symbols. If you need to connect them manually, use INVOKE (the button with four AND gates and an arrow, just above the T for text button) and click on one of the gates. You get a popup window listing different gates and the power connections; pick the power and place it on your schematic.

General Editing

How do I copy a group of objects? For some reason, the Copy tool doesn’t work on a group, but the Cut tool copies the group to the clipboard to be pasted. (Grrr.)

Select the objects with the Group (dotted rectangle) tool, then pick Cut off the Edit menu and click on any highlighted object, then pick Paste off the Edit menu and you should have a floating collection that you can position and anchor (click).

Libraries

What’s up with no libraries being loaded in EAGLE version 5? How do I get libraries into my list for adding parts? EAGLE 5 starts with no parts libraries loaded, and you need to load the ones you want by selecting Library / Use… and then picking them one at a time. You can also preload all libraries like EAGLE 4 (at least my copy) did by default, by typing USE * in the command box in the edit window.

Layers

How do I make a single-sided PCB? Go into the Design Rule Checker (DRC tool), pick the Layers tab, and change the setup from (1*16) to 1. To change it back to a two-sided PCB, change the setup back to (1*16) and change the Nr 16 Copper back to .035mm.

How do I make a single-sided PCB with a few jumpers? For home production of a single-sided board with a few component-side jumpers, make a two-sided board, only produce the bottom side, drill the vias as component pads [need to check what shows up in the drill file] and stuff jumpers where the top-side traces would go.

How do I change layers while routing a trace? With a three-button mouse, use the middle button to change layers while routing traces. With a two-button mouse, click to set a waypoint, go up and change the layer in the drop-down box (don’t worry about the weird rubber-band trace that follows your mouse around while you’re doing it), and EAGLE should automatically insert a via, from which you can continue routing.

How do I delete a via? Use the Ripup tool to delete vias. The X it leaves behind will disappear after the next routing operation (on that trace? at all?) or the next time you click Ratsnest.

Pads

How do I change pad shapes? I don’t like the default oval pads on header connectors. Go into the Tools, DRC, Shapes, Pads, and change Top and Bottom from “As In Library” to “Round.”

How do I change pad sizes globally? Go into Tools, DRC, Restring, and set the Pads or Vias minimum sizes to the desired radius or diameter.

How do I change the drill size globally? Many of the library parts seem to have ridiculously large drill holes. For a homebrew board or hand-drilling, click the ULP, pick drill-aid.ulp, and enter the new drill diameter (in mm). EAGLE will add a white ring inside each hole in a new layer 116.

New Components

Sparkfun has the best tuturial I’ve found on making new library parts.

http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=110

This tutorial has a great description of copying components and packages from existing libraries. I always forget to click on the group after selecting the Cut tool!

http://myhome.spu.edu/bolding/EE4211/EagleTutorial4.htm

Panelizing

The second Q/A has a good description of how to panelize.

http://www.precma.com/informatica/EAGLE_faq_various.htm

It boils down to this:

  • If you want silkscreen part numbers preserved (instead of auto-incremented), run panelize.ulp to copy them to a different layer.
  • Close your schematic and work only in the board. (At this point I save my board under a different name to indicate that it’s a panelized version only, not for editing.)
  • Enable all layers that have elements you want duplicated in the panelization.
  • Select everything and use the Cut tool (I pick it off the menu) to copy everything to the clipboard, remembering to click once more to select the “grab point.”
  • Select Paste, and paste away.

CAM

How do I produce a drill file?

Run the CAM processor: File / CAM Processor. Pick Excellon for the Output Device type, and enter the output filename (foo.drd) in the File box. Not necessary on my Linux workstation running a current version of EAGLE: Enter an X offset of -.0373inch and a Y offset of -.0353inch. (I have no idea why, nor why they immediately translate into -0.9474mm and -0.8.966mm.


Initial Setup to Generate Drill Files for DanCAM

The default Excellon drill file output is formatted a little differently than what’s required by DanCAM, the software on my friend Joel’s drilling machine. To fix the output format, I started with the instructions at Spark Fun’s forum on fixing EAGLE output.

I found the eagle.def file, which on my Mac was at /Applications/EAGLE-X11/bin/eagle.def (Linux /opt/eagle/bin/eagle.def). Within the file, I found the definition for Excellon, which looked like this:

[EXCELLON]

Type     = DrillStation
Long     = "Excellon drill station"
Init     = "%%\nM48\nM72\n"
Reset    = "M30\n"
ResX     = 10000
ResY     = 10000
;Rack     = ""
DrillSize  = "%sC%0.4f\n"        ; (Tool code, tool size)
AutoDrill  = "T%02d"             ; (Tool number)
FirstDrill = 1
BeginData  = "%%\n"
Units    = Inch
Select   = "%s\n"                ; (Drill code)
Drill    = "X%1.0fY%1.0f\n"      ; (x, y)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " Units             : 1/10000 Inch\n"\
           "\n"

I duplicated it to a new definition called DANCAM, and made three changes:

  • The Long name for the new CAM type is DanCAM drill station.
  • DanCAM doesn’t want the % as the first line of the file, so I removed the %% from the Init string.
  • DanCAM wants X/Y coordinates to be six digits (with leading zeroes): three digits of inches and three digits of thousandths (mils). So I changed the formats in the Drill string from %1.0f to %06.0f.

After the changes, the new DANCAM entry looked like this:

[DANCAM]

Type     = DrillStation
Long     = "DanCAM drill station"
Init     = "M48\nM72\n"
Reset    = "M30\n"
ResX     = 10000
ResY     = 10000
;Rack     = ""
DrillSize  = "%sC%0.4f\n"        ; (Tool code, tool size)
AutoDrill  = "T%02d"             ; (Tool number)
FirstDrill = 1
BeginData  = "%%\n"
Units    = Inch
Select   = "%s\n"                ; (Drill code)
Drill    = "X%06.0fY%06.0f\n"      ; (x, y)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " Units             : 1/10000 Inch\n"\
           "\n"

EAGLE graciously picked up the new definition each time I made a change, which was handy, as I went through several iterations to get the X/Y format right.

I haven’t had a chance to try the new format on the drill machine yet, but I’m pretty confident it now matches the files I’ve been hand-manipulating to get them to work.