Posts with «gerbmerge» label

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(
    r"""#!/bin/sh
    python %s/site-packages/gerbmerge/gerbmerge.py $*
    """ % DestLib)

    to   
    fid.write(
    r"""#!/bin/sh
    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.


Filed under: Hexmotor H-bridge board, Printed Circuit Boards, Robotics Tagged: Arduino, Gerbmerge, motor controller, panelization, Printed circuit board, robotics