Sie sind auf Seite 1von 28

CADSOFT EAGLE TUTORIAL

IEEE OPS 2013 - 2014

By
Shubham Gandhi, Kamal Kajouke

1
Table of Contents

1. Introduction
1.1 Getting Started
1.2 Eagle Schematic Editor
1.3 The Toolbar and Command Bar
1.4 Importing Libraries

2. Schematic Capture
2.1 Adding Parts
2.2 Connecting the Parts
2.3 Nets
2.4 Naming and Values
2.5 Electrical Rule Check (ERC Tool)

3. PCB Layout
3.1 Creating a Layout From Schematic
3.2 The Ground and Power Planes
3.3 Airwires and Routing
3.4 Applying the Finishing Touches
3.5 Design Rule Check (DRC Tool)

4. Project Submission
4.1 Cam Processor
4.2 Submitting the Files

2
1. Introduction
CadSoft EAGLE is a moderately powerful tool used for capturing schematics and laying
out PCBs. Although it is capable of producing professional designs, EAGLE has a large
hobbyist following because of its freeware version.

This guide is meant to help you familiarize yourselves with creating schematics and PCBs
in EAGLE. It will cover basic tools and navigation in the schematic editor, creating traces in
PCB layout, and generating the gerber files used in fabrication.

1.1 Getting Started


When you start Eagle, you will see a screen split into two columns with a directory structure
on the left and information about Eagle on the right. We first need to create a new project
and this can be done by going to File -> New -> Project as shown in Figure 1.

Figure 1. Eagle start up

Name the project something along the lines of “IR_Sensor”. There should be a green dot
next to the name indicating that it is active. To create a new schematic within the project,
go to File -> New -> Schematic.

3
1.2 Eagle Schematic Editor
A schematic editor window similar to the one below should have appeared.

Figure 2. Eagle Schematic Editor

On the left is the toolbar, and the large white space is where you design the schematic.
Right above the design space is the command bar where you can type in commands to
access different tools (as opposed to clicking on them in the toolbar). Above the command
bar are various action buttons (open, save, zoom, etc.).

4
1.3 The Toolbar and Command Bar

Figure 4. Command bar

The command bar can be used to type in


commands that are used to access tools.
For example, if you type “move” and press
<Enter>, the Move tool will be selected.
Even “mo” will select the Move tool. You
may find it more convenient

Figure 3. Toolbar

The toolbar contains many useful tools,


some of which this tutorial will cover.

5
1.4 Importing Libraries
The parts libraries that are bundled with Eagle are often not added by default. Simply go
Library -> Use.

Figure 3. Adding libraries

That should open up the “lbr” folder in your installation folder. Select all the libraries (Ctrl+A)
and hit open. It may take a few seconds to add all of them.

Figure 4. Selecting all libraries

6
2. Schematic Capture
Here we will create a schematic for an IR sensor using a pair of IR emitters and detectors.

2.1 Adding Parts


The first thing you want to do is to start adding parts into your design window. Click the add
parts button ( ) to get to the parts that you just imported.. (Or type in “add” or “ad” into
the command bar).

Figure 5. Library list of parts

A list of libraries will open up that literally contains tens of thousands of parts. We’re going
to be using 5. Many of these libraries contain subfolders with parts as well. The search bar
will help us narrow down and find what we’re looking for.

7
Lets go ahead and add in an LED into our schematic (it will be our IR emitter since they are
IR LEDs technically). Search for “*led*”. We include ‘*’ in our query to search for anything
that has the string “led” as part of the name, not just the string by itself.

Figure 6. Searching for “led”

8
Scroll down to the “led” library, and within this library there is subfolder called “led”. In this
folder, we are going to select the “LED5MM” part.

Figure 7. Select part “LED5MM”

Note, in the upper right of Figure 7, we are shown what the part will appear as on the
schematic and on the board layout. Double click the part, or click “OK” with it selected. Do
not click “Drop” as that will remove the library from the list.

Figure 8. Adding a part to the design space

9
Add it somewhere in the middle for now. You can press escape to go back to the parts list.
Next, we’ll add the IR detector (IR phototransistor). Search for “photo transistor”, this time
without “*”. Select the part “BPX81”, since it most closely represents what we want.

Figure 9. Selecting the IR detector (phototransistor)

Add it next to the LED.

Figure 10. Adding the phototransistor

You can use the Move Tool ( ) to move misplaced parts, and the Delete Tool ( ) to
delete any incorrect parts.

10
Next, we will add two resistors. Search “resistor”, and under the “rcl” library, open the
subfolder R-US_ and select the part “R-US_0204/7”. Place two of them in the schematic as
shown in Figure 11. Note that you can right click to rotate parts when placing.

Figure 11. Place the resistors

Then, we will add a capacitor. Search for “capacitor”, and under the “rcl” library, open the
subfolder C-US and select the part “C025-030X050”.

Figure 12. Place the capacitor

Finally, we will add a 3-pin header. Search for “pin header”, and under the “pinhead” library,
open the “PINHD-1X3” subfolder and select the part “PINHD-1X3”.

Figure 13. Place the header

11
There are two additional things we need to add. These aren’t quite parts, but “nets” for 5
volts and ground. Nets are covered in Section 2.3. Search for “supply” and under the
“supply1” subfolder, and add “+5V” and “GND” as shown in Figure 14. .

Figure 14. Adding 5V and GND

This is a good point to save. Hit Ctrl+S and make sure to save it in the project folder.

Figure 15. Saving the schematic.

12
2.2 Connecting the Parts
After laying out parts, we want to connect them.. Use the Net Tool ( ), not the Wire Tool
( ), to make connections between components. To keep the schematic neat, use only
right angled nets ( ). Note, you will notice there two floating nets. They are intentional, we
will address them in the next section.

Figure 16. Connecting components

2.3 Nets
Nets are essentially a node in a schematic. The highlighted portion below, and all the
components connected to it form the “+5V net”, for example.

Figure 17. The “+5V net”

13
We can make a connection between floating nets by naming them, or connecting them to
the same net. Use the Name Tool ( ), to name both floating nets “out”.

Figure 18. Naming a net

Do the same with the other floating net. You will get a warning similar to “Connect N$7 and
OUT?” Click yes, as this is what we want. Then, use the Label Tool ( ), to label the the
connections so we know both of the seemingly floating nets are the same net..

Figure 19. Labeling the net

14
2.4 Naming and Values
The schematic is almost complete. All that is left to do is give a name and value to the
components using the Name Tool ( ) and Value Tool ( ).

Figure 20. Naming components, and giving them values

The value for R1 was omitted since it will vary depending on design constraints. The
phototransistor already had a value of “BPX81” which was removed, to make it more
generic.

15
2.5 Electrical Rule Check (ERC Tool)
The schematic is complete, but as a final measure, it needs to be check for errors. Eagle
provides an ERC tool ( ) that will check any electrical errors such as floating nets or pins,
and consistency errors between schematic and layout (when we get to it).

Figure 21. Using the ERC Tool

This final schematic section should be taken with a grain of salt because the results vary
with application, and even errors can be ignored at times.

16
3. PCB Layout
Now that our schematic is complete and error free, the next step is to design the circuit
board.

3.1 Creating a Layout From Schematic


Click the Generate/Switch to Board Tool ( ) in the top left corner to generate a new
layout.

Figure 22. Generate/switch to board

You will be asked to create a new one from schematic. Click yes, as this is what want. A
new window similar to that in Figure 23 should open up.

Figure 23. Board layout window

17
There are a few things to point out here. Many of the tools in the toolbox are different, all the
parts that we added in the schematic are in a jumbled pile on the bottom left, and the board
outline is huge. You can zoom in and out of the board by scrolling. If you have a wheel-click
mouse, clicking and holding the wheel will allow you to pan.

We will be shrinking the board size to 1 square inch and turning on the grid to allow us to
systematically place the components. Click the Grid icon ( ) in the top left, turn the
Display to On, and hit OK. This will display a grid that the board outline and components
will snap to.

Figure 24. Grid turned on

Note, below the Grid Icon, the coordinates of the cursor location are displayed as the
mouse is moved.

Figure 25. Coordinates of cursor displayed

18
Another note, if you zoom into the corner of the board outline, you will notice that it is not
snapped to the grid. Using the Move Tool ( ), Ctrl+Click the corner to snap it to the grid.

Figure 26. Board corner not snapped to grid

Next, we want to resize the board outline so that it encapsulates 1 square inch. 1” by 1” will
do. Use the Move Tool ( ) again to click the corners to resize the board to 1” by 1”

Figure 27. Board resized to 1” by 1”

Note that crosshair at the bottom left corner of the board represents coordinates (0,0). Now
we are ready to place the components inside the outline. For our layout to function as a
distance sensor, we will want to place the IR LED and phototransistor next to each other.
The pin header connectors will need to be at the bottom of the board as they will be
plugged into a breadboard. The resistors and capacitors can be placed anywhere on the
board. You can right click to rotate components.

19
Figure 28. Placing the components

3.2 The Ground and Power Planes


Printed circuit boards can contain many layers of copper: 4, or 8, or even 128. We are
designing a simple board with 2 layers. The top layer will be designated as the power
(+5V) plane, and the bottom layer will be the ground (GND). These layers will allow any
component connected to power or ground to connect directly to the the planes. Grab the
Polygon Tool ( ) and select the top layer as shown in FIgure 29.

Figure 29. Select the Top layer

20
Use the tool to outline the board. When completed, it will appear as a red dotted line.

Figure 30. Draw the power plane

Next, using the Name Tool ( ), name the polygon you just created to “+5V”. This tells
Eagle to connect this plane to the +5V net.

Figure 31. Name the polygon to +5V to create a power plane

21
Repeat this process for bottom layer, but name it “GND”.

Figure 32. Create the GND plane

Now when you click the Ratsnest tool ( ), Eagle will flood the planes with their
designated nets, and some of the component pads will be connected to the planes.

Figure 33. Flooded planes

22
3.3 Airwires and Routing
As you may have guessed already, the yellow airwires wires indicate unrouted
connections. Use the Route Tool ( ) to finish up the rest of the traces by making
electrical connections indicated by the airwires. You can route on both the top and/or
bottom layers, and if any overlaps on the same layer occur, use a Via ( ) to “weave”
between layers. A via will allow you to switch between layers in a trace. For neatness, use

only 135 degree angles ( ) in your traces.


Do not use the autorouter ( ).

Figure 34. Routing


Use the Ratsnest tool ( ) after each routed trace to see its effect. If a trace needs to be
removed, the delete tool will not work. Instead, use the Ripup Tool ( ). You have a
functional distance sensor once you have routed the rest of the traces.

23
3.4 Applying the Finishing Touches
The board is nearly ready for production. It just needs to be polished a little more. Use the
Smash Tool ( ) to click on each of the components. A new crosshair will appear for
each name and value associated with the components. This will allow us to move the text
around so that it looks cleaner. Remember, things can be rotated by right clicking when
they are selected. They can also be snapped to the grid by Ctrl+clicking them.

Figure 35. Smashing components and rearranging the text

The part that we will be using for the IR phototransistor is actually much bigger than what is
indicated on the board. We can simply draw a 5mm diameter circle around the part to
indicate its actual size. Use the Circle Tool ( ) with the tPlace layer selected, and draw a
circle that is 0.2 inches (~5mm) in diameter.

Figure 36. Drawing a circle around the phototransistor

24
Finally, we need to sign the design (like an artist signs his or her work), and maybe
something that describes what the board is. Use the Text Tool ( ) to add text to the
board of varying sizes, and you are finished with the board.

Figure 37. Adding Text to the board

25
3.5 Design Rule Check (DRC Tool)
The final step in the design process is checking for errors. When you are done routing, run
the DRC Tool ( ) with the default settings. It will check for things such as overlapping
traces in the same layer, traces that are too close to the edge or other traces, and double
check size constraints on all vias and pads among other things.

Figure 38. DRC Tool, run with default settings

If any errors are returned, you must go back and fix them and run the check again.

Figure 39. DRC giving errors

26
4. Project Submission
This final section will guide you through the submission process, and how we will get them
manufactured. We will generate Gerber files, a set of files associated with the layers on the
board.

4.1 CAM Processor


First we need to download the .cam file that will generate the correct gerber files for us
from the following link: http://support.oshpark.com/helpdesk/attachments/7434207. Browse
to your Eagle installation folder and place this file in the “cam” folder with the other cam
files.

Click on the Cam Processor ( ) in the upper left in the layout window, and go File ->
Open -> Job and select “LaenPCBOrder.cam”.

27
Once it loads, click “Process Job”. This will generate a separate file within your project
folder for each layer in the board. Open up to the folder (usually Documents/eagle/…), and
zip up the following files:

● boardname.TopLayer.ger
● boardname.BottomLayer.ger
● boardname.TopSoldermask.ger
● boardname.BottomSoldermask.ger
● boardname.TopSilkscreen.ger
● boardname.BottomSilkscreen.ger
● boardname.BoardOutline.ger
● boardname.XLN Drills
● boardname.sch Schematic
● boardname.brd Board

4.2 Submitting the Files


Email us your Gerber files and we will review them and get back to you if anything needs to
be fixed. Name the zip file firstname_lastname_irsensor.zip. This is due by 4/17, and this
deadline is absolutely enforced because there will be a batch order for manufacturing. Late
submissions will not receive PCBs!

28

Das könnte Ihnen auch gefallen