Making edge connectors and both side smd parts


#1

It is possible by manual editing of the files (parts editor currently does not support this) to make parts with internal traces. One limitation is that the traces will not be solder masked (at present any copper in a part is not masked and that can’t be changed without a code change AFAIK). Another limitation (Inkscape rather than Fritzing this time) is that for through hole parts, you need to maintain two copies of the pcb svg, because for through hole pads there need to be two copies of pads both labelled connectorxpin and Inkscape doesn’t support this (on edit it will replace the duplicate name with created label breaking Fritzing). The work around I use is to name one of the pads connectorxpin and one connectorxpin_ in Inkscape, then before creating the part manually edit the pcb svg and do a global replace of pin_ with pin to create an appropriate svg for Fritzing. At present the FritzingCheckPart script also objects to this format, but I will probably (assuming I can figure out how to do it) correct that later. The basic trick here is to create copper0 and copper1 layers in the pcb svg that are at the root level rather than with copper0 as a child of copper1. This may not work forever as it is an older part compatibility mode and may be deleted in a future release. For a through hole pad, as noted there need to be two identical pads one in copper1 and one in copper0 with the same connector name (such as connector0pin) on both pads. With that in place you can now add traces to the appropriate group (copper0 for a trace on the bottom of the board and copper1 for a trace on the top of the board) by adding a line or rectangle to the svg. Unfortunately you have to manually route the traces one segment at a time (I created a part with only the pads, then did the routing in a Fritzing sketch and used the resulting pcb image to copy the necessary traces in to the part). One example of where this is useful is edge connectors (where you need different connections on the bottom and the top of the board), another is mid mount SMD parts (which have connections on both sides of the board). There are example parts for each of these cases in the Microbit part (which is mounting a through hole socket for an edge connector rather than the edge connector itself) available in:

and a HDMI mini connector part which is mid mount SMD at:

unzipping one or more of these parts will give you a working example of the necessary formats of the files. One thing to be aware of is the family name in the fzp file needs to be changed from a core part (such as the pin header if you cloned your part from a generic header). If you don’t, then when you change your part from top to bottom of the pcb in Inspector you may get an undesirable preprogrammed response such as your part being replaced by a pin header. In the through hole case the fzp file is configured as usual with the pcbView layer having the connector in both copper0 and copper1 (the changes being entirely in the pcb svg file). In the SMD case things are a bit more complex. In that case each pin needs to have the pcb layer modified so that there is only a layer id for the layer the pad is actually on in the pcb (i.e. only copper0 or copper1). If you make a mistake and specify the wrong layerId in the fzp file you will get the red rectangle in pcb view indicating the connectors are not correct until you insure that the fzp file and the svg file layerId match exactly. You can trouble shoot this by making connections to one pin at a time in a Fritzing sketch. When you hit a pin with the incorrect layerId, the trace will route to the middle of the part rather than the pad as it should. At that point check the svg and fzp file pcb layerId for that pin match (which they probably won’t) and correct them to match to correct the problem.

Peter