Fritzing
Fritzing is
an application for producing breadboard layouts,
schematics and even PCB layouts
Many regard it as not particularly useful, however I
believe it can be a very useful tool and guide for many
beginners.
I have used it to show some basic layouts in other
areas of this site.
I have not tried the PCB layouts, not something I
have needed so far but suspect I would use Kicad or
similar for its better functionality in this area.
Making parts
Many report having difficulties in trying to make
their own parts.
Documentation relating to the current version does not
seem to be available and third-party online guides
often refer to use with earlier versions.
I have compiled a list of a few things I have learnt in
my own use.
I run linux of various flavours, my desktop is
debian wheezy with older versions of both Fritzing and
Inkscape. Parts and Fritzing images have been created
on a PClinuxOS machine running later versions - and on
a Pi2 as well of course.
I use Inkscape
for SVG editing.
Do read the Fritzing documentation and tutorials as
well as linked third-party tutorials but bear in mind
that actual use on a current version of Fritzing may be
slightly different.
- A new part can only be created from an
existing part.
- Create a temporary working directory for your new
part.
- Choose an initial part to edit with as many or
more connectors than you need eg. an IC.
- As you create and save your SVGs it is useful to
name them obviously eg. part-BB.SVG, part-Schem.SVG,
part-PCB.SVG
- Include the suggested prefix when saving, it is
there to avoid duplicate definitions.
- Run through File->Inkscape Preferences
and File->Document Properties to set up
suitable defaults eg. units, grid etc.
- It can be useful to select Last used style
for many tools rather than have Inkscape constantly
revert to its defaults!
- Use the
Fritzing templates and graphics
standards as a guide.
- You can load SVGs of other parts into your new
SVG file to compare or copy bits for re-use.
- You can often copy holes from one part to another
or use Path->Difference.
- Use a good photographic image (scaled to actual
size in Inkscape) to layout pins/pads and other bits
accurately - delete the image once you have a good
SVG representation.
- The actual part can of course be measured with
callipers instead of the above.
- Do not try to over-complicate the images, keep
them representative and simple but do at least show
all connection points accurately
- Sometimes minor changes can be made in a text
editor (eg. modifying text strings) but be sure your
text editor is safe and does not break your SVG!
- If you have trouble keeping track of some
entities as you draw (eg. white stroke or fill) ,
change the background colour from
File->Document Properties
- Get used to working with a few of the most useful
tools - Group, Ungroup, Alignment
and Distribution, Transform and Fill
and Stroke dialogues.
- Earlier advice was to save out of Inkscape as
Plain SVG. Current versions of Inkscape seem to upset
some entities saved as Plain so I now save as
Inkscape SVG - no problem for Fritzing so far.
- Before your final save File->Vacuum
Defs and File-Document
Properties->Page->Resize page to content -
make sure there are no odd outlying objects.
- You should now have an SVG that is suitable for
loading into Fritzing Breadboard or Schematic
view.
I have read that extracting SVG images from existing
parts for editing has produced issues with scaling in
some cases.
I have not seen this myself but when I want to use an
existing part image I have always copied the
highlighted file from the Load Image dialogue
straight into my working directory rather than using
the Open or Save options.
Creating Breadboard and Schematic images should
really be quite straightforward exercises - note that
you can re-use the Breadboard image as Icon.
Connections and metadata should also be
straightforward - you may want to leave those until you
have completed the PCB view.
When all is done, save the new part under a suitable
name - include the suggested prefix, it is there to
avoid duplicate definitions.
Do not forget to save your bin before
quitting Fritzing!
PCB View
This is where things get a little more
complicated.
In general editing the PCB image is the same as
above except that once a good SVG representation has
been created, the underlying xml has to be edited to
make it work with Fritzing.
Earlier versions of Fritzing required separate
copper layers (copper0 and copper1) - for different
sides of a PCB.
The current version does not like this at all!
You may see an error message like this
SVG problem - This version of the new Parts Editor
can not deal with separate copper0 and copper1 layers
in : *.svg File.
So editing may produce an invalid PCB view image.
I have not come across any official
documentation about this, only third-party
references.
(The second row of options (SMD etc.) in the
Connector tab appear to have replaced the copper0 and
copper1 layers, no documentation at all so I suggest
some trial and error toggling these on/off!)
This
old page suggests
<?xml version="1.0" encoding="UTF-8"?>
<svg baseProfile="tiny" height="0.20306in" version="1.2" viewBox="0 0 46684 20306" width="0.46684in" xmlns="http://www.w3.org/2000/svg">
<desc>Fritzing footprint SVG</desc>
<g id="silkscreen">
<line stroke="white" stroke-width="1000" x1="1000" x2="45684" y1="1000" y2="1000"/>
<line stroke="white" stroke-width="1000" x1="45684" x2="45684" y1="1000" y2="19306"/>
<line stroke="white" stroke-width="1000" x1="45684" x2="1000" y1="19306" y2="19306"/>
<line stroke="white" stroke-width="1000" x1="1000" x2="1000" y1="19306" y2="1000"/>
</g>
<g id="copper1"><g id="copper0">
<circle cx="13736" cy="10153" fill="none" id="connector0pin" r="2750" stroke="rgb(255, 191, 0)" stroke-width="2000"/>
<circle cx="32948" cy="10153" fill="none" id="connector1pin" r="2750" stroke="rgb(255, 191, 0)" stroke-width="2000"/>
</g></g>
</svg>
whereas it now needs to be something like
<?xml version="1.0" encoding="UTF-8"?>
<svg baseProfile="tiny" height="0.20306in" version="1.2" viewBox="0 0 46684 20306" width="0.46684in" xmlns="http://www.w3.org/2000/svg">
<desc>Fritzing footprint SVG</desc>
<g id="silkscreen">
<line stroke="white" stroke-width="1000" x1="1000" x2="45684" y1="1000" y2="1000"/>
<line stroke="white" stroke-width="1000" x1="45684" x2="45684" y1="1000" y2="19306"/>
<line stroke="white" stroke-width="1000" x1="45684" x2="1000" y1="19306" y2="19306"/>
<line stroke="white" stroke-width="1000" x1="1000" x2="1000" y1="19306" y2="1000"/>
</g>
<g id="any_other_name"><g id="copper0">
<circle cx="13736" cy="10153" fill="none" id="connector0pin" r="2750" stroke="rgb(255, 191, 0)" stroke-width="2000"/>
<circle cx="32948" cy="10153" fill="none" id="connector1pin" r="2750" stroke="rgb(255, 191, 0)" stroke-width="2000"/>
</g></g>
</svg>
To make the changes, edit the xml from
Edit->XML Editor and make sure that there is
just a single <g id="copper0"> containing
all connectors/pads and no copper1.
Note the grouping (within the <g id="copper0">
</g> pair) of all the copper/connector
entities.
But...
Inkscape xml is likely to be a lot more
complicated than this (use File->Vacuum Defs
to remove (some) superfluous data).
Inkscape does not create ids like this either, you will
need to use the built-in xml editor (Edit->XML
Editor) to change them.
Ignore the Inkscape tags, they can remain as they are
but we need to change the plain id tags.
This is a typical Inkscape extract
Attribute |
Layer |
id |
layer1 |
inkscape:groupmode |
layer |
inkscape:label |
Layer 1 |
We need it to look like this
Attribute |
Layer |
id |
copper0 |
inkscape:groupmode |
layer |
inkscape:label |
Layer 1 |
Use a similar method for any silkscreen layer -
previous advice was to set silkscreen entities to white
but it seems that back is now recommended.
This will show as black in the PCB view but is
translated to white to create a PCB (I think!).
Once the xml has been edited and the SVG saved it
should e suitable for loading into Fritzing PCB
view.
Using Inkscape layers
You can use Inkscape layers.
I am not sure that it is any easier but it is an
alternative method.
- Open the Layers tool so that you can see
what you are doing.
- Create two new layers, Copper and Silkscreen. The
actual name is immaterial, these are Inkscape names,
not ids.
- Set the visibility of Copper to off.
- Select your copper entities, then
Layer->Move selection to layer below.
- You may need to repeat this action once or more
before they disappear from view!
- When all your copper entities have been moved you
should toggle visibility to check.
- Repeat for silkscreen entities.
- Check by toggling visibility of both layers that
everything is in its correct layer.
- Set visibility of both layers to on.
- Open the XML editor.
- Select each of your new layers in turn and change
its id as above to copper0/silkscreen as
appropriate.
- Save your PCB SVG file.
- Load into Fritzing PCB view.
There is a very useful document on Frizing's github
site
2.1 Part file format
|