Creating Circuits With EAGLE
OK, so you've got your Othermill and you want to make circuit boards! However, an obstacle remains between your ideas and cutting out those traces on the mill: learning EAGLE.
EAGLE is powerful software for making circuit boards, and its creators have made it free for boards under 4"x3" , which works great for most Othermill projects. Otherplan can import many kinds of files, but EAGLE is the most common for circuit boards. The support for EAGLE is so complete that all you have to do is drop an EAGLE .brd file into Otherplan and click Cut.
However, EAGLE itself has a somewhat steep learning curve because it has the power to make incredibly complicated, multilayer designs for circuit board manufacturers, and with that power comes some unfamiliar ways of doing things. Luckily, you can get started making boards by learning only a few of EAGLE's capabilities. We'll show you which ones and how to use them.
In this tutorial, we'll go over the complete process of building a very simple LED circuit. This circuit may seem like a lot of work considering that it only has three components and just turns on an LED, but once you understand the process, you can scale it up to make much more complex designs. Hang in there and it will be well worth it!
- Start by downloading and installing EAGLE.
- Then download the Adafruit component library (adafruit.lbr) and unzip it.
- Go to your Documents folder and open the EAGLE folder (created when you installed EAGLE).
- Create a new folder called "libraries" and put adafruit.lbr into it.
Tools and Materials
TOOLS
Flat end mill, 1/32"
Computer running Otherplan
MATERIALS
LED, 2.0 forward voltage, 20mA forward current
Resistor, 47-ohm
Battery, 3-volt, CR2032
Battery holder, CR2032
Blank circuit board, FR-1
Note: These are the materials we used, but you can use whatever LED, resistor, and battery you may have as long as they match up. See this tutorial if you'd like more information on matching your battery, LED, and resistor.
Navigating the Interface
Before we get started, there are a few things that will help you move smoothly through your first EAGLE experience.
EAGLE has a peculiar aspect to its interface not found in most other software: no dragging. To move something, you click it once to pick it up, then click again somewhere else to put it down. The same holds true for drawing lines, placing components, etc.
You may also encounter a bug where you'll click something and expect it to move with the mouse, but it won't. To fix this, simply switch to another application on your computer, then switch back to EAGLE. I like to hit Cmd+Tab twice.
EAGLE also uses layers, which function in some ways like layers in Photoshop and Illustrator, except each layer has a specific purpose. Otherplan can read all the layers, which allows for awesome things like two-sided machining and solder stencils. To keep this tutorial simple, we're just going to use two of the layers: the "1 Top" layer and the "20 Dimension" layer. The Top layer is what Otherplan uses for cutting circuit traces, and the Dimension layer is what it uses to cut the outline of your board.
Make a Schematic
First, we're going to make a schematic. This allows you to see your circuit by itself and helps you make sure everything is connected properly.
- Open EAGLE.
- In the Window menu, select Control Panel, if it's not already selected.
- Make a new schematic by clicking File > New > Schematic.
- Expand the window so it fills the screen.
- In the Library menu, select Use.
- Locate the Adafruit library you put in Documents/Eagle/Libraries (adafruit.lbr) and click Open to load it in EAGLE. You won't see anything happen, but trust that it is, in fact, loaded.
- Click the Add tool in the left toolbar (see the screenshot if you need help finding it), and find the Adafruit library in the list that pops up. Expand it to see all the components, and make sure the Name column is wide enough that you can see the component names.
- Locate the CR2032 section and expand it to find CR2032THM (the description is CR2032-THRU).
- Click OK. The window will close.
Now, if you click anywhere on the page, you'll place the part there. Click somewhere in the middle to place it. If you click again, you'll place another one, but don't do that because we haven't covered how to delete things yet!
- Hit Escape to return to the components window. Still in the adafruit library, find the LED section and locate LED5MM. Click OK and place one on the page and hit Escape to select another component.
- Now scroll down and find the resistor library. In the resistor library, expand R-US_ and select the R-US_0309/12 resistor component.
- Place the resistor, then hit Escape twice, which will exit from Add mode. You should have three components on the page: a battery, a resistor, and an LED.
Why did we choose that particular resistor? Since we're using through-hole components and a simple circuit, hole spacing isn't that important. This component is roughly the size we need. However, if you're using surface-mount components, choosing the right ones is much more important, and you'll have to match the component type with exactly what you're using (for example, 0805 resistors).
Use the Draw, Move, and Delete Tools
Let's draw some lines between the components:
- Select the Wire tool. There are several wire bend style buttons to choose from in the toolbar across the top of the screen. The first one is a good place to start. Take a look at the screenshot to see where everything is.
- Again, there's no dragging. You click to start drawing, click again to start a new segment, and hit the Escape key on your keyboard to stop drawing.
Draw a line between one of the positive terminals on the battery and the positive end of the LED. (The positive terminals are on the right side of the battery component.)
Try moving the components:
- Click the Move tool, and click on a component. It will turn bright red, and you can move it around.
- Click again to place it somewhere. If you've drawn wires between them, they should stay connected.
Now let's try deleting:
Click the Delete tool, and click the middle of a line segment to delete it.
- Try clicking a corner where two lines meet. It won't delete it; instead it will select one of the lines connected to that corner and ask you if that's the one you were trying to delete.
- Along the bottom of the window, you'll see "left=yes, right=next, ESC=cancel". This means that if you click the left mouse button (one finger tap on your Mac trackpad), it will delete the selected segment.
- If you click the right mouse button (two-finger tap or "secondary click" on your trackpad), it will select the other line segment under your mouse. If that's the one, then click left mouse or single tap to indicate "yes."
- If you didn't mean to do this in the first place, hit the Escape key.
This principle of "click until the correct thing is selected" also applies to the Move tool and other manipulation tools.
If you haven't already, complete the circuit by drawing lines between all the components. If you're not sure how to complete the circuit, check out this tutorial.
Our schematic is attached for reference.
Downloads
Use the Group (Select) Tool
You've learned how to manipulate single objects. To move, delete, or otherwise change a bunch of objects at once, you need to use the Group tool, which allows you to select many objects. This is also the one tool where you actually have to drag, rather than clicking twice.
- Click the Group tool, and drag to select your whole circuit. Everything will turn bright red/green, indicating it's all been selected.
- To move everything, click the Move tool, then right-click any of the selected objects. In the menu that pops up, choose Move: Group. This will pick up the group and start moving it. To place it somewhere, click there.
This principle applies to many of the other tools, such as Delete, Info, Rotate, etc.
Turn Your Schematic Into a Circuit Board
Now that you've built a simple circuit schematic, it's time to take the next step and turn it into a circuit board.
- First save your file somewhere. The EAGLE folder in your Documents is a good place.
- Next, select File > Switch to board. Click Yes to create the board file.
- You'll see a jumble of components in the lower left corner next to a big rectangle, which represents your board. In this case, it's way too big, so later we'll draw a new one.
- The jumble of components are the physical representations of the circuit symbols from your schematic, and your task is to put them on the board in the way that you need them to be for your project. In some cases, such as making an Arduino shield, there are very rigid requirements, but in this case, you can do anything you want.
- Select all the components and move them onto the board area.
- Move each component to where you'd like it to be. You'll notice that they're connected by thin lines. These are called airwires, and they represent electrical connections between components that have not yet been turned into traces, which are the physical copper connections that get milled into the board by the Othermill.
Now you have two options. You can either manually draw traces between your components, or you can let EAGLE do it for you automatically. Because you took the time to draw a schematic first, EAGLE knows what is connected to what. Let's try doing it automatically.
-
Select everything with the Group tool.
- If you can't see the last few buttons on the bottom of the left toolbar, click the down arrow to access them.
- Click the Autorouter tool, and set Top to "*" and Bottom to "N/A." Since this is a simple board, we can do all our traces on one side (the top). Click OK to route your traces.
Fix the Traces
Now there are dark red traces between everything! If you arranged things like we did, there's a little problem: the trace that runs from the positive battery terminal to the LED goes through where the battery goes. The symbol doesn't fully show it, but the negative side of the battery could touch that trace and cause a short circuit, which we don't want.
We'll need to re-route that trace. Start by rotating the battery 90° counterclockwise:
- Select the Rotate tool, enter "90" in the Angle box if it's not already there, and click the battery. It should rotate 90° to the left.
- Click the LED a few times to rotate it until the traces aren't crossed.
Now the traces are all messed up. Let's rip them up and try again.
- Click the Ripup tool, then click the Group tool and select everything. Right-click the selection and choose Ripup: Group. This will remove all the traces and leave only airwires.
- Select everything and use the Autorouter again. It should look better now with no wires crossed and the trace from the positive terminal going straight to the LED without crossing into where the negative side of the battery would be.
- Just for fun, let's try routing the traces manually. Hit Cmd+Z to undo the Autorouter.
- Click the Route tool, and click on an airwire.
- A trace will start, and you can connect it where it should go. Refer to the image for info about bend styles (i.e. how to make your trace go straight or bend the other direction).
- Do the same for the other airwires.
Fun, right?
Work the Dimension Layer
We mentioned layers earlier, but now it's time to get into them a bit more. You've made a circuit, and now you have to tell Otherplan how big you want your circuit board to be. See the big rectangle you've been arranging components inside of? That's what you need to make, except smaller. And cooler.
Since we have an Othermill, let's make an interesting shape for our board.
- Delete the existing outline (the big rectangle around your components) using the Delete tool.
- Select the Wire tool and change the layer from "1 Top" to "20 Dimension". The Dimension layer is what Otherplan uses to cut the outline of your board.
- Draw a fun shape around your circuit.
- Save and you're done. Yay!
The next step covers information about additional tools you may want to use. If you'd like to do something like add a way to connect an external power source to your board, or make holes so you can mount or hang your board, read on. Otherwise you can skip to the final step, which is milling your board.
We've attached the board file we made so you can refer to it. It includes additions made in the next step.
Downloads
Vias, Pads, and Holes
If you look at the components on your board, you'll see that they have green circles at the ends, which are connected to other components by traces. The green circles are pads, and they have holes in the middle. The pins from the resistor, LED, and battery clip go through the holes, and you solder them to the pads.
You can create this same pad and hole combo by using the Via tool. A via is technically an electrical connection between layers of a board, but for the purposes of this tutorial, it's just a pad and a hole.
Note: If you do 2-sided boards, you'll want to use vias to connect between the 2 sides. You'll need to run a wire through the hole and solder both ends to achieve the effect of plating, which is done by board manufacturers.
What would you use a via for in this tutorial? For example, if you wanted to add contacts so you could use an external battery pack, you would just add 2 vias and draw traces to the battery terminals. Make sure to set the layer to "1 Top" before you draw.
What if you also wanted to be able to mount this to something using screws, or hang it from a chain as a necklace? You could make holes using the Hole tool. Set the desired diameter and click to add holes.
Mill Your Board
Here are the basic steps for milling your board on the Othermill. For more detailed instructions, check out our Hello World tutorial.
- Open Otherplan if it's not already open.
- Click Import Files and select your .brd file.
- Set the trace clearance to zero under Advanced Settings. Trace clearance is how much copper gets milled away around your traces. Setting it to zero allows for the fastest cut and is fine for most projects.
- Make sure your material, tool, and other settings are set for single-sided FR-1 circuit boards.
- Once you finish cutting, solder everything together, put in a battery, and enjoy your lit LED!
If you have any questions, email us at support@othermachine.co and we'll be happy to help!