2011 July 21

Board panelized and ordered

I used Gerbmerge today to make a larger board out of four of my little boards, since 4 of the maximum-size Eagle freeware boards (8cm × 10cm) will fit in the 60 sq-in area limit of the $33 board from 4pcb.com’s student program.

Here is a preview of what my panel of 4 boards should look like.

It turned out to be much more difficult than I expect to install Gerbmerge.

First I had to install the SimpleParse package for Python.  That was straightforward, once I realized that the big “Looking for the latest version? Download SimpleParse-2.0.0.zip (301.5 KB) ” button on http://sourceforge.net/projects/simpleparse/files/ actually downloaded an old version, and you had to click through the directories to find version 2.1.1.a2, which was needed to get the sublibraries.  Running setup.py from the downloaded directory installed SimpleParse correctly.

Then I downloaded the gerbmerge-1.8 directory and tried installing it.  That was not so much fun, as the setup.py file was badly written.

  • First, I had to edit it to remove the MS-DOS extraneous carriage returns, which Python 2.7 does not seem to like on a Mac—that is no big deal.
  • Second, it failed because it was looking for distutils.sysconfig.get_config_var('LIBPYTHON'), which is a configuration variable that does not exist on my system.  I eventually figured out that what it should have been doing there is distutils.sysconfig.get_python_lib() and got setup.py to run.
  • Third, I still could not get gerbmerge to run, because setup.py put it in the wrong place.  I had to edit 
    fid.write( \
    python %s/site-packages/gerbmerge/gerbmerge.py $*
    """ % DestLib)

    fid.write( \
    python %s/gerbmerge.py $*
    """ % DestDir)

    and remove os.path.walk(os.path.join(DestLib, 'site-packages/gerbmerge'), fixperms, 1)

After all that fussing, I finally got Gerbmerge to run without crashing.  I then had to put together a configuration file to explain how I wanted the panelization job done.  The configuration file is not intuitive, but it is well-documented with an excellent sample to modify.

The statistics reported by Gerbmerge did alert me to one minor problem: the vias used by the auto-router used a different size hole from the ones I had placed by hand.  I figured out how to change the auto-router via size (it grabs the smallest legal size from the design-rule checker), ripped up the auto-routed stuff, and rerouted it.  That introduced some design rule violations, where newly placed vias were overlapped by some of the silkscreen, but I fixed that my manually moving the offending vias and rerouting to them.

I checked the combined board both with FreeDFM from 4pcb.com and BatchPCB, and both accepted it with no complaints.  BatchPCB charges by the square inch, so it would cost $138.57 for the 4-up board from them, more than the $124 for the boards already properly cut apart.

I ordered one of the 4-up boards from 4pcb.com for $33 plus shipping, for a total of about $50.  I only found out afterwards that they have a $50 surcharge if you have multiple copies of the same design on the board.  I hope that they don’t charge me that surcharge!  If they ask, I’ll cancel the order and redo with 4 slightly different designs (maybe customizing the silkscreen for the robotics club).

In fact, I just realized that I could probably define a few new “customization” layers in Eagle, and automatically generate 4 slightly different designs from a single .brd file.  If I have to go that route, I will, and I’ll certainly not make the mistake of sending 4 identical designs to 4pcb.com.  If they want to put in arbitrary rules for their student designs, I’ll play rule lawyer with them.



  1. i’m having problems installing gerbmerge. well, actually, just simpleparse. do you have to have gcc installed for it to install correctly (i’m guessing)? i can’t seem to find much in the way of resources to help me with this. i get kicked out with
    “unable to execute gcc-4.2: No such file or directory
    error: command ‘gcc-4.2’ failed with exit status 1″

    also, have you tried batchpcb or expresspcb? i was pretty happy with batchpcb, although it’s slowish, and i’m trying to install gerbmerge to try expresspcb which is supposed to be much faster, although you’re limited to 3 – 3.8″x2.5” boards, but it’s only $51 for a 1 week turn.

    Comment by girlvslaser — 2011 October 23 @ 09:39 | Reply

    • Since I have gcc installed, I have no way of testing whether it is necessary for installing gerbmerge. Everything seems to be in python, though, so I don’t see why gcc would be needed.
      Ah, I see that the SimpleParse documentation page says that you need a C compiler compatible with the Python that you have installed. It is too bad that gerbmerge needs version 2.1 or newer of SimpleParse, since easy_install only goes up to version 2.0 of SimpleParse.

      I did have to fix some problems in the setup.py file for gerbmerge, which had some bugs for looking up python library locations on my Mac, but these were fairly simple fixes.

      I’ve used 4pcb.com twice, but have not yet tried batchpcb or expresspcb. The batchpcb pricing looks good for tiny boards, but the 4pcb.com pricing has been better for larger ones. So far, the 4pcb.com pricing has been better for me and the quality and delivery time have been excellent.

      Comment by karplus — 2011 October 23 @ 11:19 | Reply

  2. Love this PCB layout i like to try and make this type of circuit board in future soon. Thanks for step by step guide also. Awesome blog.

    Comment by Circuit Board — 2011 November 14 @ 07:38 | Reply

    • Although the comment above seems to link back to a commercial service and so is probably spam, I’ll approve it anyway.

      I won’t be making this board design available after all, as Infineon seems to have discontinued all their through-hole H-bridges—now the TLE-5206 is unavailable except in surface mount also.

      Comment by karplus — 2011 November 14 @ 09:01 | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

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

Create a free website or blog at WordPress.com.

%d bloggers like this: