New part is wrong at fab

I wrote a generator for IDC connectors and created a 64-way x 0.1" box connector, when the PCB came back from Aisler the pins were much smaller and the parts will not fit and the tracks dont line up with the pins. The part looks ok to me in the parts designer and on the PCB view of my sketch, but as I said, once back from the Fab its the wrong size, €30 down the drain!

IDC shrouded box 64-way connetor.fzpz (10.2 KB)

Please help me find out whats wrong with it!
Thanks, Aaron

That we can do. There are a number of problems in the part. Unfortunately looking OK in pcb view isn’t sufficient for successful parts. The gerber processing occurs after pcb view and that is where some of your problems are. The main issue is that connector0pin is a rectangle and it needs a circle inside the rectangle for gerber processing to recognize that there should be a hole there. That resulted in this:

This is the gerber files from your part above displayed by gerbv. In this image I suppressed the copper layers leaving only silkscreen and drll. The purple dots indicate holes in the board (which by the way are too small to fit a .1in header!) Because connector0pin is a rectangle it gets no hole drilled which means the connector won’t fit. With the copper layers restored we see the rectangular pad is offset from the rest of the pins (and should be the same.)

a detailed look at the svg indicates there are more problems than that present though. Lets start with the breadboard svg. The first thing is that you are missing some required parts in he initial header of the svg. I think (because it has caused me problems before, although it doesn’t appear to be necessarily in this case) that you need to have these two additional lines in all the svg files:


like this

xmlns:dc=“DCMI: DCMI Metadata Terms
xmlns:cc=“Describing Copyright in RDF - Creative Commons Rights Expression Language
xmlns:svg=“SVG namespace
xmlns=“SVG namespace
viewBox=“0 0 31.27 261.74019”

as well the layerId is incorrect. In the original svg the layers were the same as pcb: copper0/copper1 then silkscreen. For breadboard you need to group the entire svg and call the group breadboard (as that is the layerId in the fzp file.) The only thing that I know this breaks is that your part won’t export as an image (svg, jpg, png etc.) As well while the circles will work as connector points in breadboard it would be more normal to have one or the other of these images (from single row headers) for female and male versions:



I was too lazy to make the change and left them as circles.


again is missing the x=“0in” and y=“0in” but the major problem is that schematic lacks terminalIds. That is part of your alignment issue and causes these two problems:

A wire connects in the center of the pin rather than at the end as is desireable and the connector is offset from the grid because the terminalId (the middle of the pin) is being used as the reference point. The terminalId is usually a 10thou by 10thou invisible rectangle positioned on the end of the pin. It looks like the definitions are there they just haven’t been properly named:

(I did change the size of the rectangle to 10thou by 10 thou) and now will change the id to be correct. Again it needs to match what is set in the fzp file which is this:

      <p svgId="connector0" terminalId="connector0terminal" layer="schematic"/>

so I set the terminal ID to be connector0terminal like this:

This needs to be done for all the pins in schematic (doing connector0 may be good enough to fix the alignment issue since I think it may key on connector0 to decide on the alignment, but I am not sure of that.)


again needs x=0in y=0in

Copper1 should be the first group with copper0 as its child group (this will work, it just isn’t preferred.) The most serious problem here is connector0. There needs to be a circle overlaying the copper pad. without the circle gerber processing doesn’t create a hole which is the main thing wrong with your gerber output. The other thing wrong is that the holes for the connectors are 0.032in in the gerber output when they should be 0.038in to fit .1 in headers. As far as I can see your part is mostly correct except for the too small hole size and lack of a hole for connector0
Editing the pcb svg with Inkscape turns up some more problems. First the origin isn’t quite correct, it needs to staart at 0 0. The negative offsets should cause truncation on part of the silkscreen.

to fix this do an edit->select all then Edit->resize page to selection which will move the start point to 0 0 which is what Fritzing is expecting.

Now on to the pins which are not correctly aligned in either x or y. They should be exactly .1 in appart in both x and y but are not. I will start on connector2 (to avoid the rectangle issue on pin0) Here x is 0.129in and y is 0.345in

so connector3 should be x = 0.229in but is in fact only 0.227in which is too small (if only by a little bit.)

moving to the y axis, connector4 should be 0.445in but is in fact 0.443in (and the gap gets larger the further down we go!)

moving down to connector23 we see the y coord has become 1.333 instead of the 1.345in it should be. This reflects directly in to the gerber output as it will place the pins at these coordinates in the gerber output and they are not on .1in boundaries which they need to be for the connector to fit.

At this point I rescaled the svg to the desired standard scale of 10.41667 mainly for ease of calculation (I know what the parameters of radius and stroke width should be for a .1 connector at this scale.) While doing this I notice that connector0pin and connector1pin are correct, but connector2 and after omit the pin and become just connector2 which while they match the fzp file and thus will work, aren’t desirable the pins should be named all the same to reduce confusion. As well I duplicated connector2 and moved it up .1in and renamed it connector0pin so there is a circle (and thus a hole in the gerber) for connector0. At the correct scale I can see that the holes will be too small.

For a standard .1 header at this scale the stroke-width should be 20 (20 thou ring width) and the radius should be 29 to give a 0.038 hole. The hole diameter in Inscape is calculated from

hole diameter = pad diameter - (2 * stroke-width)

so in this case the diameter of the pad is 0.078in and the stroke-width is 0.02in so the hole will be 0.078 - 0.04 = 0.038in as desired. Then I selected the entire second row of pads and moved them from 0.125in in x to 0.126in in x so they are exactly 0.1in pitch in X. I also resized (to 0.78in in height and width) and repositioned the rectange on connector0pin to be exactly over connector0pin. Now we need to do the same in y. Taking 0.242in as the base y coord

we then move down a row and change its y coorf to be .1 greater than the row above to propagate the .1in pitch.

and reduce it from 0.343in to 0.342in as it should be. In your case you will need to adjust your script to produce this same offest in drawing units. In this case I have rebuilt the pcb svg (although I didn’t add the pins to the connector names.) which will produce a correct gerber output for the connectors with the correct hole sizes.

Now we will switch to the drill.txt file from the gerber output as it has the drill sizes and the x/y coords for the holes. First we see the holes are too small:


the line T100C0.032000 breaks in to the hole label T100C followed by the drill size in inches (0.032 in this case.) As noted standard .1 header pins need a 0.038 drill size. ; NON-PLATED HOLES START AT T1

then we see the Y pitch is too short. The Y pitch should be 0.1in but is .02in to short (the Y Y011631 should be followed by Y Y012631 not Y012431 as it is.) The same applies in X (although it is somewhat harder to see)


X011186 should be followed by X012186 not X012786 as it is here.

by contrast my fixed part has the correct number and size of holes

and the drill.txt file indicates the holes are the correct size (0.038in) and in the correct pitch in x and y:




where x and y are going up by almost exactly .1 in. One last minor quibble is that the label field in the fzp file should be J (for jack) rather than C (which indicates a capacitor.) which I also changed. While adding the terminalId fixed the wire connection on connector0, it didn’t fix the alignment issue (so it doesn’t look like it is using connector0 as the reference to the grid!)

and finally here is the corrected part that generated the above images. You need to change your script so it generates svgs like these. I didn’t change the moduleId of this part so you will need to remove your original part before Fritzing will let you load the new one.

IDC shrouded box 64-way connetor-fixed.fzpz (12.7 KB)

Hope this helps! Post if you have questions.


1 Like