element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Rachael's Blog EAGLE Tutorial: Library Part Creation Part 1 - Creating Packages
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rachaelp
  • Date Created: 9 Jun 2017 6:06 PM Date Created
  • Views 3533 views
  • Likes 12 likes
  • Comments 8 comments
  • eagle library
  • rpeagle
  • tutorials
  • eagle guide
Related
Recommended

EAGLE Tutorial: Library Part Creation Part 1 - Creating Packages

rachaelp
rachaelp
9 Jun 2017

1. Introduction

 

One of the fundamental pieces of work that is required to create schematics and PCB layouts is creating library parts. Lots of packages ship with a large library of parts, including EAGLE, and there are numerous resources on the web for downloading parts but often these parts are inconsistent with each other, potentially have errors or are just not quite what you need. Most experienced users will prefer to have their own set of libraries which they use and find it often quicker to create their own parts than search for, check and edit a part from an external source.

 

Unfortunately this task can seem quite daunting when you aren't familiar with the tools and the methods of doing this efficiently. I plan to create this tutorial series to take you from creating simple packages, symbols and devices through to more complex topics like managing variants and building up an in-house library from scratch. For the first few tutorials I will refrain from using keyboard accelerators and ULP to accelerate and automate any of the process so this is just using EAGLE as-is. Future tutorials will show how the already speedy library creation process can be made even faster using these facilities.

 

For this initial tutorial we are going to create a package drawing for a Texas Instruments MSP430F22x2 device. The datasheet of which can be found on the TI website here: http://www.ti.com/lit/ds/symlink/msp430f2232.pdf

 

2. EAGLE Library Overview

 

The EAGLE libraries (.lbr) consist of three parts. Firstly there is the package which defines the copper placed on the board as well as the silkscreen and assembly drawing information. It is also possible to define keepout and restrict areas to indicate how close other packages can be placed and where routing is not allowed. Secondly there is the symbol(s) which define what is placed within a schematic. Finally there is the device which combines symbols and packages to form a part which maps symbol pins to package pins and defines additional properties, all of which can then be added to a design.

 

3. Creating a Package

3.1. Obtaining the required data

 

The usual place to go for package information and recommended PCB footprints is the data sheet for the device or alternatively a dedicated document from a device manufacturer which specifies their package drawings. The information required to create the package is:

 

  • The size of the package body
  • The pitch of the pins
  • The size of the pads required on the board
  • The pitch between the rows

 

All this information should be easily accessible but sometimes you may need to do a little calculation to ensure you have the centre-to-centre distance for the pitch between rows (sometimes they do the maximum outer edge-to-edge dimension).

 

3.2. Setting up EAGLE

3.2.1. Configuring EAGLE's grids

 

EAGLE has two grids available. The main grid which is the one displayed and everything is snapped to by default, and the ALT grid which is not displayed and which everything snaps to when the Alt key is pressed. We'll use the main grid for setting the pin pitch of the device and the body length and the ALT grid for setting the row pitch of the device and the body width. We start with pin and row pitches which are 0.65mm and 7.4mm respectively. Now, we want the device to be centred on the origin so we will divide the row pitch by two. As there are an odd number of pins we can leave the pin pitch at 0.65mm but we'd divide this by two as well if the device had an even number.

 

GRID mm 0.65 ON; GRID ALT mm 3.7

 

3.2.2. Setting the font and alignment for text

 

Text on the silkscreen should always use the vector font and be a suitable size for the package and for neatness centred.

 

CHANGE FONT vector; CHANGE ALIGN center; CHANGE SIZE 1.27

 

3.2.3 Grouping tips and accessing group functions quickly

 

One aspect of EAGLE which is different from many other packages but can make tasks very much quicker is the use of groups. In EAGLE groups are not the same as they are in other drawing packages such as Microsoft Visio or Microsoft Powerpoint. The these packages you select a number of objects and group them and these then become "stuck together" and are operated on as one and you can have an arbitrary number of groups. In EAGLE there is only one group and it consists of the last items you added to a group. Lets think of it more as a selection group feature rather than a proper group. Nonetheless its is a very powerful feature.

 

You create a group by clicking on the group button or issuing a GROUP command and then either dragging a box around all the items you wish to group or clicking to draw an arbitrary shaped selection box. Once the group has been created you select the operation you wish to perform on the group, e.g. MOVE, COPY, DELETE, etc. At this point you have a few choices on how to apply this operation to the group. The most obvious way is via the right click context menu. Right click on any of the items within the group and there will be an option to perform the group operation, e.g. Move Group...

 

There is a quicker way though. If you hold down the Ctrl button (Cmd on macOS) and then right click on a group item then the selected function will be applied to the group.

 

3.3. Placing the pads.

 

Here is where the use of the grids comes into its own. You want to place the pads in each row at the right pitch relative to each other. This is why we set the main grid to match the pitch of the pins of the part above. In our example this is 0.65 mm. There are 19 pads on each side so we therefore want the middle pad to align with the origin. We want the pads to be 1.8mm wide and 0.3mm tall and we want the pad numbering to be 1, 2, 3, etc rather than the default P$1, P$2, P$3, etc... So we start by issuing the following command:

 

SMD 1.8 0.3 '1'

 

Then we click to place the first pad 9 grid spaces above the origin and work our way downwards placing our first 19 pads one grid space apart in the vertical. Once we've got our first row of pads we then use the group button or issue a GROUP command and drag a box to add the entire row to a group.

 

Note: As of EAGLE v8.2.1 there is a bug which means that after a group has been formed the original command does not reactivate. In v7, if you performed a MOVE, followed by a GROUP, then the MOVE command would automatically activate once the group was made so it was then super quick to perform the group move operation.

 

Issuing a new MOVE command and right clicking on the group with Ctrl (Cmd) held down to activate the group will now enable us to place the row at the correct offset from the centre of the device. This is where we revert to using the ALT grid by pressing and holding the Alt key. We can now move the row one ALT grid space to the left (3.7mm) which will place it in the right location.

 

We now repeat the above process with a few modifications to place the second row of pads.

 

SMD 1.8 0.3 '20'

 

Then we click to place the first pad 9 grid spaces below the origin and work our way upwards placing our second 19 pads one grid space apart in the vertical. Once we've got our second row of pads we then use the group button or issue a GROUP command and drag a box to add the entire row to a group.

 

Issuing a new MOVE command and right clicking on the group with Ctrl (Cmd) held down to activate the group, we can now move the row one ALT grid space to the right (3.7mm) which will place it in the right location.

 

The final result of the above will look lie the following:

 

image

 

3.4. Silkscreen and Assembly Drawing

 

Now the surface mount pads have been correctly placed we need to draw the silkscreen and assembly drawing information. We'll start by changing the grids again for ease of drawing the package body for these. The body is 12.5mm tall and 6.1mm wise so we'll set the grids using half these values.

 

GRID mm 6.25; GRID ALT mm 3.05

 

Now we can change the layer we wish to draw on to tDocu.

 

CHANGE LAYER tDocu

 

Now using the LINE command we can draw and initial 12.5mm square centred on the origin. The top and bottom of this accurately represent the top and bottom positions of the package body but the left and right are clearly too wide. Now we will use the MOVE command again to get these in the right place. First we move the left hand side to the centre line using the regular grid and then we move it again back out 3.05mm to the left using the ALT grid. Repeating this process again for the right hand side leaves us with an accurate body outline on the tDocu layer.

 

The result of the above the the following:

 

image

 

We now need to use the COPY command to copy the top and bottom lines from the tDocu layer. Initially we'll place these copies one grid space above and below the existing body outline respectively. We can now use the CHANGE command to move these to the tPlace layer.

 

CHANGE LAYER tPlace

 

Now click on the copies of the lines we placed above and below to change their layers and then with the MOVE command we can move them so they are in the same position as the original lines (but on different layers).

 

We now need to add a pin 1 marker to both these layers in exactly the same way as we created the package body information above, but using the CIRCLE command and a smaller grid of 0.325mm which is half the pin pitch and allows us to create and place a suitable size circle near the corner where pin 1 is located. As per the body we can now use the COPY and CHANGE LAYER commands to create a circle on the tDocu layer as well and then move it so it is sitting on top of the original.

 

The result of these additions is as follows:

 

image

 

Finally we need to add some textual information to the package. There are two built in attributes which we can access via placing TEXT fields containing >NAME on the tNames layer and >VALUE on the tValues layer. Setting the grid to 1.27mm allows us to place the >NAME and >VALUE text nicely above and below the package body on their respective layers.

 

CHANGE LAYER tNames; TEXT '>NAME'

 

Then click to place it at the top.

 

CHANGE LAYER tValues; TEXT '>VALUE'

 

Again click to place this at the bottom.

 

After you've done this you should have the following:

 

image

 

4. The Completed Package Drawing

 

The result of everything above enables the creation of a footprint with relative ease. The video below shows how long it took me to create a complete and accurate package for a TSSOP-36 footprint as used by a Texas Instruments MSP430F22x2 microcontroller. In the video, to help clarity and to show what is being done, I don't use any keyboard shortcuts or ULP to accelerate anything and as a result this package takes longer to create than it would when using shortcuts and ULP. I'll cover how to speed the process up even further using these methods in a future blog article.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

This concludes the first part of my new EAGLE tutorial series. Let me know what you think in the comments below and if you have any questions please feel free to ask!

Blog Series Reference
EAGLE Tutorial: Library Part Creation Part 1 - Creating Packages
EAGLE Tutorial: Library Part Creation Part 2 - Creating Symbols
EAGLE Tutorial: Library Part Creation Part 3 - Creating Devices
EAGLE Tutorial: Library Part Creation Part 4 - Advanced Packages and Package Variants
EAGLE Tutorial: Library Part Creation Part 4b - Supplemental worked example
EAGLE Tutorial: Library Part Creation Part 5 - Multiple Symbol Devices
  • Sign in to reply

Top Comments

  • Fred27
    Fred27 over 4 years ago +2
    A nice tutorial. I can manage to create a library in Eagle, but I'm very focused on using the mouse and then editing properties. The creative use of the command line and grid system is really helpful.
  • shabaz
    shabaz over 5 years ago +1
    Hi Rachael, Nicely explained! : )
  • dougw
    dougw over 5 years ago +1
    Excellent tutorial - I wish I had access to it when I was learning the package.
  • Fred27
    Fred27 over 4 years ago

    A nice tutorial. I can manage to create a library in Eagle, but I'm very focused on using the mouse and then editing properties. The creative use of the command line and grid system is really helpful.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vaithees
    vaithees over 5 years ago

    Hello,

         I need to create a device "POWERSUPPLY_DC-21MM". Can you tell me how to create it?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • veryfungi
    veryfungi over 5 years ago

    I see you answered my forum post I will comment there.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • veryfungi
    veryfungi over 5 years ago in reply to rachaelp

    Hello Rachael,

     

    I am a user with years of experience using Eagle. I owned a copy back when it was version 3.5... I was able to jump right in and create a board like nothing ever changed, but the process to copy a part into my own library and make changes to it have eluded me so far. I created and opened "my library" and copied a simple header strip into it. I was able to finally edit the pad size on the part and save it. However when I go to add components to my board "my library" does not show up, and it does not look correct in the control panel view. Thanks!image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rachaelp
    rachaelp over 5 years ago in reply to veryfungi

    Hi Jim,

     

    You have made a very good point, looking at it now I can see it's not clear how I got to this point. I think it's down to the way I originally wrote and edited these blogs and some of the preliminary material got omitted. Thinking more about it now I think I need to add in another blog before part 1 which gives a walk through of the library editor and a little about setting up libraries and how to structure things etc, and then start with how to create a new custom library and how to create/open for editing symbols, packages and devices. I'll try and put something together fairly soon to resolve these oversights.

     

    So to get you going now, open up the library editor and either open an existing library you wish to edit or create a new library. Within that main editor view you'll see several buttons across the top, amongst these there are buttons for opening/creating new devices, symbols and packages. Click the button for the package and enter a name for the new package and then click OK before following along with the above tutorial.

     

    Best Regards,


    Rachael

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube