User Tools

Site Tools


geda:pcb_footprints

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
geda:pcb_footprints [2012/02/20 15:14]
127.0.0.1 external edit
geda:pcb_footprints [2017/06/24 01:32]
henry.wolfe [PCB Footprint Guides] Fix Brorson pdf guide broken link
Line 1: Line 1:
 +//​Translations of this page are also available in the following languages://​ [[pcb_footprints.ru|Русский]].
  
- +====== PCB Footprint ​Guides ​====== 
- +  * Stuart Brorson'​s [[http://wiki.geda-project.org/_media/geda:​land_patterns_20070818.pdf|footprint guide]] 
-====== PCB Footprint ​Guide ====== +  * [[http://​pcb.geda-project.org/​pcb-cvs/​pcb.html|PCB manual]] 
-  * Stuart Brorson'​s ​footprint ​[[http://www.brorson.com/gEDA/land_patterns_20070805.pdf|footprint guide]] +  * [[geda:​pcb-quick_reference#​footprint_reference|The PCB Quick-Reference]]
-  * [[http://​pcb.gpleda.org/​pcb-cvs/​pcb.html|PCB manual]] +
-  * The PCB FAQ: [[geda:​pcb_tips]]. +
-  * The PCB Quick-Reference has info on [[geda:​pcb-quick_reference#​footprint_reference|footprints]]+
   * [[ gEDA:PCB Footprint Naming Conventions ]] : read this to learn how to //name// your footprint files.   * [[ gEDA:PCB Footprint Naming Conventions ]] : read this to learn how to //name// your footprint files.
 +  * [[geda:​pcb_tips| The PCB FAQ.]]
  
 ==== Footprint basics ==== ==== Footprint basics ====
    * There are two types of footprints: M4 and NEWLIB.    * There are two types of footprints: M4 and NEWLIB.
    * The best tools for creating footprints are PCB (wysiwyg), TEXT EDITOR (fast, accurate), SCRIPTING (powerful).    * The best tools for creating footprints are PCB (wysiwyg), TEXT EDITOR (fast, accurate), SCRIPTING (powerful).
-   * For drawing footprints in PCB, refer to: +   * **For drawing footprints in PCB**, refer to the [[http://​pcb.geda-project.org/​pcb-cvs/​pcb.html#​Library-Creation|section about library creation in the PCB manual]], look at the part "​Creating Newlib Footprints"​ in the "New Style Libraries"​ subsection. 
-   * For writing footprints in text, refer to: " ​//Footprint Creation for the Open-Source Layout Program "​PCB"​// written and maintained by Stuart Brorson +   * **For writing footprints in text**, refer to [[http://wiki.geda-project.org/​_media/​geda:​land_patterns_20070818.pdf|Footprint Creation for the Open-Source Layout Program "​PCB"​]] written and maintained by Stuart Brorson. 
-   * For Scripting footprints:+   * **For Scripting footprints** see the [[pcb:footprint generators]] page.
    * Other things you may find helpful: calculator, paper+pencil,​ datasheets, calipers, spreadsheet.    * Other things you may find helpful: calculator, paper+pencil,​ datasheets, calipers, spreadsheet.
  
-==== PCB Footprint FAQ ==== +==== Manufacturer ​references for laying out footprints ​====
- +
-=== What is the Footprint naming Convention ? === +
- +
-=== Can I have two pads/pins with the same pin-number? === +
-"Yes, totally. ​ This is how you create oval shaped copper around pins, or funny shaped pads (e.g. square at one end and round at the other) by overlapping two or more pads."​ +
- +
-=== How do I make an oval shaped pad around a footprint pin? === +
-Simply add a pad on top of your pin and give them the same pin-number. ​ If the soldermask is kept off both pins, and they overlap, they should appear as one pin on your board. +
- +
-=== How do I make a 2-sided pad? === +
-"Odd as it sounds, this can be necessary for some edge connectors. ... but how do you do it???"​ +
- +
-=== Edge Connectors === +
- +
-=== What are some references for making surface mount pads and footprints===+
   * http://​www.nxp.com/​package   * http://​www.nxp.com/​package
   * http://​focus.ti.com/​general/​docs/​packaging.jsp   * http://​focus.ti.com/​general/​docs/​packaging.jsp
Line 42: Line 26:
   * http://​www.linear.com/​designtools/​PkgInfo.jsp   * http://​www.linear.com/​designtools/​PkgInfo.jsp
  
-[[geda:​pcb_tips]] covers a lot of Footprint material. ​ This page and that page need to be reconciled!+==== Sharing PCB Footprints ====
  
-===== Sharing PCB Footprints ===== +  * The place to share symbols and footprints is [[http://​www.gedasymbols.org | gedasymbols.org]]
-== Popular Sources of Footprints ==+
  
-The place to share symbols and footprints ​is [[http://​www.gedasymbols.org | gedasymbols.org]]+  ​You can find many PCB footprints ​at [[http://​www.luciani.org/​geda/​pcb/​pcb-footprint-list.html|John Luciani'​s footprint page]]
  
-* You can find many PCB footprints at [[http://www.luciani.org/geda/​pcb/​pcb-footprint-list.html|John Luciani'​s footprint page]] +  ​* You can share [[http://opencircuits.com/PCB_Footprints ​gEDA footprints at Open Circuits]].
  
-* You can share [[http://​opencircuits.com/​PCB_Footprints | gEDA footprints at Open Circuits]].+==== PCB Footprint FAQ ====
  
 +=== How do PCB's footprints work? ===
 +PCB supports two entirely separate footprint library mechanisms:
 +  - The first is referred to as the “oldlib”,​ “pcblib”,​ or the “M4 library”. This system uses the macro language M4 to generate footprints on the fly. The M4 library is fairly large. ​ A powerful feature of the m4 library is that an entire family of footprints can quickly be defined by defining an appropriate base macro. ​ Several standard families of footprints exist in pcblib. ​ Starting with the pcb-20070208 snapshot, the entire m4 library is available as "​newlib"​ footprints (see the following paragraph) under the name "​pcblib-newlib"​.
 +  - The second footprint library for PCB is called the “newlib”. Newlib footprints are defined using ASCII text files which call out each graphical primitive which makes up an entire footprint. ​ Newlib footprints can either be created graphically using PCB or via any other method which can produce a text file (text editor, awk/​perl/​ruby script, etc.). ​ The use of a scripting or programming language is especially powerful because you can generate large footprints or families of footprints.
  
 +Therefore, during layout, you can use footprints which are distributed with
 +PCB, you can find footprints via a web search, or you can create your own, and
 +put them in a dedicated directory. [[http://​pcb.geda-project.org/​pcb-cvs/​pcb.html|The pcb manual]] has complete and up to date documentation for the element file format. ​ [[http://​gedasymbols.org|Gedasymbols.org]] has a number of user contributed footprints. ​ A somewhat incomplete but useful tutorial is available on the web at: [[http://​www.brorson.com/​gEDA/​]] (search for the term "​newlib"​).
  
  
 +=== Where can I get pre-drawn footprints for PCB? ===
 +  * Check your hard disk for ''​newlib''​ and ''​pcblib-newlib''​. These directories contain the default footprint library of PCB.
 +  * The best place to get additional footprints is the [[http://​www.gedasymbols.org|gEDA Symbols website]]. If you have you are welcome to contribute to the project and share your footprints.
 +  * [[http://​www.luciani.org/​geda/​pcb/​pcb-footprint-list.html|John Luciani'​s website]] has a large number of footprints and tools.
 +  * Darrell Harmon provides a nice footprint generating script [[http://​www.dlharmon.com/​geda/​footgen.html|on his website]].
 +  * Kicad footprints (called "​modules"​ there) can be converted to PCB footprints with the [[https://​github.com/​erichVK5/​KicadModuleToGEDA|utility]] by Erich Heinzle.
 +  * Finally, you can ask on the [[http://​wiki.geda-project.org/​geda:​mailinglists|geda-user mailing list]], and somebody might take pity on you and send you a footprint.
 +
 +
 +=== I want to use PCB to do layout. How do I know what value to use for the footprint attribute? ===
 +This question is a common one amongst new gEDA users. Indeed, helping newbies determine the appropriate footprint names lies at the core of the ongoing [[geda:​faq-gschem#​what_s_this_business_about_heavy_vs._light_symbols|light vs. heavy symbol]] debate. In the current, light symbol gEDA/gaf distribution,​ you need to attach the footprint attribute at the schematic level (i.e. using either gschem or gattrib). The name of the footprint to use depends upon whether you are using the newlib or the M4 library (pcblib).
 +
 +
 +=== Newlib ===
 +The newlib stores one footprint per file, and the footprint names used by the newlib are the file names of the footprint files.
 +
 +There are several ways to determine the newlib footprint names to use:
 +  * You can browse the available footprints by running pcb and opening the footprint library window (available from the menu bar via **//​Window//​** -> **//​Library//​**). Click on the “newlib” library group, and then select a sublibrary to browse its symbols. The name of each footprint appears in the **Elements** window on the right hand side of the footprint library browser. Use the name exactly as it appears in the browser for the footprint attribute in gschem or gattrib.
 +  * The newlib footprints distributed with PCB are stored in the directories under **''​${PREFIX}/​share/​pcb/​newlib''​**. (**''​${PREFIX}''​** is the install directory you specified when configuring/​building PCB.) The name to stick in the “footprint” attribute is the filename of the footprint you wish to use.\\ For example, on my machine I installed gEDA with the prefix **''/​usr/​local/​geda/''​**. The 0805 package (for SMT resistors or caps) lives in a file with absolute path\\ **''/​usr/​local/​geda/​share/​pcb/​newlib/​generic_SMD_packages/​0805_reflow_solder''​** \\ Therefore, to use this footprint on a component I set its “footprint” attribute to **''​0805_reflow_solder''​** using gschem or gattrib.\\ Note that if the newlib symbol you want to use lives in a non-standard directory, gsch2pcb needs you to specify a path to that directory, either within your project.rc file (if you use one) or using the **''​%%--elements-dir%%''​** flag (from the command line).
 +  * Finally, since each new design typically requires you to draw at least a couple of new footprints, it’s likely you will have a local “footprints” directory. As previously, the footprint name to use is the filename you assign to each of your new footprints. Again, don’t forget to add a line to your project.rc file telling gsch2pcb where to find your local footprints. Alternately,​ you can run gsch2pcb with the **''​%%--elements-dir%%''​** flag set to point to your local footprint directory.
 +
 +
 +=== M4 library ===
 +The M4 library stores the footprints as M4 macros; there are usually several (many) footprints contained in each footprint file. The different footprints in a single file are generally variations on a single pattern (e.g. DIP-8, DIP-14, DIP-16, etc.)  The easiest way to find the correct footprint attribute name is by browsing through the "​pcblib"​ library in the PCB library window. ​ The footprint attribute is given in square brackets in the description. ​ Also you can view the list of footprints from pcblib at the [[http://​www.gedasymbols.org/​footprints/​|gEDA Symbols webpage]].
 +
 +The following m4 libraries have received more attention and improvements than the others:
 +  * ~amp for Amp connectors
 +  * ~amphenol for Amphenol connectors
 +  * ~geda for many diverse parts used in basic design using gEDA (resistors, caps, etc).
 +  * ~bourns for products like trim pots from Bourns
 +  * ~cts for products like resistor packs from CTS
 +  * ~johnstech for Johnstech sockets
 +  * ~minicircuits for Minicircuits specific footprints
 +  * ~panasonic for some Panasonic specific footprints
 +
 +Finally, for both the newlib and the M4 lib, it is extremely important that you verify that the footprint name you use instantiates *exactly* the footprint you want when you place it in PCB. Therefore, it is critical to inspect the footprint before you use it. You can verify the footprint you want to use by clicking on it in the “footprint library” window, and then placing it onto an empty spot in PCB’s drawing area. Manually inspect the footprint to ensure that it has the correct number of pins/pads, correct dimensions, etc.
 +
 +Also, once you generate Gerber files, make sure you [[geda:​pcb_tips#​i_m_done_with_my_layout._how_should_i_check_my_design|inspect all footprints instantiated in your Gerbers]] using gerbv (or an equivalent Gerber viewer) before you send your design out for fabrication.
 +
 +
 +=== What is the recommended way to deal with different footprints for the same sort of device? ===
 +For example, an opamp may be DIP8 or SO8. A resistor may be 0603, 0805, 1208, or through-hole. How do I know what package and footprint to use, and how do I manage the choices?
 +
 +First off, the footprint you should use is a decision for you to make, not your CAD tool. It is up to you to choose your preferred package type/​footprint,​ and then attach the correct footprint attribute to the component in the schematic. Once you have chosen which package (and footprint) you wish to use, then either [[geda:​pcb_tips#​where_can_i_get_pre-drawn_footprints_for_pcb|find an appropriate footprint]],​ or [[geda:​pcb_tips#​how_do_i_draw_a_new_footprint|draw one yourself]] and save it in a local directory.
 +
 +As far as managing the footprint choices (and indeed the large number of component attributes you are likely to have): Use [[geda:​faq-attribs#​help_my_design_has_hundreds_of_components_and_it_s_a_pain_to_use_gschem_to_attach_all_my_attributes|gattrib]]. That’s what it’s for.
 +
 +
 +=== How do I draw a new footprint? ===
 +Everybody does this a little differently. Some people draw the footprint entirely using PCB. Some people first draw a preliminary footprint in PCB, and then finish it off by hand editing it (e.g. using emacs). Some people write Perl or Python scripts to autogenerate footprints.
 +
 +  * use a text editor. See [[http://​www.brorson.com/​gEDA/​land_patterns_20070818.pdf| the manual on footprint creation]] by Stuart Brorson for the details.
 +  * draw the part in PCB and save as a footprint. See the [[http://​ronja.twibright.com/​guidelines/​footprints.php|howto by Karel Kulhavy]]
 +  * or use a [[http://​dlharmon.com/​geda/​footgen.html| python script]] by Darrel Harmon for "two pad", "​SOxx",​ "​tabbed"​ and QFP" style
 +  * or use a [[http://​www.brorson.com/​gEDA| perl script]] by Stuart Brorson for two pad SMT components
 +  * or use a [[http://​www.luciani.org/​geda/​pcb/​pcb-perl-library.html|perl script]] from John Luciani -- can be adapted to DIL, SOxx-Style, QFP, or even circular arrangement of pads.
 +  * or use the web based application [[http://​www.gedasymbols.org/​user/​dj_delorie/​tools/​dilpad.html|dilpad]] written by DJ Delorie for "​SOxx"​ style footprints.
 +
 +
 +=== How do I edit/change an existing footprint? ===
 +You can convert a footprint into an ordinary layout, edit the parts and convert them back to footprint. In the following list the parts in bold italic font are actions from the **//​Buffer//​** menu.
 +  - Select element
 +  - Copy selection to buffer (<​key>​ctrl-c</​key>​).
 +  - **//Break buffer elements to pieces//**. Pins become vias and pads become tracks. Unfortunately,​ some information is lost during the process. Namely, the square flag names of pins and pads. You have to regenerate this information later.
 +  - **//Paste buffer to layout//**
 +  - Do the desired changes. Note, that only vias, tracks and rectangles are allowed. No text, no arcs, no general polygons.
 +  - Select all objects that belong to the footprint
 +  - Copy selection to buffer (<​key>​ctrl-c</​key>​). The position of the crosshair will determine the origin of the resulting footprint. The origin will be marked with a little diamond.
 +  - **//Convert buffer to element//​**. This converts vias to pins. Tracks and rectangles get SMD pads.
 +  - **//Paste buffer to layout//**
 +  - Place the mouse over the pads that got rounded during step 4 and press <​key>​q</​key>​. This squares off the rounded pad edges.
 +  - Go over every pad, press <​key>​n</​key>​ and give a name to the pad.
 +  - Place the mouse somewhere where there is no pad or pin and give a name to the symbol.
 +  - Move the name to the place where you want the refdes or the value to appear.
 +  - Select everything and copy selection to buffer (<​key>​ctrl-c</​key>​)
 +  - **//Save buffer elements to file//**.
 +Alternatively,​ you can use your favorite text editor and edit the source code of the footprint.
 +
 +
 +=== How do I move the diamond of a footprint ===
 +The origin of a footprint is marked with a little diamond. To move it to some other position relative to the footprint you have to modify all coordinates. This can be done manually with a text editor. If you want to do it from within the GUI, you need to break the footprint into pieces and assemble it again. See above for a detailed checklist. Note, that the position of the diamond is determined by the position of cross hair when copying to the buffer.
 +
 +Yes, this is tedious. The reason for it is the lack of a real footprint editing mode in pcb. You are invited to write one.
 +
 +
 +=== pcb does not save silk when I try to make a footprint ===
 +The silk of footprints can only deal with lines and arcs. All the other objects like polygons, rectangles and text are silently omitted during **//Convert buffer to element//​**. If you need text in footprints you have to literally draw the letters with the line tool.
 +Or, use this
 +[[https://​github.com/​erichVK5/​FootprintTextForPCB|utility]] by
 +Erich Heinzle to create silkscreen line elements for any given
 +ASCII text, which can then be added to an existing footprint.
 +
 +
 +=== What is the proper way to make a double-sided footprint? ===
 +You can use the "​onsolder"​ flag to place pads on the opposite side of the
 +board. You would have something like this for a connector on both sides of the board:
 +
 +<​code>​
 +Pad[-40000 -7000 -40000 7000 2700 2400 3000 "​B1"​ "​B1"​ "​square"​]
 +Pad[-40000 -7000 -40000 3000 2700 2400 3000 "​A1"​ "​A1"​ "​square,​onsolder"​]
 +</​code>​
 +
 +If you draw the footprint with pcb-GUI and do **//​Buffer//​** -> **//Convert buffer to element//​**,​ the lines on the second layer become pads with the onsolder flag. Yes, it is the second layer, regardless its name.
 +
 +
 +=== How can I achieve pads without paste? ===
 +Sometimes, exposed copper should not receive solder paste. A common example is the pads of an edge connector. This can be achieved with the ''​nopaste''​ [[geda:​glossary#​flag|flag]]. Currently, there is no GUI way to set the flag. Use a text editor to add this flag to the pads of a footprint.
 +
 +
 +=== How do I add a footprint library to PCB? ===
 +Adding footprint libraries can be done from the GUI:\\
 +**//​File//​** -> **//​Preferences...//​** -> **Library** -> ''​FOOTPRINTDIRECTORY''​\\
 +Alternatively you can edit the file ''​$HOME/​.pcb/​preferences''​. Make sure, no instance of pcb is currently running. Look for the line that starts with "​library-newlib"​.
 +Don’t forget to include the new directory into either your gsch2pcbrc, or your local gafrc file (if you are using gsch2pcb, that is).
 +
 +
 +=== How do I update a footprint in my layout? ===
 +There is no way to automatically replace all instances of a footprint with the new version, yet. But there is a special mode of the buffer-paste tool, that will reduce the amount of clicks for manual replacement.\\
 +Use the **//​Window//​** -> **//​Library//​** dialog box to manually choose the new footprint. The tool becomes the buffer-paste tool, with the new footprint preloaded. Rotate it if needed with **//​Buffer//​** -> **//Rotate Buffer//**. Position the new footprint over the old one, and shift-left-mouse-click to replace the old footprint with the new one. Watch out for being 180 degrees off, use <​key>​o</​key>​ to check the rats nest after each placement, and undo if it appears you placed it backwards.
 +
 +
 +=== PCB is not finding my footprints. Why? ===
 +The footprint path that PCB uses is defined using the **''​Pcb.elementPath''​** variable in the app-defaults file named **''​PCB''​**. The path for the **''​PCB''​** file is set using the **''​XAPPLRESDIR''​** environment variable which is typically set from within the wrapper script named **''​pcb''​**.
 +
 +
 +=== Now that I have all of these footprints where do I put them? ===
 +I prefer to place all “production-ready” footprints in a single directory that is not in the gEDA/PCB install tree. When a new version of gEDA/PCB comes out I do not make any changes to project files or libraries. If there are newlib footprints in the PCB library that I want to use I copy them to the "​production-ready"​ footprint directory.
 +
 +Rather than change configuration files to get gsch2pcb to find the footprints I create a wrapper script called **''​sch2pcb''​** that contains the footprint path. All users use the same script and access the same production footprints.
 +
 +To use the **''​sch2pcb''​** script that is listed below replace the string **''​FOOTPRINT_DIR''​** with your footprint directory:
 +<​code>​
 +#!/bin/bash
 +gsch2pcb --elements-dir FOOTPRINT_DIR $@
 +</​code>​
 +
 +Or another user's version:
 +<​code>​
 +#!/bin/bash
 +#this script was written by John Luciani
 +gsch2pcb --elements-dir /​home/​user/​pcb/​footprints/​user --use-files $@
 +</​code>​
 +
 +Alternatively you can make use of a project file which gsch2pcb reads for its options. For example the file ''​myproject''​ could look like this:
 +<​code>​
 +schematics myschematic.sch myschematic2.sch
 +elements-dir /​myfootprintdir
 +output-name mypcb
 +skip-m4
 +</​code>​
 +
 +The example file searches through ''​myfootprintdir''​ for footprints used in ''​myschematic.sch''​ and ''​myschematic2.sch''​ and creates ''​mypcb.pcb''​ skipping m4 style footprints. gsch2pcb is then called with the project file as an option.
 +<​code>​
 +gsch2pcb myproject
 +</​code>​
 +
 +
 +=== Can I have two pads/pins with the same pin-number? ===
 +"Yes, totally. ​ This is how you create oval shaped copper around pins, or funny shaped pads (e.g. square at one end and round at the other) by overlapping two or more pads."
 +
 +
 +=== How do I make an oval shaped pad around a footprint pin? ===
 +Simply add a pad on top of your pin and give them the same pin-number. ​ If the soldermask is kept off both pins, and they overlap, they should appear as one pin on your board.
 +
 +
 +=== How do I make a 2-sided pad? ===
 +"Odd as it sounds, this can be necessary for some edge connectors. ... but how do you do it???"
 +
 +You can do it by making two pads at the same position and same pin number,
 +but the second one with the flag "​onsolder"​. Like in:
 +
 +  Pad[ 10mm -3mm  10mm 3mm  2.0mm 0.5mm 0.2mm "​1"​ "​1"​ "​square"​ ]
 +  Pad[ 10mm -3mm  10mm 3mm  2.0mm 0.5mm 0.2mm "​1"​ "​1"​ "​square,​onsolder"​ ]
 +
 +
 +=== Edge Connectors ===
 +Do a 2-sided pad as above. If you want the shape of the connector pad
 +to be square at the edge end and half-round at the pcb-interior end, use
 +two overlapping pads per side, like in:
  
 +  Pad[  0   ​-3mm ​  ​0 ​  ​3mm ​ 2.0mm 0.5mm 0.2mm "​1"​ "​1"​ "​square"​ ]
 +  Pad[  0   ​-3mm ​  ​0 ​  ​5mm ​ 2.0mm 0.5mm 0.2mm "​1"​ "​1"​ ""​ ]
  
 +  Pad[  0   ​-3mm ​  ​0 ​  ​3mm ​ 2.0mm 0.5mm 0.2mm "​1"​ "​1"​ "​square,​onsolder"​ ]
 +  Pad[  0   ​-3mm ​  ​0 ​  ​5mm ​ 2.0mm 0.5mm 0.2mm "​1"​ "​1"​ "​onsolder"​ ]
  
geda/pcb_footprints.txt · Last modified: 2017/06/24 01:35 by henry.wolfe