My first thought is don't. There are lots of libraries at CadSoft EAGLE Libraries produced by others and by manfacturers. For example I found a Samtec library for some surface mount headers I was interested in using.
If you can't find a part or the libraries you do find don't seem to work then it is possible to make your own components and it's not too difficult.
I found some good tutorials on the web
http://www.baldengineer.com/blog/2014/01/03/eagle-create-custom-library/
https://www.sparkfun.com/tutorials/110
Library
There are 3 parts to a library.
- Symbol
- Package
- Device
You'll see the symbols and packages in the Eagle control panel.
It's also worth giving your library a decent description, you can use HTML tags in that to make it more readable.
Symbol
The symbol is what you see on your schematic. If you name your symbol after the manufacturer's code then you will find that the design link for selecting parts works well.
My tips here are:
Don't make your symbol too small, you'll find that you can quickly run out of space for pin labels
Equally, spacing out the pins will make it easier to place the components around it.
Also don't feel the need to mirror the pin layout of your the device. I've grouped the power, sensors and I2C to make the schematics clearer.
Ensure your outline is centred on the control [+] provided. This will ensure people can easily move or set properties.
If a pin name is inverted you can indicate this by adding an ! in front of the name and that will give you a line over it.
When you add a pin you can specify the direction e.g. input, output or power. These are abreviated in the Eagle UI but the descriptions are provided in the help file and on Stephen Farnsworth Ilektronix blog. The pin direction is used in the Electrical Rule Check to make sure you've not wired two outputs together or shorted V+ to Gnd.
If you are creating a logic device then it's worth reading up on the SwapLevel as this would allow you to make parts where pins are interchangable e.g. the 2 inputs on a NAND gate are electrically equivalent so the end user could swap them to simplify routing of their PCB.
Package
This is the pads on the PCB. Often you will have a standard layout e.g. Dual In Line or SOIC. Copied my SOIC16 package from another library. Be warned that there are often very similarly named parts, I accidentally picked up a SOIC16 package with a heatsink pad on the bottom which my device does not have.
Device
This is the glue that joins the package to the symbol. Note that it's possible for one symbol to have multiple packages, for example the 555 timer comes in both DIL and surface mounted varieties. If you have different pins and purposes then you should use two symbols rather than devices. It is also possible for several symbols in one library to link to one package.
In the device window you "Connect" your pins to your pads, note if you move your pads you may need to disconnect and reconnect the pins.
Testing
Finally try building a circuit using your library. This might show up errors you've made above. Use the ERC to ensure your pin directions are correct and use the design link to make sure your part is found easily.
Top Comments