Modifying the SMD footprint of a Fritzing part for hand soldering

You want to modify the SMD footprint (lands) of a Fritzing part because you found that the stock footprint is not large enough for convenient hand-soldering.  This blog is instructions for doing that.

Why standard SMD lands are inadequate for hand soldering

A land is a pad on a circuit board for an individual leg or tab of an SMD part.  The footprint is a set of lands.

Standard SMD footprints are designed for reflow soldering (apply solder paste to lands, set or glue part down, bake until solder melts and reflows.) Standard SMD footprints may be inadequate for hand soldering with an iron, even with a very fine tip.

In one case, the part has legs and the SMD lands are big enough to hold the legs, with a little extra for slop in placing the part, and for a meniscus of solder to form to the leg.  When hand-soldering, often that is not enough space for the tip of the soldering iron to touch both the land and the leg.  That is a goal when hand soldering: to touch and heat both sides at once.  It is not good to just touch the soldering iron to the leg and thereby heat the land through the leg (because then the part may get too hot before the land gets hot enough for solder to flow to the land.)   Some people put a ball of solder on the tip of their soldering iron and then touch the leg; then the ball may touch and heat up the land and make a good solder joint quickly.

In another case, the part has no legs, only J-shaped tabs that curl under the part.  There may not be enough room for a soldering iron tip to touch either the land or the J tab.

It is not uncommon for prototype and adaptor boards for SMD parts to have non-standard SMD footprints expressly designed for hand soldering.  They allow you to swipe a soldering iron across extended lands so that solder there melts and wicks or flows onto the legs or J-tabs.  Some Fritzing parts may already include such non-standard SMD footprints, but some don’t.

It is not uncommon for circuit boards to be pre-tinned, so that each land already has some solder on it, sometimes enough to make the solder joint, if only you could touch the land and leg concurrently with the soldering iron tip.

While very fine tips are available for soldering irons, they are problematic because a fine tip is colder than a larger tip (a fine tip loses more heat by radiation than a larger tip.)  Also it has less thermal mass and may not retain enough heat to transfer enough heat to the part and land quickly.  To a certain extent, you can get around this by setting your adjustable soldering iron to a higher temperature.

Anyway, you decide that you are not worried about the smallest possible circuit board but want extended lands for ease of hand soldering.  You want to redesign the stock SMD lands of a Fritzing part, enlarging the lands away from the part so you can touch it with a soldering iron.

Note that it is not enough to just use extra thick traces on the board, because the traces will be covered up by solder mask.

It might be possible to accomplish the same goal by adding an extra Core>PCB View> Pad part touching (and connected to) an SMD land.  That’s fine for one part instance, but it gets tedious if you have many part instances.  Then you want to modify the part class so that all instances have extended lands.

Use case variations

Case 1: you don’t care to keep the old footprint at all, you just want to modify the footprint of the existing package.  E.g. you think there is a flaw in the footprint of SOD-23[SMD], you want to fix the footprint but retain the name.

Case 2: you want to create a new named package with a footprint that slightly differs from an existing footprint of an existing package.  E.g. you want to create a ‘SOD-23[HandSMD]’ package by deriving from ‘SOD-23[SMD]’

 

Overview of the steps

  • Copy the part to a new name (Save as new part)
  • Edit the SVG for the footprint
  • Load the edited SVG into the copied part and reconnect connectors to SVG elements

Copy the part to a new name

Start Fritzing.

Open a new sketch.

Drag the part to any view of the sketch (you can’t open the Part Editor except on a part in the sketch.)  In this example, drag a “Parts > Core > NPN-transistor” to the sketch (it has a SMD SOT-23 footprint or package that we want to modify.)

Choose the “PCB” tab.  Expect the view to change to the PCB view.  You should see the “TO92[THT]” package for the part in the view (the through-hole package of the part.)

In the “Inspector” window, choose “Properties>package”.  Expect a pop-up menu to appear.

Choose the “SOT-23[SMD]” value from the pop-up menu.  (You must choose the SMD package so you can edit that package in the Part Editor.  Technically, the Part Editor edits a particular PCB package.)

Choose Part>Edit (new parts editor).   Expect a “Fritzing (New) Part Editor:” window to open.

Click on the “PCB” tab.  Expect the view to change to the PCB view.

Choose “File> Save as new part” from the Part Editor menubar.   Expect a “Filename prefix” dialog to open.

Enter a prefix.  For example “HandSMD”.  Choose “OK”.  Expect the dialog to close and nothing else visual to happen (there is no confirmation dialog telling you a new part was created.)  But at this point, Fritzing has created new files for you, e.g. ~/.config/Fritzing/parts/user/HandSMD_f55abc89e337286af8a90f4ceb6a8404_1.fzp and ~/.config/Fritzing/parts/svg/user/pcb/HandSMD_f55abc89e337286af8a90f4ceb6a8404_1_pcb.svg (and a few other SVG files, but we only want to modify the PCB SVG.  Note these paths are on Linux and may differ on other platforms.)

Choose the ‘Metadata’ tab of the Parts Editor.

Under ‘Properties>package’ change the name of the package, e.g. from SOT-23[SMD]’ to ‘SOT-23[HandSMD]’

This is use case 2: creating a new package.  If you fail to give a new package name, it is just use case 1: altering the footprint of an existing package.

Close the Part Editor.  Expect in the Fritzing main window to see your new part under “Parts>Mine.”

Note that the new part still looks the same as the old part, in all views (icon, breadboard, schematic, and PCB), until you edit the SVG for the footprint.   In this case, you will still see the icon for a NPN transistor in the parts window and in the Inspector window you will still see the old footprint.

Edit the SVG for the footprint

Start Inkscape.

Choose “File>Open”.  Expect a file chooser dialog to open.

Navigate to and choose the PCB SVG file that Fritzing just created.  (You may need to enter “Ctl-h” so that you can see the hidden “.config” directory in the file chooser dialog.)

I won’t discuss the details here, only the brief steps:

  • select and enlarge the yellow lands, away from the center (you may need to double click to select an element instead of its group)
  • resize the canvas to fit all the elements
  • save

You might also need to edit the silkscreen group, but often not (if you enlarge lands away from the centered silkscreen)

Note that if you fail to resize the canvas, when you use the part in Fritzing, the enlarged lands will be cut off.

Note that layers in SVG are not the same as groups.  Fritzing uses named SVG groups for Fritzing layers (e.g. “copper1”).  It is unfortunate that both apps use the same word “layers” for two different things.

Now switch to the Fritzing app (click in one of its windows).  Without having to restart it, the SMD footprint for the new part “Parts>MINE>NPN Transistor” will be updated and look like the edited SVG.  The part instance you already placed in the sketch will still have the old footprint.  But if you drag the new part into the sketch, it will have the new footprint.

More about use case 1: changing the SMD footprint of an existing package

Suppose you created a new part without giving it a new package name and edited the new par’ts footprint (PCB SVG file.)  That changes the footprint for all parts (but not existing part instances in sketches) that use the package called “SOT-23[SMD]” even though the .fzz files for the parts refer to the original SMD_SOT-23.svg file.  In other words, you have changed the SMD footprint for both the original part (Parts>Core>Basic>NPN transistor) and the new part (Parts>MINE>NPN transistor.)

To see that this is so, repeat the above but omitting the step of entering a new package name in the metadata.

Close Fritzing:

  • Choose ‘Save’ to ‘Do you want to save the changes you made in the document “UntitledSketch.fzz”‘
  • Choose ‘Save’ to ‘Do you want to save the changes you made in the bin “My Parts”.’

Restart Fritzing and open the sketch “UntitledSketch.fzz.”  The first part instance will have the old footprint in the PCB view, the second part will have the new, enlarged footprint.

Drag a new part instance “Parts>Core>Basic>NPN transistor” to the sketch.  It will have the new, enlarged footprint.

I can’t explain why this happens.  My guess would be that Fritzing maintains an internal database of packages.   When Fritzing starts, it reads in your custom parts and updates its internal database.  Possibly it uses the last encountered SVG for a package, e.g.  the package “SOT-23[SMD]” is associated with the last PCB SVG file (the altered one in your new part) that is encountered when reading the parts files into the internal database.  Many part classes may refer to that same package by its name/id.  Any part instances you place subsequently will use that SVG footprint, and retain it across Fritzing sessions (even if you later change the SVG again.)

Load the edited SVG into the copied part and reconnect connectors to SVG elements

This step is optional: at this point you can use the new part and it will have extended lands.  However, Fritzing still shows the center of the connectors at the old coordinates (slightly towards the top of the new extended lands.)  The part will usually still work, but wires (copper traces) to the lands won’t point to the center of the lands.  To fix that:

Drag the new part into a temporary sketch.

Select the new part instance.

Choose Part>Edit (new parts editor).   Expect a “Fritzing (New) Part Editor:” window to open.

Click on the “PCB” tab.  Expect the view to change to the PCB view.

Choose “Window>Connectors”.  Expect a new “Connectors” window to open.  In this case, connector “2” is already selected in that window and “Select graphic” text appears in that row.  In the PCB view, the associated land will be highlighted (in purple on my computer, with a dashed white outline.) (You might need to zoom into the PCB view so you can see the lands.)

Click on the highlighted land.  Fritzing will recalculate the center of the land and relocate the connector.

Repeat for the other two connectors (select in the Connector window, then click on a land in the PCB view.)

Save the part and close the Part Editor.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s