PCBEasy

How to Design a PCB using EAGLE

Part 3: Designing Custom Footprints

Johann Wyss

Issue 39, October 2020

We show you how to design custom footprints for components that are not in the EAGLE parts library.

In Issue 34, we showed you how to create a schematic using EAGLE CAD, and followed this with a tutorial in Issue 35 on how to design and export a circuit board file.

The tutorials have been very popular, and have led to numerous requests on how to create a custom package which you can add to your parts library.

In our first EAGLE tutorial we introduced you to the parts libraries and suggested that you download the SparkFun, DIYmodules and Adafruit libraries. These libraries have a huge number of packages for components that the average hobbyist / maker is likely to encounter. They are, however, not an exhaustive list.

There will likely be times where you need a package for a device that isn’t in your parts library or available to download online. This leaves you with the somewhat daunting task of manually creating the package in EAGLE yourself. We say daunting because, like with many things in engineering, precision is key when creating a PCB. Hence, why it is important for us to show you in detail how to make a component footprint accurately to avoid your PCB having to be remade, costing you (or your client) time and money waiting for a new board.

Getting started

The first step in creating a custom package in EAGLE is to download or print the datasheet for the device you’re going to make the package for. The datasheet has all of the important information needed to create the part, including the pin connections and the physical dimensions of the component. As such, you will constantly find yourself cross checking between your EAGLE work area and the datasheet. If you don’t have a dual monitor setup, we suggest you use another device to display the datasheet or print the datasheet out.

For this tutorial, we will create the package for a Texas instruments NE555 timer. The datasheet can be downloaded from the TI website here: https://www.ti.com/lit/ds/symlink/se555.pdf

These 555 timers are a very common part that will already be existing in many of your part libraries, however, the 8-pin dual inline package (DIP) is an incredibly popular package which you will likely find yourself using over and over again.

From the welcome screen of the EAGLE software click File > New > Library to create a new library for your custom parts.

This will bring up a screen very similar to the one shown here.

Note: Our library already contains a number of custom components.

You should save this new library straight away by clicking the save icon in the top left corner.

You should name it appropriately because your library may grow considerably over time and finding the components you need will be easier with the best description.

Our next step is to build the footprint, which can be done in a number of ways.

A nice simple design, like our 8-pin dual in line package, can very easily be created in EAGLE. However, components like this 15-pin TDA7294 amplifier IC from ST Microelectronics, with its ZIP / staggered pins, are a lot more complex.

100W audio amplifier TDA7294 from ST Microelectronics.

Such complex designs can often be better reproduced using an external CAD software package and importing that design into EAGLE. In the spirit of completeness, we will show both methods.

Creating the Footprint

To begin creating the footprint, click the Add footprint button at the bottom of your screen.

You will be prompted to name the footprint. Since you can re-use this footprint for many different types of devices, we thoroughly recommend you name it by its package type. The datasheet and/or your electronics retailer will usually clearly mark this, but the naming convention can get pretty complex. If you are unsure, you could search online or visit this Wikipedia page showing the package types and names: https://en.wikipedia.org/wiki/List_of_integrated_circuit_packaging_types

The datasheet for our 555 timer suggests that the device is a Ceramic Dual in Line DIP variety which is identical in dimensions to the standard plastic dual in line package PDIP. As such, we will simply call it 8_PIN_DIP.

Enter the name and click OK. You will then be asked if you want to create the new footprint. Click OK again.

In the footprint creation window, set the grid size for your work area by clicking the grid icon in the top left corner.

This allows you to set the grid dimensions which you can use when drawing features, placing pads, etc. We prefer to change the grid to 0.5mm and the alternate set to 1mm.

To easily create the footprint in EAGLE for a simple package like this, we like to use the pad array tool. This tool allows you to easily add all of the pads for your device quickly without messing around with trying to measure out and place them. To use it, to click the pad button in the left toolbar.

Use the pad selection toolbar items to change various facets of the pad. We want circle pads with a 0.65 drill and a little larger 1.4224 diameter. The drill is, as the name suggests, the size of the hole, while the diameter is the size of the pad. We like to use a pad diameter at least twice as big as the drill. This gives lots of surface area to solder to, and maintains mechanical strength.

Once you have made those changes, press the Pad Array button.

This will bring up the following menu. The details we need to fill this mostly come from the datasheet.

BASE NAME: Refers to the name of each pad and starts from the top left corner. This is usually pin 1. If we name it 1, every pin will then be incrementally named in an anti-clockwise pattern. Therefore, this is pin 11, the next is pin 12, etc. This will be handy for when we need to match pins on the footprint with nodes on the symbol.

SIDES: Refers to how the pins will be positioned. We want pins on the left and right side in this case.

PAD COUNT: The number of pads we require. The 555 is an 8-pin IC, thus we need 8 pads.

START INDEX: Refers to the starting pin. For us, this will be 1.

PAD SPACING: Refers to the distance between the pins in the x and y dimensions. Dx is the space between the pins on the left and right side of the package, and dy is the space between pins on the same side.

Take a close look at the mechanical drawing for our 555 from the TI datasheet on page 31.

From these drawings, we can identify that the pin spacing on the same side is a standard 2.54mm pitch while the distance between the pins on the left and right side is 7.87mm (max).

Select the Generate rectangle option., which will encapsulate the footprint in a boundary and show this on the PCB silkscreen. This makes it clear to you, the designer, that other components can't be placed in that area.

Select the Include > NAME and Include > VALUE options, which will allow you to label the IC on the silkscreen so you can identify which part is mounted there.

Click Ok and place the newly created footprint onto the work area so it is roughly centred on the origin point crosshair.

As you can no doubt see, this graphic is lacking the details we need to identify which pin is pin 1. Let’s rectify this by adding more detail using the drawing tool. This tool can be activated by clicking the Line button in the left toolbar.

This drawing tool allows you to draw straight lines which snap to the grid. Let's draw a rectangle inside the footprint as you see here.

Note: you may need to change the layer so that you’re drawing on layer 21 tPlace as shown here. This will ensure that the drawing you’re creating will be on the correct layer to be displayed on the PCB.

We can now create an arc on this inner rectangle to identify the notch in the top of the IC. Select the Arc tool from the bottom of the left side toolbar.

Starting from the right side, click and create an arc.

This added detail now makes it easy to identify the correct orientation when it comes time to insert the component onto your circuit board.

Often you will also see a dot on the PCB that would not be covered by the component. This dot can be handy when troubleshooting, so let’s add that dot also.

Select the circle tool which is in the bottom left toolbar.

Draw a circle beside the first pin of any size. When done, right-click it and set the following settings.

We only need the dot to be small as its sole purpose is to help you see pin one at a glance. For us, we set the Radius to 0.125 and the Width to 0.127, however, you can adjust these values to suit your needs. Your footprint will look something like this.

If you’re happy with the design, you can simply save it and move onto the next phase.

As we have just demonstrated, designing a footprint for a simple package like this is easy using the pad array tool. However, if you have a more complex design you may want to consider making it in a different CAD program and importing it into EAGLE. We will describe this method now using Fusion360.

Create footprint in Fusion360

For more complex designs, it can be easier to draw the footprint to scale in a dedicated drawing program. We prefer to use Fusion360, and have done many tutorials on using this powerful CAD tool. There are many drawing programs available, however, ensure that you are able to export the drawing as a .dxf file.

This example was made using Fusion360.

Once you have created the drawing to scale in your CAD program, export it as a .dxf file so it can be imported into EAGLE. Before you do so, remember to set your grid to your desired setting, which in our case is a 0.05mm. This size will allow us to finely position the pads into the correct area.

To import the .dxf into EAGLE, you need to be in the footprint work area as we previously described. In the top toolbar, click the Run ULP button.

This will open up the user language program scripts menu, which allows you to run some pretty powerful non-standard processes. For example, this is where you can make more complex PCB features such as impedance matched traces. It is worth looking at this function when you start to get comfortable designing PCBs and want to step it up a notch.

For our purposes, we just need a script to convert our drawing into a layer on the PCB.

In the ULP search bar, type in dxf and select DXFimport V2.0.

FILE NAME: The .dxf file which you exported from your CAD program.

TARGET LAYER: The layer which the drawing will be copied to. We want it marked on the top silkscreen so, for us, layer 21 Top placement is ideal (21 tPlace).

XORG & YORG: Set the position in relation to the origin point / crosshair. Leave as zero because we can manually move the drawing into position later.

WIDTH: The thickness of the line, which we set to 0.125.

SCALE: Set to 10, which for us, works well when using Fusion and a 0.05mm grid size.

Once you’re satisfied with the settings, click OK to generate the script. Click Run to run the script and create the drawing.

Once the script has run you will have the design created in EAGLE.

You can now use this design as a template to add your pads and other embellishments.

Use the previously mentioned pad button in the left toolbar to place pads, as shown here.

We like to add a square pad for pin 1, as this helps to identify the first pin when looking at the bottom of the PCB. It really does help when troubleshooting but this isn’t mandatory.

The next step is to add the name and value elements. Click the text button in the left toolbar.

Add the >Name and >Value text elements. These will automatically be populated when you use the tools in the board layout area.

You can also add the name of the IC here, such as “555”. However, keep in mind that this will limit its use if your future projects have an 8-pin IC that isn’t a 555. We prefer to add the name when designing the PCB to keep things simple.

In either case, you have now successfully created a footprint using both the built-in EAGLE tools and by importing a custom design from EAGLE.

Confirming the footprint is correct

Irrespective of which method you use to create the footprint, we thoroughly recommend that you print out the footprint to compare it to the actual part if you have it on hand. Printing a hardcopy allows you to verify that the dimensions, pin spacing and general size of the footprint is accurate. We like to place the printout on some soft foam and physically push the component leads through the paper to fully confirm that the component will fit the footprint. It's also a good way to check that your pad sizes are correct. You can adjust the pads by right-clicking them and selecting properties.

Once you’re satisfied that the footprint is as you desire, save the footprint and press the Table of contents button in the top toolbar.

This will return you to the main library screen where you can create the remaining elements which make up the entire package.

Creating the symbol

With the footprint created, we can now turn our attention to the schematic symbol. This is quite a bit more straightforward, however, unlike the footprint, this is a little more specific only to this device. As such, it won’t be used for other devices. This is because the 555-timer pinout is unique to the 555 and isn’t (to the best of our knowledge) shared with other devices.

To get started, from the main library screen press the Add Symbol button.

You will then be prompted to create a new symbol name. Since the symbol is unique to a 555 timer let’s call it “555_timer”.

Note: Don’t forget to set your grid. We like to use a 1mm grid for the symbol.

The schematic symbol for the 555 is pretty straightforward and you can make it how you see fit. If you take a look at the schematic symbols for other 555 timers in the EAGLE libraries, you will see quite a bit of variation as shown here.

The perfect layout, however, will be depending on how you’re using the device and how it's connected to other components. There isn’t a way to create the symbol where it will work best in every situation. There are, however, some ways to make it as practical as possible.

Most schematics, or more to the point, good schematics should flow from left to right with inputs on the left and outputs on the right. You would usually put a VCC rail to the top and a GND to the bottom. So, with our symbol let’s try and follow that same principal.

We want to use the Pin button found in the left toolbar to create the 8 pins required for the 555 timer.

We laid out ours so there were 3 pins on the left side, one pin on the right side and 2 pins on the top and bottom.

We now want to use the name tool to give each of these pins a name that correlates with their function. This will help when we connect the pads on the footprint to the schematic later.

We figure this would be the ideal configuration for our most commonly used astable circuit for the 555 timer.

We can now finish the symbol by closing it in with the Line tool and adding some embellishments using the text tool. Both tools are in the left toolbar.

You should now add a >Name and >Value to the symbol. These will be populated with the component name and value when you place them in the drawing. When done, your symbol should look something like this.

You can now save your symbol and return back to the table of contents.

Creating a 3D model

Creating a 3D model is not crucial in the device creation process, however, it can be a useful part of the process. Thankfully, it is reasonably straightforward to create a 3D model of simple components thanks to the new inbuilt package generator.

Note: Complex and detailed models should be designed in a 3D CAD program and imported into EAGLE like we described earlier. This is beyond the scope of this article.

From the main table of contents page, click on Import 3D Package.

Select Create with package editor, which will bring up the following window.

The large icons on the left are the stored package generators for the different types of packages. Scroll down until you find the package for the device you’re making. In our case, we are looking for the DIP package.

This will open a menu specific to the DIP style of component.

You then simply fill in the information by following the mechanical data in the datasheet. For our 555 application, it was as follows.

Note: the image in the top left of this screen shows what each value represents. It's just a simple case of finding this value on the technical drawing in the mechanical data section of the datasheet and inserting it here.

When you're done, simply hit the Update Preview button and finish. You now have a basic 3D model of your component.

Note: This image is using a previous version of the timer’s footprint. Your view may not show any footprint, which is fine, provided you have verified that the footprint is correct.

Create the device

The final step is to create the complete device. From the table of contents, click the Add Device button.

This following screen is where we need to add the previously created elements i.e. the footprint, symbol and 3D model, and create the relationships between them.

Your first task is to add the footprint. Click the New button which you can find in the bottom right of the screen.

Select Add local package. This will allow you to select the footprint you created earlier.

Once it is added, repeat the same process and add the 3D model you created.

Click the Add Part button in the left side toolbar. This will allow you to add the symbol.

Select the symbol you created earlier and add it to the device by clicking OK.

You should now have all three of the elements you created assigned to the device.

Your job now is to map the pins on the schematic symbol to the pads on the footprint. To do that, click the Connect button to bring up the Connect menu.

Move the menu so that you can see the menu as well as the numbers on the footprint’s pads. You then match the pad number with the corresponding function using the pin diagram from the datasheet.

Take your time and make sure this is done perfectly as you can render your board useless by making a mistake here.

For our 555 example, the pins are as follows:

Once you’re done, click OK.

The very last step is to create a description. Click Description written and underlined in blue.

Simply add a small description, adding as much data as you feel valid. We recommend including the manufacturer and a link to the product’s datasheet. There can be, on rare occasions, deviations between manufactures on some components.

That’s it, you’re now done. Of course, we recommend that you do some through testing before you use the part in a design where you get the PCB manufactured, just in case there was an error made.

Testing

Let’s create a simple PCB to verify our 555 component design works as intended. For this, we will create a simple schematic. The resistors we used are numbered with respect to their pin, so R1 goes to pin 1, R2 goes to pin 2, and so on.

Note: We noticed that the pins on the symbol are not aligned to the grid on the schematic editor. This is likely a conflict with the grid when placing the pins. It's possible to edit this by editing the symbol. That is, however, a tutorial for another day. After going back and modifying the grid to a compatible size, we were able to rectify the alignment fault with the symbol. This is a common problem but it’s also pretty simple to fix by being careful when creating the part and constantly setting your grid to the same size, or a multiple of, the same size.

Once satisfied with the schematic, we can create a basic board. The idea here is to ensure that the resistors align with the board layout in the exact same way you expect them to. i.e pin one of the 555 is aligned with resistor R1, etc.

With this done the final step is to print out the design onto paper and verify the footprint matches 100%. If you’re happy, you can confidently start using your device in your projects. Well done!!!

PART 1

PART 2