@TomKeddie has already recorded useful information on panelizing for DirtyPCBs but as I don’t use Eagle or Windows, I need to work out a different process. And since I don’t have my own blog, you all get to hear about it. Lucky you?
Rather than getting a bunch of different designs built, I had one small design, and I wanted a lot of them. Here’s an OshPark prototype:
This is 50x12.5mm. In theory, I could fit 16 of them on a 10x10cm prototype board in an 8x2 grid, but that seemed a bit tight; I didn’t want to specify mouse bite holes along the entire long edge of the board, or use Dirty’s “maybe, maybe not” v-groove capabilities. And Dirty produces around 10 of these 10x10cm boards per order - I don’t need that many, do I? After some playing around I settled for 6x2 boards. The end result looks like this:
What I want to document is how I got from OshPurple singles to that DirtyRed panel, because I find online documentation to be surprisingly sparse on the subject.
The main tool I settled on is a Python script called KiCad Panelize. The way you use this is to gather one or more PCB layouts that you want to panelize, create a configuration script that describes how to build your panel from your source PCB layout(s) and run panelize.py to create a new KiCad PCB file with your combined designs.
Here’s my config file to convert from the purple board to the red one:
new
load 'single.kicad_pcb'
source-area 145 111 195 126
copy 120 40
copy 120 55
copy 120 70
copy 120 85
copy 120 100
copy 120 115
rotate-180 170 37.5
rotate-180 170 52.5
rotate-180 170 67.5
rotate-180 170 82.5
rotate-180 170 97.5
rotate-180 170 112.5
save panelize.kicad_pcb
Yes, that took a few tries to get right, but iterating was quick and easy. The obvious question is where did the tabs and mouse bites come from? I cheated, and tweaked my original KiCad design:
A bunch of stuff is hidden there for clarity, but the key point is that I modified the board outline so that when pasted together by panelize.py, everything fits together. I just needed to fix the outline at four points at the edge of the panel (two extra tabs and two gaps) and add another single row of mouse bites down the middle of the panel.
That gets me a design that’s almost ready for uploading to DirtyPCBs, but there were a few steps left. I’ll document that in a bit. Also I have the boards now and they look okay from outside the packaging, but I haven’t started de-panelizing them. I’ll be trying that tomorrow, and hopefully I’ll be able to report back success… fingers crossed.