h1

Panelizing PCB & Assembly: prepping the boards

2011/05/26

In my quest to get a group of PCBs fab’d and assembled as inexpensively as possible, the first step of course is getting the artwork for the individual PCBs ready.  Once the schematic is finalized and the basic layout is done, additional steps need to be taken in order to make then panel-friendly, and actually get the artwork together into one chunk.

As you can see, this particular board is round.  This is where much of my initial pain came from, in that round boards have to be milled out of the panel.  Those of you who are familiar with the DorkbotPDX group order may wonder “what’s the big deal, my boards are funky shapes and it’s no big deal”.  The answer to that is that Laen has managed to find PCB fab houses that are willing to go the extra mile, which in this case involves manually generating milling outlines and tab locations, for every single panel.  The corollary to this is that I get to manually generate milling outlines and tab locations for my panel.

Before we get into the milling issues though, we need to get the basic panel up and running.  Step #1 of course is to generate Gerber data from the Eagle artwork.  I won’t go into deal about that because anybody going through this process had better know the basics of that.  A key point however is that I used the exact same DRU and CAM files for all the PCBs in the panel.  The filenames need to all line up, and all the same layers are present, with the same tolerances.  In my case I’m running a 4-layer board with 6mil trace/space and 10mil drills with edge-to-copper distance of 15mil.  I started with Laen’s DRU and made the necessary changes for EpecTec, including some that occurred later in the process (keep reading).

Once the Gerbers are all in one place, I use a tool called gerbmerge to get a single set of Gerbers for the whole panel.  It’s the same tool Laen uses for the DorkbotPDX panels, though I gather he’s made a number of changes and external tools to make the process a bit less, um, unwieldy.  In my case I made a simple script that generates the .cfg file from a set of templates:

#!/bin/sh
cat template-main
for pcb in $*;do
  echo "[$pcb]"
  echo "Prefix=$pcb"
  cat template-proj
  echo
done

template-main is a copy of the layout1.cfg that comes in the test dataset for gerbmerge, with all the per-board stuff stripped out.  template-proj is the per-board section, which just lists the different Gerber files in question:

*TopLayer=%(prefix)s.toplayer.ger
*Layer2=%(prefix)s.layer2.ger
*Layer15=%(prefix)s.layer15.ger
*BottomLayer=%(prefix)s.bottomlayer.ger
*TopSilkscreen=%(prefix)s.topsilkscreen.ger
*BottomSilkscreen=%(prefix)s.bottomsilkscreen.ger
*TopSoldermask=%(prefix)s.topsoldermask.ger
*BottomSoldermask=%(prefix)s.bottomsoldermask.ger
*TopCream=%(prefix)s.topcream.ger
*BottomCream=%(prefix)s.bottomcream.ger
*Milling=%(prefix)s.milling.ger
Drills=%(prefix)s.drills.xln
BoardOutline=%(prefix)s.boardoutline.ger

The template-main list of layers was modified to look the same (including the addition of Layer2, Layer15 , TopCream, BottomCream, and Milling).  I also messed with the board-to-board spacing (set to 0.1″ as required by the board house), the panel boarder (I think I set it to 0.25″, probably doesn’t need to be quite that big), and I think a couple of other minor changes.

gerbmerge is set up so that the .cfg file isn’t everything you need (honestly I think the setup is rather over-complex, but hey) unless you’re willing to let it auto-place all the boards.  Auto-placement is pretty slick, but gets slightly messy if you want to run multiple copies of a given board (you have to add “Repeat=X” to each board section in the .cfg file).  Otherwise, you have to create a .def file, which references each of those boards in a particular arrangement:

Row {
  Col {
    mcu-rev0c
    mcu-rev0c
    mcu-rev0c
  }
...
  Col {
    port-rev0c Rotate90
  }
}

Each of the boards is listed as many times as you want copies, in a Row/Col configuration.  You can rotate boards with a “RotateXX” after them, in order to get them to fit where you want.  Now we can finally actually run gerbmerge, and get a basic panel out:

gerbmerge project.cfg project.def

The end result, viewed in gerbv, is as such:

Here you can see the multiple designs with Eagle’s 20 Dimension layer in green, and the overall panel outline from gerbmerge in cyan.  This dataset would be sufficient to send out to a fab house if they were prepared to go through and manually put in the routing layer. In my case though, I need to make it myself.  Unfortunately, gerbmerge doesn’t have any facilities to even give it a shot, so I’ve got to add my milling layer into the original artwork:

After discussions with EpecTec and Screaming Circuits, the milling layer is set up with a 0.1″ tool size, and 30mil tabs (which seem crazy-small to me, but we’ll see what they look like when the boards arrive later today).  You’ll notice that the tabs are not in the “easy” position of top,bottom,left,right.  This is due to the fact that between each circular board we end up with a “ninja star” of unused PCB.  If the tabs are only on the edges, they only end up connecting the PCBs I want, and leaving the stars to completely fall away as soon as the last sliver is milled out.  This would have the unfortunately side-effect of jambing the fab’s machine and making them very unhappy.

The resulting artwork from gerbmerge now looks like this:

Here you can see the milling layer made its way into the final panel, mostly.  There’s a slight problem: everywhere the milling paths overlap, they end up removed.  This would be a bit of a problem if it went to fab this way, as the boards would have to be cut out by hand after the fact, and that would make me very sad.  Happily, it turns out there’s a commandline switch to gerbmerge (why’s it not in the .cfg???) that fixes this, by turning off overlapping-trace culling:

gerbmerge –no-trim-gerber project.cfg project.def

Which gives us what we want:

Now you can clearly see the “ninja stars” and why the tabs have to be at 45° in order to keep them attached.  What you may not see is that this artwork is ready to send to the fab!

Next up: wrangling the BOM and centroid data.

About these ads

5 comments

  1. [...] Panelizing PCB & Assembly: prepping the boards… If you want to send out PCBs for manufacture you can save a lot of money by tiling them, here’s a nice walkthru of using the open source gerbmerge tool to tile your PCBs.. Filed under: EE — by adafruit, posted June 8, 2011 at 2:45 pm Comments (0) [...]


  2. [...] PCB & Assembly: prepping the boards – [Link] Tags: board, Panelizing, PCB Filed in PCB | 1 views No Comments [...]


  3. Nice artwork! I used to do some interesting panels back in the day – I ran power, TX and RX traces through the mouse bites on a middle layer to each board, and then down to a PC ISA card edge connector at the bottom of the panel. That way we could run the programming, testing and calibration routines on an entire panel of boards at once. Breaking out the boards broke the connections, and you were good to go!


    • Nice trick ;-) Might actually see if I can make use of that as we near real production. Since I’m using my “pdi5″ protocol, it’s only the 5 lines (power,ground,rx,tx,clk) so I can probably get those through. The question is whether the PCB house will squawk about the mouse bites / routing vs the traces and the copper-to-edge distances…


  4. That looks really great. Nicely done!



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: