Introduction: How to Make a Custom Library Part in Eagle CAD Tool

The eagle cad tool is a great thing. It does have something that I see as a draw back. That is that you need to pick a package for your part while you are still working on the schematic phase of a project. I assume Cadsoft, the makers of eagle, have their reasons. Although eagle comes with an extensive part library, some times the part you want is not in the package you want, and other times neither the package or part you want is in their libraries. In these cases you are you are left with two choices. First, pick a similar part that already exists. Second, make your own part. This instructable will focus on the later option.

Step 1: Start the Eagle Control Panel

That step should be self explanatory.
In linux type eagle from the command line.
In windows double click on the eagle icon.
Or start->programs->eagle layout editor (version) -> eagle

Your screen should look something like this now.

Step 2: Select or Create a Library

Decide where you want your new part to be. I suggest creating your own library. If you have your own library it will be easier to share your work with others.
1) To create a new library go to the menu bar and select File->New->Library

2) Add to existing library in the left pane of the control panel right click on the library you want to add the part to and select open.

Step 3: The New Library

Your screen should like like this. From here on out I will assume that you created a new library, but this really doesn't matter.

Step 4: The Easy Way or the Hard Way.

To design a part in eagle you must define a device, package, and symbol. Each aspect has its own set of layers that you must keep straight. Again you are left with two choices. The easy way, in which you copy a similar part and tweak it to match your specifications. This is of course in contrast to making one from scratch. For this instructable we will design one from scratch.

Step 5: Time to Get Out the Data Sheet.

For this instructable we will design a part used in the IMU for the PSAS rocket. The object of our affection is the ADXRS150 gyroscope from Analog Devices. To get all the parameters we need for the design we need not look any further then our trusty data sheet.

Step 6: The Package

As I mentioned there are three aspects to a part in eagle. We will start with the package. We want to make a 32 lead BGA (Ball Grid Array). From the data sheet we can see that the balls are 0.55mm in diameter, and spaced 0.80mm on center appart. The far edges are 4.80mm appart on center.

Step 7: Building the Package

click on the package icon in your library window. The edit box will pop up and in the "new"
field type BGA-32 (remember we are making a 32 lead Ball Grid Array). and hit ok.
You will get a warning asking "Create new package'BGA-32', click "yes".

Step 8: Setting the Grid

The default eagle setup will create a black screen with a grid on it.
In the center will be a dominant white cross. This cross is the center of our
package. It will be the point by which people will select/move the package around.
Placing our pads and other parameters wisely around this cross is important.
From the previous set we know we need some fine resolution make the grid
half of what our smallest component is.

Step 9: Setting the Grid (cont)

Recall the data sheet has balls that are .55mm in diameter and are spaced .8mm apart on center.
The centers of the balls on parallel outer edges are 4.8 mm apart on center. So we want a
grid size that will make it easy for us to place these balls.
From the "view" menu select grid, or simply type grid into the command window.
The grid tool will open up make the size 0.2 units mm Alt: 0.2 and multiple of 5. Without
the multiple the grids are too small to be displayed. Note the lines will now be
1 mm apart. leave the display on
and the style lines. Your screen will have a dizzying amount of grid lines on it.

Step 10: Adding Pads

At this point if you want to copy another package from an alternate library you can
use the copy command with the following syntax in the command window.
copy packagename@libraryname
and the package will magically appear, but being man a first principles I'll show you
the long way.

As mentioned earlier one must be careful to make sure one adds elements to the
appropriate layer. Our pads (i.e. balls) for example will belong to the top layer.
In the command window type smd, this command will be used to create the pads. By default
the top layer will be selected. In the Smd drop down box will not have a circle by default
in that box type "0.55 x 0.55", and make the roundness 100%. I also placed a second cross
hair as a reference guide 7mm up and 7mm over know that is the over all size of the chip.
One measurement that is missing is how far from the edge are the pins. Being a slave to
symmetry I made the assumption that the center of the ball would be .8 mm away from the
edge. With properly spaced grids, using the mouse to place pads can be very quick accurate. Alternativly, in the command window if you can type
(x-cord y-cord) and the pad will be placed where you want it. Place the pads as well
as you can, and it should look like this when you are done.

Hints: It may be easier to make the origin the center of the device and
just give the coordinates to place the pads (3.2 0) (-3.2 0) ... etc

Step 11: Details for a Cleaner Look

On the tPlace layer put an outline of the chip's foot print and make the Ball A1 indicator
visible with the wire tool.

Type wire in the command window. Select 21 tPlace for the layer. Now draw a 7mm box around
all the pads you placed in step 10. Either trace it out or type the coordinates in the
command window.

Step 12: Name Pads

To make our life easy in the furture its a good idea to name the pads. Type name in the comand window, and double click on each pad. A dialog box will appear and simply type in the new name. Its good to go off of what the data sheet uses for names as you will have to repeat this process for the symbol. Following this advice will make the final step (matching package with symbol) much easier, however, it does not make for a generic package (i.e. when you want to use this package for a different device).

Step 13: Add Name and Value

name and value parameters are added on separate layers tname and tvalue respectively.
These will be named later on by who ever is using the package so just put in generic
headings like "name" and "value"

Select the text tool or type text in the command window. Select the tName layer, and
an appropriate size and place on the top of the drawing.

Repeat this process for the value but use the value layer.

Test to make sure you have the right elements on the right layers by selecting the layer tool
and turning off all the layers except the one you want to check.

Step 14: Building the Symbol

Click on the symbol button and add a new symbol. This step is identical to step 7 except its for a symbol not a packge. The symbol is what will appear when you are drawing your schematic. The schematic is a fundamentally different representation of your circut then the layout (or package view). The package needs to match the datasheet as it represents the physical entity and has a huge impact on the baord layout. The schematic should be designed so that it is easy to read and neeed not be a prefect representation of the devcie (in terms of size). For examplep pins without connections dont need to be placed on the schematic.

Step 15: Back to the Data Sheet

On some devices not all pins are used. However for this device all the pins are doubled up. We can also see that all the pins have names. To make life easier it is a good idea to name the pins that are placed on the symbol.

Step 16: Draw the Symbol

Use the wire tool to draw a box that will represent the symbol on the schematic. By default you will be drawing on the symbol layer. Double check to make sure by looking in the upper left corner after the wire tool is selected. The layer drop down menu should have "94 Symbols" selected.

Once the box is drawn, type "pin" in the command window, and start placing the 32 pins evenly around the box.

Step 17: Naming Pins

As great a names as P$1-p$32 are it will make our lives easier when we connect pins on the symbol with pads on the package if we use a more intelegent naming shceme. We will assign the names of the pins based on, you guessed it, the data sheet.

Type name in the command window and double click on the pin to remain. A small dialog box will appear with the current name. Change the name and click "Ok". Repeat 32 times.

By default the name on the pin and the symbol will show up in the device. This makes for a very cluttered look. Click on the "change" button and select "visable" from the drop down menu, and then select "Pin". Then click on every pin. It will not be obvious what you are doing but trust me the final design will be easier to use.

Step 18: Make the Device

In this step the association between the symbol and the package is made. Click on the devcie icon, add the name of your device, and your screen should like like this.

Step 19: Add Package to Devcie

In the lower right hand corner click on the new button and select the package. Your package will show up in the upper right pane.

On the left vertical tool bar click on the symbol icon, and place your symbol in the left pane.

Step 20: Make Connections

If you have followed my advice and named the pins on the symbol and the pads on the package the same this step should be easy.

Click on the connect button and the connect dialog box will appear. Keep clicking the connect button untill all the connections are made.

Step 21: Save Device

CONGRADULATIONS!! YOU ARE DONE. Click on the save button. It always a good idea to check all is well, so navigate to your library, and expand it by clicking on the plus sign. You should see your device listed. Hightlight it and it will appear in the right hand pane.

Now get to work using your new device.


jackb161 (author)2017-05-31

Thank you so much! very helpfull!!

GilrainB made it! (author)2016-12-20

This was an amazingly helpful post!

jplaiss (author)2016-08-24

I had to use my imagination for a switch I couldn't find.

Any suggestions?

Cheesy Popcorn made it! (author)2016-08-11

Thank you! Quite helpful.

joshuasmin made it! (author)2016-07-08

^^ There were some typo but all is good

EdH48 made it! (author)2016-06-28

Excellent tutorial! Eagle isn't exactly an intuitive piece of software, but I now feel confident to add parts from any datasheet.

pertbanking made it! (author)2016-06-27

Thanks so much! You made learning this new software easy :)

ahsan_ayyaz (author)2016-06-26

This is great,thanks!

clovisf made it! (author)2016-02-16

Thank you for the tutorial! It worked flawlessly from beginning to end!

CarsonH3 made it! (author)2016-01-31

Awesome tutorial, Thanks! Will probably reference it in the future when I forget how to do this again.

eagle part.png
BruceS48 (author)2016-01-23

Hint Hint....if the package is in another library already...

name the package the same as in the other library. Then select library -> update

This copies the package into your library.

HarshalJ2 (author)BruceS482016-01-26

This is really useful...!

jcabanillas (author)2015-09-23

Nice tutorial, really helpful. Really love the eagle CAD

havasnack16 (author)2015-09-18

Anyway to change the Pin size smaller from the short pin option that is available in eagle?

The reason for asking is the fact that I am making a part that is 4mm in width and the shortest pin eagle has is almost the same size.

MatS1 (author)2015-09-10

Good 'ible. I'd love to see a more concise version. Also there are some details that aren't quite right, e.g. under Step 19, "On the left vertical tool bar click on the symbol icon, and place your symbol in the left pane". This should read "click on the *add* icon". Also Step 18, "Click on the devcie icon, add the name of your device" should read "click on the device icon and create a new device with the same name". Small details...

cgifool (author)2015-07-15

crchisholm (author)2012-06-23

OK stupid user trick here.... I have followed this tutorial and it is great. My problem is that the labels on the symbol are huge and overlap each other. Can't seem to figure out how to shrink them or move them. I am sure I'ave done something wrong but not sure what. Any ideas?

595 part.jpg
bdavisacc (author)crchisholm2015-06-03

Bigger box is the only way I know of to deal with this, other than making the pin names invisible (Properties -> Visible). This is pretty common for systems where you can define your own blocks (eg Simulink).

MichaelC32 (author)crchisholm2015-02-11

make your box bigger?

crchisholm (author)MichaelC322015-02-12

Yah, for some reason I had it in my head that the symbol diagram had to be the same relative size (to the grid) as the chip. I eventually figured it out.

bdavisacc (author)2015-06-02

This is nice, a really good, detailed tutorial. How do you skip pin numbers (or give a part non-sequential numbers)?

MariusB1 (author)2015-05-05

This was the easiest way for me to learn how to build my own devices

Thanks for the effort

NatashaABaker (author)2015-03-20

Nice guide! Might also want to try searching on SnapEDA first which has hundreds of thousands of CAD parts that export to Eagle:

O-Zo (author)2015-02-03

Thanks! Made it through the design process in no-time and had fun while at it. Cheers.

DulshanM (author)2014-08-29

Thank you so much for this valuable Tutorial.

kirkwoodwest (author)2014-06-18

The instructions make no sense here. Nor does this grid seem to actually help with the placement of the pads.

tbarot (author)2014-05-26

This helped a lot.Thnx.

You should also mention that to move pads,parts,symbols,etc. by a small distance pressing and holding alt helps,some may know this but i had to google it.

jobo99 (author)2014-05-10

thank you soooooooo much i'm doing a project for school and i needed schematics but i couldn't find ANY good libraries

thank again


The Hacker Artist (author)2014-04-24


skyhisi made it! (author)2014-03-02

Very clear instructions, thanks :)

asid61 (author)2013-07-13

Great instructable! I made my parts in minutes with this!
And I am a completely new user.

rsakaridani (author)2013-05-13

nice guide, really easy to follow. Thanks a lot btw

ohmware (author)2013-05-06

Great walk-through, very thorough! Thanks!

max.kostka (author)2013-03-14

Nice Job. Thanks, man!

rhicksdev (author)2013-02-03

Thanks for such an easy to follow guide - especially since you took the hard route of starting form scratch - this is exactly what I needed to make a pressure sensor and a proportional valve, neither of which are in anything like standard packages that could be copied from another library.
If you're ever going to update this you could perhaps add a name/value step for the device as you did for the package (though this was easily worked out by a novice like me).

Thanks again!

rhicksdev (author)2013-02-03

@ AngusPearson - Looks like you missed a part of step 17:

"By default the name on the pin and the symbol will show up in the device. This makes for a very cluttered look. Click on the "change" button and select "visable" from the drop down menu, and then select "Pin". Then click on every pin. It will not be obvious what you are doing but trust me the final design will be easier to use."

- You should have trusted him ;)

AngusPearson (author)2013-01-19

Hi there
I know it's probably some setting somewhere that I'm missing, but I can't seem to get rid of duplicate labels on my pins like in the picture. Any help would be very welcome!

Screen Shot 2013-01-19 at 22.47.55.png
dakoder (author)2013-01-11

Very easy to follow instructions Thanks.

girishtheone (author)2012-09-22

Excellent work !!!
Very neat instructions, thanks :)

rclayled (author)2012-08-03

Slightly different question - can you take a part from a schematic and copy / add it to a library? The particular part(s) are not in any library that I can find - looked at Adafruit, eSawdust, Eagle, etc. Thanks!

rclayled (author)rclayled2012-08-05

I answered my own question - if you have a schematic with components that you cannot find in a library, you can 'export' them into a new library. It is pretty straight forward. From the schematic (not the board!) click File, Run. Select exp-project-lbr.ulp. Take the defaults. First, select 'collect data', then 'create library'. The library name is shown after the collect data step and will be created in the same folder that the board and schematic reside. Move the .lbr file to your custom library folder or just stick it with the standard Eagle libraries. From the control panel, you have to add it.

nogueira (author)2012-07-25

Saved my day, thank you.

sandborn (author)2012-01-06

You really ought to start with the easy way. I came to figure out how to do this efficiently, and your instructions don't tell me how to copy an existing part and tweak it.

nilloc (author)sandborn2012-07-23

I found a 6 minute guide to editing existing components here for those that are interested:

phabib (author)2012-06-11

Very detailed and easy to follow. Great job. Thank you.

WakeUpWolfgang (author)2012-01-01

How Would I go by doing it the easy way?

ohnoezitasploded (author)2010-07-10

Thanks for this great tutorial. Is there a way to copy a symbol from another library? The command copy SYMBOLNAME@LIBRARYNAME doesn't work.


I have even a simpler way.
Open the library where you want the part to be copied into (Library->Open)
Go to the Eagle Control Panel and find the \lbr folder where the library is that you want to copy from (under Libraries).
Expand and find the device/package you want to copy and right click it.
Select "Copy to Library"
That's it. Done.


You can open the library, edit the part, select the cut tool, then select the group tool and highlight the entire symbol. Then right-click on the selected part and select "Cut: group". Return to your library, edit your part, select paste, and you should now have the part.


Thanks, I never would have figured that out. The copy command doesn't copy, and the cut command doesn't cut in that it doesn't remove the original. Non-intuitive.