Creating Devices in EAGLE Part I – The Package
Creating Devices in EAGLE Part I – The Package
Now with better videos!
While EAGLE includes plenty of parts in the libraries that come with it, I’ve never done a project (besides the example for this site) that didn’t require at least a couple of devices that I couldn’t find in EAGLE. Sometimes I’ve even thought that they were probably somewhere in those libraries, but it was easier to create them myself because I found that it’s pretty quick once I learned a few tricks.
If you don’t have the datasheet and the physical parameters for your device, find the data sheet on the manufacturer’s web page or a place like Digi-Key. Find the package dimensions and make sure you know whether or not you’re reading the dimensions in millimeters or inches (or some other unit), because you’ll need to set your grid appropriately.
Creating the Package
To start, open a new library by clicking File->New->Library. You’ll see a blank screen that doesn’t seem to have much. Looking at the top toolbar, you’ll see three buttons to the right of the print button. From left to right they are: Device, Package, and Symbol. Clicking on any of these will display a dialog that allows you to start creating a new device. We’ll start with the package, so click on Package and enter a name in the dialog. This example will be a 2.5 digit LCD, so I chose 2.5_DIG_LCD because spaces are not allowed (the datasheet is here).
Clicking OK will take you to the package layout screen, and it’s nearly identical to the board layout screen. The first thing I like to do is create my package outline using the wire tool. While this can be done graphically, packages can have awkward dimensions that I think are easier to do using the text commands. Just above the layout area is a text box where you can enter text commands and recall previously used text commands. If you open the General Help and select Editor Commands, you’ll be able to get the syntax and all the details on using the text commands. Open the Wire command and look at the first syntax line. For those unfamiliar with the notation in the syntax, here’s a quick rundown:
- anything in square brackets is optional
- the vertical bar indicates that there are different choices for the parameter
- the bullet represents x-y coordinates
- text inside single quotes indicate string values
- unquoted text indicates numeric values
The most important dimensions of the package are the maximum width and length. For this LCD, the package is 30mm x 26.17mm (I’m ignoring the 1mm tab on the left side). To create this package outline, verify that your grid is in units of mm, then type “WIRE (0 0) (30 0) (30 26.17) (0 26.17) (0 0);” in the command box without the quotes. This creates a wire that starts at (0 0) and follows the path created by the other points. The semicolon terminates the command and is equivalent to double-clicking a wire you are creating with the graphical tool. You can continue the wire from your last point by omitting the semicolon.
With the package outline completed, the only other necessary step is to place the pads (if you’re creating a package that uses SMDs, the process is similar, but you’ll need to read the help on the SMD command). On the lower-right corner of the package on the datasheet it shows that the center of the end pads are 6.11mm in from the edge of the package and that they are spaced by 2.54mm. Also, the two rows of pads are 28.67mm apart. This is 2.5mm wider than the package, so each row of pins is 1.25mm away from the package. To create the first two pads, type “PAD (6.11 -1.25) (8.65 -1.25)” in the command box. You aren’t limited to creating two at a time, so feel free to add the other six in this line, or do all 16 at once. The other row of pads will have the same x values, but the y value will be 27.42. For example, the first pad will be at (6.11 27.42).
Once you’ve created all of the pads, you’ve done everything that is necessary to create your package. To make the layout more readable, I would suggest putting something in the package to indicate that it is a 2.5 digit LCD (or whatever you’re making). To do this quickly, I selected the text tool and entered “188″ as my text. On the top toolbar I changed the layer to 21 tPlace (to match the package outline) and made the font as large as possible, then I placed it inside the package. Now when I use this in a project, I’ll be able to identify the package for this LCD.
Last word
I’ve started using blip.tv as my video host because of the way YouTube mangled my videos. Like YouTube, blip uses flash, but it also permits for much higher resolutions. I hope they work out and I hope the audio is getting better. I’ll be remaking the first few videos as soon as time permits. As always, feel free to post comments, questions, or suggestions. In my next post I’ll be doing the symbol and device to wrap up this topic, then I’ll be going back to some of things that were touched on in previous posts that deserve a more thorough explanation.
Comments
Comment from mahmood
Time January 19, 2009 at 1:47 am
hi
thanks for really interesting and helpful videos! good work
Comment from John Glyn-Woods
Time September 4, 2009 at 2:08 pm
Suburb video, from a standing start, this series is great, my first package had a high pin count so a little time in a spreadsheet getting reacquainted with the $ & and operators then the past special had 100s of pads down in no time!!!!
Comment from abhishek raut
Time October 9, 2009 at 8:21 am
hey thanks a lot.. that really helped me…
wel i hv a difficulty.. i hv to make soic package n i referred some existing soic packages in microchip lib. their pins r made of smd n they all hav some grey rectangles in “51 tDocu” layer inside these smds.. now m confused dat y do v need those rectangles ?? n how to decide their dimensions n draw it cos thes r not centered on the grid lines while the smds r centered.. plz help me out.. u may rply on my id..
Comment from fabrizio
Time November 13, 2009 at 8:29 am
Hi there,
very interesting tutorial. The question is, how do you create a package that has 240 pins ? clearly placing pads by hand is not an option.
Thanks in advance for the answer.
fabrizio
Comment from Robert
Time January 14, 2010 at 7:47 pm
Good videos, I have a good amount of experience with electronic design, but reading is so much harder then watching a video…especially with difficult tasks such as creating devices.
Thanks…thanks… this inspires me to perhaps make some videos myself and pass the knowledge along.
Comment from Henry
Time February 27, 2010 at 5:40 pm
thnx
this video really helped me
regards from colombia
Comment from Mensch
Time April 22, 2010 at 5:13 pm
Is there any way to create a bucle for or while that let us creat a big amount of pins? I have some BGA to create and that’s CRAZY. By now I use the grid, but it would be better to “program” it like a bucle.
Thanks
Comment from Nikhil Sarnaik
Time October 28, 2010 at 4:52 am
Hi Chris,
The videos really are helpful.
I am just starting with Eagle and think this information will get me started with Eagle quickly.
Thanks for the help.
Comment from rifat
Time March 13, 2011 at 1:02 pm
Hi Chris,
Thanks a lot for the videos, they are one of the best tutorials I have found so far.
Comment from Justin Reed
Time September 10, 2008 at 12:08 pm
Hey Putz-
Your website actually helped me. I used the Eagle tutorial to get started on my Senior Design project.