Michael Silverman documenting innovation at work

23Jun/1011

How To Create a New Device in EAGLE

deviceFinal

As you can see in my previous post I want to build a Nixie Clock. The tubes I have are model Z573M. I plan on designing a circuit, testing it, and having the final product manufactured. I only plan on making two clocks, but I want to do it professionally. The problem is, to my knowledge the Z573M does not exist as a part in any circuit designing program. So even for my initial schematic I was running into issues. I decided to use EAGLE because I've heard it's powerful, fairly easy to use, and they have a version that is freeware.

When you are creating a new part in EAGLE you may want to create a new library. This will make it easier to share your part, should you choose to do so.

To create a new library in EAGLE go to File > New > Library.

The Symbol

For each part you will create there are three components: Symbol, Package and Device. Let's start by creating the Symbol. Click the Symbol button.

A window titled Edit will pop up. Type in the name of your part where it says New, I will be creating a part titled Z573M. Hit OK. A warning will come up saying Create New Symbol - hit Yes.

You are now at the screen where you will create the Symbol. You want to center the design around the + in the center. In the future, when you move your device, this will be the center position of it. Here are the essential tools and their functions used for creating a Symbol. For each tool that you use, you want to hit the STOP button on the top toolbar when you are finished. That will let the program know you are done with the tool.

Grid - If the normal grid spacing does not suffice for your design use this tool to modify it. Default spacing is 0.1 inches apart.

Wire - This tool can be used to create the outline of your Symbol.

Delete - To remove a part in EAGLE you must first select the Delete tool and then click on the item you want removed.

Move - To move a part you must first select the Move tool and then click on the area you wish to move.

Pins - This is to designate all of the input and output pins on your chip. Remember, this is only the symbol so you don't need to designate all the pins on the physical device. We will do this later in the Package section. If you know you will only be using five of the pins in your circuit, it is ok to only have five pins showing in your symbol.

I start my design by creating the outline with the Wire tool. By looking at my datasheet I determine which pins I want to be displayed in this symbol. In this case there are 11 outputs and 1 input.

I then move on to creating the pins. I click on the Pin tool. You will notice on the top that new toolbar appears showing you advanced options for the Pin tool.

For the first 11 pins I will change the Direction to Out.

For the last pin I will change the Direction to In. I will also change the orientation of the pin by using the third button on the left hand side.

At this point in time you will have a design similar to this.

Next let's use the Name tool and rename all of the pins. For example, I renamed pin P$1 to K0. This will help you in the future when we link the Symbol and Package.

The last thing left to do in the Symbol is to name it. Click the text tool and type in ">NAME" This is useful for when you have the same device multiple times in the circuit. This placement tag will show up as "U$1, U$2....U$n."

Now let's type in the device name. This we want to do on a different layer. Click on the Wire tool.

In the top toolbar click on  and change it to .

Now click on the Text tool and type in your device name and move it where you'd like. Before you go any further, save your library. To do so, click File > Save.

 

The Package

Now that we have a Symbol created we want to create the Package. The Package will define the physical component of your schematic. It's how it will look on a circuit board.

Click on the Package icon.

Once again you will be at the Edit screen. Name this the same as your Symbol. As with my Symbol, I will name this Z573M. Hit OK and then Yes when the warning comes up.

This process is very similar to designing your symbols. You want to take the info from your datasheet and redesign it. If you don't have a datasheet, manually taking measurements will work. When designing, you always want to keep in mind, this is how your device will look on a circuit board. When using these tools you definitely want to pay attention to the layer you are modifying.

SMD - This will create the pads for your surface mount components. You want to pay attention to the layer you are on. For the freeware version, you can only have two layers, Top and Bottom.

Pad - Use this tool to create all the through hole pads on your board. This is the one tool where you do not need to pay attention to the layer.

Wire - This time we will use this tool for actual wires. Remember to pay attention to make sure you're on the Top (Red) or Bottom (Blue) layer.

Circle - There is a good chance you will not use this tool. However I will in my example so it's worth noting. I used it to create an outline of the device.

This is how I created my Z573M.

1. Change the grid size to 0.001 and the units to mm.

2. I know the device has a diameter of 9.53mm. Click on the Circle tool and make sure you are working on layer "21 tPlace." In this situation it's easier to use the command window on top and type in the coordinates for the circle.Type in the origin (0 0) and the outer edge (0 4.765). Now there is an outline to work with. Creating an outline may also make assembly more efficient for certain devices like a transistor.

3. There are 13 pins. I measured the space between the large gap in the back of the tube. I then placed the 13 pins in a circle as evenly as possible. Remember that you will be soldering between these pads so make sure they are spaced out enough that they won't touch!

4. Now using the Name tool rename each Pad. I use the same name as the datasheet, which is the same name as the corresponding pin on the Symbol.

5. Click the wire tool, select layer "25 tNames" and name your device.

6. Click the wire tool, select layer "49 Reference" and type in ">NAME"  once again.

The Package is complete! Time to link the package with the Symbol.

The Device

Click on the Device icon.

Once again you will be at the Edit screen. Name this the same as your previous components. I will name this Z573M. Hit OK and then Yes when the warning comes up.

1. Select the Add  button on the left and select your Symbol name.

2. Click New in the bottom right hand corner. Then click on the device name that you have been using.

3. Click Connect. You will see three columns. If you remember we renamed all of our Pads and all of our Pins. That was for this part. If you named them previously this part is pretty self explanatory. Click on the Pad and the Pin equivalent and hit Connect. Do this for all the Pin and Pad combos you have.

4. You are all finished! Now just load up the library when you are working on your schematic and add the device like you would any other.

Extra things you can do: Add in a description for each component. Modify the Symbol to look cleaner or more compact.

You can download a copy of my demoLib Library file here: demoLib.lbr

UPDATE: Have you made a board and want to have a prototype created? Check out this great tutorial Ordering PCBs designed with eagle.

Comments (11) Trackbacks (1)
  1. Wonderful! A perfect tutorial, I have been looking for this a long time, many thanks!

  2. It is just perfect.Thanks

  3. nice,now i have to cleared my doubt thanks to u

  4. Thanks, a great tutorial(I was before unable to even create the New Library)
    My only problem with this tutorial was that you had 13 pads placed, but there were only 12 (K0-K9, DP and A)!??

  5. Thanks Fernando. There are 13 pins on the tube, there are only 12 that are being utilized. If you look at the datasheet it is labeled “ic” – That pin is not used for anything other that mechanical stability.

  6. Thanks for taking the time to make this tutorial. You did an excellent job. However I do have one question.
    I followed your tutorial and was able to create my ATtiny2313.lbr. After I added it to my schematic I noticed that it did not automatically assume the name IC1 on the top of the chip. It had a U$1 on top. I have >NAME on the top of the chip.
    I have >NAME in the same place on the package. When I click on the device icon the chip has G$1 in place of >NAME. Have an ideas?

  7. Hi Bob. Thanks for the kind words. Regarding the name, it sounds like you need to annotate the schematic. This assigns all the components names like IC1, IC2, LED1 etc. Try going to Tools > Renumber Parts

  8. Mike, Thanks for the quick reply. What I needed to do is assign a Prefix during the Device part of your tutorial. That way when I add the newly created device to the schematic it is automatically renamed.
    Thanks again!

  9. Hi Bob,

    Thanks for the tutorial, I have done as described and managed to create a device however when I load it in schematic I am unable to connect the wires to the pins.

    At the time when I import device into schematic it does show the green circles for each pin but I can’t connect wire to the pin. Any idea what I am doing wrong. I can mail you the library if that helps.

    Kind regards

    Zulfqar

  10. Hi Zulfqar,

    I am guessing that you used two different grid sizes for the creation of the component and the schematic. Either that, or you connected the pins backwards.

    To check on the grid size, go to View > Grid. Change that to finest and see if that fixes your problem. If so, I would go back into the creation of the component and fix the layout to a more standard grid size.

    To check on the pins, go to the symbol editor. Ensure that the green circles are on the proper side. The green circles are where you will be connecting the wires to, so you want them facing away from the component itself.

    If you want to upload the library and schematic I can take a look at it.

  11. Yo! Hi everyone, I m new into electronics in general…Now I m making my project on a circuit based on a attiny 2313 microcontroller, basically its a Change color/vibration Random ….thing xD . Bob, could you send me the library/part that u did for attiny 2313 for Eagle, It would be really apreciated. My mail is ppmenace@gmail.com.


Leave a comment