|Jan 02, 2014||Severity: Recommended||Eugeny Brychkov (RU)|
I have started using EAGLE several years ago without any training - created relatively large designs for GR8BIT platform, and relatively complex design basing on Altera FPGA chip involving a number of technologies (SDRAM, video, audio, LAN, micro-SD storage device). EAGLE is an excellent tool, but now I understand that if I would have at least basic training on it, I would not make some problems and wasted time could have been turned into the time when I can do something useful. Unfortunately built-in, and even online help seem to be created by UNIX guys loving using command prompt, and hardly readable in the environment of rich EAGLE GUI.
That's why I decided to create a kind of walkthrough for newbies - tell and show them what could be the effective way to use the EDA tool, and which hidden problems they may escape by using it properly.
EAGLE is a full solution for you to start with the idea and end with the files which you send to your manufacturer. But it is just a tool. You will need to know how to use it; you will need to have clear understanding of your future design - EAGLE can not check if your schematic will work as you expect it to. You will need datasheets of the components to design building blocks - devices - you will use within your schematic (if not already available).
There're several things you should know before you start EAGLE and even designing:
With EAGLE, in any part of its which allows editing, you can press CRTL-Z combination to revert changes back. There's relatively large backlog kept by EAGLE, so you can revert a lot of changes back. The circumstance when reverting changes will not work is using scripts. For example, using import-bmp script will put image onto the selected layer, but will not keep backlog, CTRL-Z will not work. The easiest workaround is to save design before running script, and then reload it if script outcomes are not acceptable.
Design: a set of interrelated intellectual property based on some idea, representing some functionality in material (board) or immaterial (schematic) forms. Design usually starts with idea, and ends with material product - manufactured board which works as expected;
Symbol: the drawing on the schematic representing functional element;
Package: a footprint on the board to install real device to. Each package has identifier, either standard and approved by standardization organizations (DIP14, TO220), or your custom;
Device: an entity with specific functionality (symbol) assigned to one or more packages. It means that one symbol on the schematic may have several packages (also called technologies);
Bus: virtual merger of several, usually interrelated, signals into one thick wire. Example could be data bus (with virtual merger of D0-D7 wires into one "cable"). Busses are logical rather than physical entities;
Name: unique name of the device, signal or bus. It may consist only of capital letters and numbers, can start with number. To include negativity sign into the name use exclamation mark (e.g. !RESET) will display as RESET word with dash above it. In case of listing of multiple names, for example in bus definitions, use comma (,) to separate signals. IMPORTANT: if you drew two separate wires, and gave them same names, they become physically connected even if they are explicitly not on your schematic.
EAGLE consists of several parts, which can be licensed separately. They are:
The following functional parts of the EAGLE you will use:
Before you install EAGLE, or even think of using it, you should decide which designs you start with. EAGLE licenses basing on the size of board available for edit, and on the type of design you are building. The following options are available:
For paid versions you will need installation keyword, and .key file, you get both during electronic delivery of the software. Take a note of both, because they both will be required if you will have to restore your installation in the future.
When you start EAGLE's control panel there're several sections to the left: Libraries, Design Rules, User Language Programs (I call them "scripts"), Scripts, CAM Jobs, and Projects. Expanding any section will show specific contents, available in destination directory. These destination directories can be changed in the main menu by going to Options→Directories.
What is useful here:
Go to your work directory, right click onto it, and select "new project". Give it a name, it will become the name of directory where your files should be stored.
Now right click on newly created project (red folder icon), and select New→Schematic. It is very important you do not create board at this time, because schematic and board should always be in sync. You will auto-create board later when you finish schematic in a part, or in whole.
It will open schematic editor. Default name will be untitled.sch, so you will need to give it a meaningful name and save (it will save to project's directory).
Now you do one very important thing: you turn on the Grid. Go to View→Grid, and select On in Display section. You may choose inches, mils (a thousandth of inch) and millimeters. You can change this setting at any time in the future, but I recommend to decide at the beginning which measurement units you use. I use inches (however I sometimes use millimeters in the library editor because many, or almost all, datasheets display packages in millimeters).
Excellent, now you have a blank schematic with grid, and you can put components in informed way into this sheet. Look at the dotted cross on the grid: it is point (0; 0). This point serves as reference for you, and will not affect generation of the manufacturing files. It is wise, if you have a kind of symmetric device (e.g. central edge connector) to put this cross into the center of your design, so that you easily detect symmetric points by ±x and ±y coordinates.
During your drawing the schematic, you will use both left and right mouse buttons, CTRL and ALT keys of your keyboard. CTRL key operates on the selected group (otherwise - only on the element you point to), pressing ALT allows you to move components according to the scale set in Alt setting in the Grid menu. As this Alt setting is usually finer, you can place origin of the component between the grid lines.
Use mouse's wheel to zoom or un-zoom region of the schematic or board at the place you point cursor at.
Now we go through the left panel, in the "order of appearance" during your design.
Click on this icon to add your first (or another) component. It will open a window wish available devices. You may browse the available sections to the left in the attempt to find what you need, or use search capability. If you put 74LS01 there, search will yield no results, because there's no such exact component. If you put *74*01* in there, it will return all components, which start with something (or nothing), then have 74, then again something or nothing, then 01, and then again something or nothing. You will find what you need there, for sure. If you did not find it, then there're several causes and ways to proceed:
Once you have found the component you need, ensure that it is the one looking to the right pane of the ADD window. It will also show available gates for the component. In my example I selected 74HCT01N, which has 4 equal gates named A, B, C and D, and P gate. Ensure that you will use and connect all required gates of the device/component, especially P gate (if there's one), as it is power, and without connecting it to power design will not work at all. Look further right the pane, you will see technology - the package of the component. Is it the right one? No - select another. Or create yours.
Now you have first component in your schematic. You see that HCT01 has four gates, and the first gate of the device you put received number 1 with postfix A (IC - prefix, 1 - number of device, A - number of component within device = IC1A). Here's what you can do with this gate IC1A:
Select this toolbar option to move the gate or whole device if it has single gate using left mouse button. If you will select gate, and then click right mouse button, component will rotate counter-clockwise by 90 degrees. Click again - 180 degrees. Again - 270 degrees. It is possible to rotate only in 90 degrees increment.
Copy the gate. You should know that if you will use this function on device which has multiple gates, copying will create another device (package, e.g. chip), instead of using another gate from the same chip. To use another gate from the same chip, use the following function.
Invoke the gate. If device, like in out tutorial, has several gates, use this function to invoke spare gate from the same package (chip). You see that there're 3 gates left in existing selected package - B, C, D, and P. Select B to put a gate onto your schematic. Select P to put power pins onto your schematic and connect these pins to the respective power rails of your design.
Mirror the gate. It is not the same as rotate. You can combine these two functions to get desired
orientation of the gate's symbol and its labels. On the figure below you see rotated component, with value at the top,
name at the bottom, and pin 3 at top and pin 2 at the bottom. To the right you see mirrored component, with name and pin 2 top,
and value and pin 3 at the bottom. Formally orientation of the component and layout of its pins do not matter, given they
improve readability of your circuit diagram.
Rotation of the gate counter-clockwise. The same as when you select to move, and then use right mouse button to rotate.
Select the area or group of gates/components. Before you select the area, choose operation you will be performing (move, rotate, mirror etc), and then click this area select button. You can select rectangle if you press left mouse button, then make a rectangle, and then release the button, or select complex shape if you press and release left mouse button after drawing each straight segment of the selection border (end of selection process in this case - press of right mouse button). After region is selected and highlighted, press CTRL key to perform desired operation on the whole group - including gates, components, nets, labels etc.
Delete the element - gate, component, net (connection), or text. If device has only one gate, then after deletion of symbol in schematic whole package will automatically disappear from the board (if you have already auto-created the board), and the only easy way to return it to the place (if package was already placed onto the board and even wired) is to press CTRL-Z, and do differently than delete (for example, using replace function). If you delete the gate in multi-gate device, device's package will disappear from the board only after last gate deletion. Example: 74HCT01N you deleted all A, B, C and D gates, but chip is still on the board. Yes, you forgot to delete its P (power) gate. To see which gates are still on the schematic use invoke function.
Replace a device. It is almost the same as adding new device in terms of selecting desired device, but instead of adding new device EAGLE analyzes already existing devices and tries to replace it with newly selected device. For example, you selected 74HCT01N, which is in DIP package, connected it. Then you decided that you would better use SMD version of this chip, and you use this replace function to replace N (DIP14) technology with D (SO14) technology. No changes at the schematic level required (there will be a change at board level of course due to difference in packages). However at some circumstances replace is not possible: when original device is already connected and EAGLE can not match new device's pins with old ones (neither by their names, nor coordinates). In this case you, unfortunately, will need to delete existing device from schematic, add new, and rewire new device. Replace function is very useful if you created your own library, and modify its devices (for example, putting labels in different locations on the package foot print, or rearranging pins in symbol drawing). After modifying the device in library, you just go to your schematic, and perform replace on old version of device.
Smash/un-smash function. Every symbol on schematic consists not only of pins, but other elements like labels, name, value,
which are usually displayed on schematic. By smashing the part, you detach these fields from their original location relative
to the symbol, and can separately position them on schematic. Un-smashing symbol reverts changes - moving labels into their
original places with original orientations. This function is very useful if you have dense schematic, and labels impose each
other. You can even change size and orientation of the smashed labels, making them smaller, larger, horizontal, vertical etc.
However if you make a lot of similar smashes and changes to specific symbol, consider, rather than doing it for every symbol
on schematic, perform one change at the library level, and then replace devices with modified device.
Gateswap - extremely useful function during your creation and finishing of the board layout. In general, if you have two identical gates on the schematic, IC1A and IC9C, 74HCT01-type each (technology - package - does not matter), you functionally can exchange these gates at the schematic level. Example: you have one chip on the schematic, let's say 74LS04 - hex inverters, with symbols with pins (input-output) at 1-2 (A), 3-4 (B), 5-6 (C), 13-12(F), 11-10(E), 9-8 (D). You drew the schematic, and when you came to board design, it appeared that gates A's output pin (2) is wired to gate D's input pin (9). It is obvious that connecting pins 2 and 9 will take a space on the board, and may cross the way of other useful tracks. What you can easily do with gateswap is to swap gates B and D on your schematic, so that output of gate A (2) appear connected to gate B's input (3). Connection between pins 2 and 3 will surely take much less space and copper, and at the same time schematic will functionally remain the same.
Change name or value. Name is a unique identifier of the component on the schematic, for example IC5C. You can rename it to another unique name, for example CHIP10C. Note that gate number (C) can not be changed as it is not a name, it is identifier of the gate within the device design. Value need not to be unique, but should be informative so that people reading schematic understand what component/gate is - its type (e.g. 74LS145), probably its purpose etc. Change name has one very important purpose - to join several signals. Imagine you drew several electrical connections, and then realized that they are the same signal. You can connect them explicitly with the wire on the schematic (recommended), but you also can rename segments with one name, and it automatically merge them - but implicitly. It is a kind of hacking, I do not recommend it because schematic stops to be readable without digging into the properties of connections.
Paste from the buffer. When you copy something as region using copy function, contents get to the buffer. Then you just click this icon to create another copy of the region. Note that it will be a copy, with new devices/packages added to the board even if current devices have spare gates.
Change function. Extremely important and useful if you are going to perform bulk, but spotted changes. Look at the picture
below. Imagine you interconnected symbols on the schematic, but then you decided that you need to change properties of some
specific connections - for example, net class (from default to power), or just thickness of the connecting line. You click
change button, select property you need and then value. After this you may click any suitable object
to change selected property of it.
These buttons allow you to put decorations onto the schematic. Warning: do not use line function to put wires onto the schematic, even into the nets layer. Use wiring function instead.
Draw wires (EAGLE calls is "draw an electrical connection") is to draw connections between pins of the symbols. If you connect two wires, dot will automatically appear in the junction. It is technically possible to remove the dot while keeping the connection, but it is misleading, and I do not recommend it. If there's a connection - there should be dot at junction. If there's no connection - there's no dot at junction. Wires are to be drawn in Nets layer of the schematics (selected automatically, default is green color).
Draw a bus. Bus is a logical entity, not physical, always remember it. It is not a wire. First, you draw a bus you will connect
to the symbols - for example, data bus, and you expect it to have 8 data lines called D0 to D7. Then you select
name function, and replace B$1 (or any other number than 1 - it is just a next available bus name)
with the list of wires in it. In out example it will be D[0..7] - will define 8 lines with start D and end from 0 to 7.
Here's an example for control bus - !RESET,!WR,!RD,AEN. After defining the wires, you select wire function, click onto the
bus, and can route a wire from it to the needed symbol. Or you can route new wire (which does not have a name yet) to the
bus, and when connecting it with the bus, EAGLE will ask which bus signal you want this new wire to connect to.
Labeling function. Places a label of the wire/net or bus. Select this function, and click on wire or bus. You can see I have placed labels on the outgoing wires in the bus example. You can do the same operations with labels as with text - move it using move function, rotate and mirror using respective functions. Put enough labels on your schematics. Remember to have negative-active signal (label with dash at the top) use exclamation mark in its (text/signal name) definition, for example "!WR" (will look WR). You even can have it partially: "!WR!CPU" (will look WRCPU), but it is not normal naming (signal is either positive-active, or negative-active).
Schematic checker (ERC) and error display window. Extremely useful function to ensure that you did not make any explicit technological mistake in your schematic. It does not check if circuit you drawn will work as you expect. It does not perform emulation on signaling. What it does is checking of the proper signal type connections. Every pin has direction property set in the library editor, which defines the purpose of the pin. Depending on this purpose, errors you may receive could be:
ERC may also throw warnings, which may point you not to errors, but probable deficiencies in your design. Examples could be:
You have an option to correct deficiencies and errors, or approve them and accept the risk of having
issues on future steps. Corrections can be done at the schematic level (for example, by reconnecting devices in proper way),
or at the library editor level (where you can reassign direction of the pins, making input pins which can be left unconnected
Info and show functions. Info function displays all the major properties of the selected object, in separate window. Remember that for different objects it displays different set of the properties. Some properties can be edited, some are read-only. Here're several examples:
Properties of the gate or device. Gate number (A), device name (74HCT01N), package (DIL14) are read-only, defined at the library level (74xx-eu). Do not use properties window to change name, use name function instead. Change gates using gateswap function. Gate is positioned on the schematic (position) relative to symbol's (0; 0) coordinate, defined at the library level (on schematic - red thin cross).
Properties of the bus. From and To are start and end (x; y) coordinates, and name is a definition of the signals available on the bus. Default bus naming is B$(bus number), like B$1.
Properties of the net/wire. Start and end coordinates, name can contain more than one signal, however I strongly recommend to assign only one unique name to one unique signal. Default wire naming is N$(signal number), like N$10. Net class is a feature to group nets into classes, which are assigned specific design properties. Do not confuse net classes with busses. You can create up to 16 net classes (there's only one defined at the beginning: "default"). Go to Edit→Net classes… menu, and you will see the following window:
While it looks dreadful, it is rather simple if you know how to properly apply it. To create new class, define its Name first (and then this class will appear in the drop-down menu of the net's properties window). Next, you can define minimal width of the conductor on the board; then minimal drill (via hole, through-hole pad hole), associated with the signals assigned this new net class, and then you can fill clearance matrix, which defines clearance distances between board's tracks of different classes. When it may be useful? I used it defining two classes - default and power, assigning minimal width of the power tracks to be 0.05 inches (50mil - measures are set in the Grid window). Then, during board design check (called DRC), EAGLE will check all power net class tracks and alert me if they are less than 0.5mil in width. Of course I still have an option to approve exceptions. To disable check leave field at 0.
Properties of the text. Play with its size and ratio to make it fitting your requirements. About font type: if you set it to vector, and then print schematic into the PDF file format, text will not be searchable because it becomes a set of vectors (lines) on the drawing rather than ASCII characters displayed as a text.
Layers. Schematic has several logical levels, which define specific type of objects. Nets define wires,
Busses define busses, Pins define pins, Symbols define drawings of the symbols, Names define names of the devices,
Values - their values. You can place text in any layer, or draw a line. But do not misuse them as it may cause tool to confuse.
I do not touch the list of levels on the schematic, and always have them set up in the way displayed above. Only one time I
had to turn Pins net on to see where pins of the device are exactly located, but then turned it off because it adds a lot
of extra labels to drawing and drawing becomes unreadable.
Other functions not covered so far: attribute, dimension, junction, split, miter, pinswap.
After you have drawn your schematic, checked it with ERC, corrected most of errors and probably accepted some of them, it is time to switch to the design of the board. Always remember that schematic and board should always be consistent, thus load schematic with board or board with schematic to exclude changes to only one entity without affecting another one.
To create a board template for your design go to EAGLE's main menu, and select File→Switch to board. It then will ask if you want to create a board from schematic (because it did not find .brd file for your .sch file). You answer yes, and see the following picture.
You will see some rectangle, which will become your board's shape, and components, which are placed off this square (off the board). At the end of your board design, you will have its shape to fit properly into the chassis, horizontally (but its width and length), and vertically (by the height of components mounted on it - from both top and bottom surfaces). Components will be placed at the locations which do not conflict with the shape of the chassis by the height of the components.
Shape of the board need not to be a rectangle, it can be even circle, but this all the components, as well as conductors, should fit into its space, and the shape should be drawn in Dimensions layer.
As soon as we started to talk about Layers of the board, let's consider all of them because misunderstanding and misuse of the layers may bring you big problems during design. Here're they are:
There're a number of layers which start either with letter "t" or "b". Letter "t" designates top layer (top surface of the board), and "b" designates bottom layer (bottom surface of the board). Let's consider these layers:
Now I will say some words about other layers. There's scarce information on the internet about what they mean, so I hope the pieces of information below will be very helpful:
Not covered: keepout.
First step, as I said before, is to draw dimensions of the board in the dimension layer. Ensure it fits chassis, and is designed to be mounted properly in it. Thickness of lines for drawing dimensions is 0.
Draw the line. Click this icon, and you will see line toolbar appear in the window.
Select Dimension layer, then width (you see on picture it is 1.27, the right guess is that I set measurement in mm, and width of the line is 0.05 inch). Set width to 0 - it is possible to input your values directly to this field. Even with width 0, lines will be displayed on the screen, and will appear in the Gerber output.
Some very important words about curves (8 icons after active layer definition in the toolbar). If you draw vertical or horizontal lines, curves do not matter. However if you draw inclined lines, these curves will help you. Well, it will take a lot of words to explain each of 8 icons, but I leave it to you to just try and see yourself. Note that in this line drawing mode, you may click right mouse button to skip to next curved pattern instead of pressing respective curve button.
Circles and arcs - also can be used in drawing dimensions (or any other shapes in actually any layer). Need to shape round board? No problem!
Holes - while it is called holes, it is actually drills - the round holes made by excellon or compatible drill. They are only round. No squares, rectangles, or complex shapes. To create complex shape holes, you can combine line, hole (drill) shapes. All the drawings in dimension layer, which are drawn inside maximal dimension shape, will be considered as holes.
Dimensioning tool may be useful to put dimension reference for objects (right mouse button switches type of dimension drawing). You can put dimensions in any layer, but I guess you do not want dimensioning drawing to appear in the board's silkscreen? Then put dimensions into Reference, Document or any other custom layer. To change measurement unit, use info function on the dimensioning label.
Split function is useful when you have drawn a line (or track), and then want to split it into two segments, or make a curve in it. Type of curve, again, is controlled by the right mouse button (or toolbar if you prefer clicking buttons). As a test, draw a line, then click this split button, point to line, click, and move cursor. See the result, then press right mouse button - note difference, then press right mouse button again, etc. Again, better see yourself than read it here.
So, now you have board dimensioned - with its outer shape, and inner drills and holes (e.g. mounting holes, holes to mount connectors, holes for bodies or special components, or board installation clearance holes).
You are now going to find components/devices, which have fixed location on the board, and place them first. They are - edge and other connectors, big parts which can be only placed to some restricted areas on the board (e.g. tall capacitors). Parts should not get out of the board dimensions, and should not be put over holes. Furthermore, there should be some rules followed.
There's an important different between schematic's mirror function and board's mirror function. In schematic symbols are just mirrored as an image, but at the board level mirroring will put component into another layer. For example, you have SMD chip put into the top layer, and if you select mirror tool and then click chip's top origin, chip's pads will go to bottom layer (if bottom layer is not displayed, chip will just disappear from the image you see on the screen; if bottom origins are not displayed, origins will also disappear - and it may look for you like component is lost - you just should display bottom layers to see it again). If you mirror component which is at the bottom layer, it goes to top. Simple, but different from the schematic.
Design rules are extremely important part of the design, including tool which checks if your design follows rules you set - so called DRC (design rule checker). Before you go forward with your design, define these rules so that at the end of design you do not find yourself with a ton of errors and spend a time understanding what is wrong and how to cope with it.
Clicking this button will invoke window with a number of the tabs. At each tab, when you put cursor into the input field, EAGLE displays example of what this field is about. I will briefly describe tabs here:
Explore other tabs of DRC settings yourself, they are more or less intuitive, and I believe you will be able to use them properly. To check your board click "Check" button, and if there're errors, they will appear in separate window. Selecting and double-clicking entry in the error/warning list will show you the location of the board under consideration.
Now when you have non-movable components placed onto your board, it's time to place remaining ones for their best colocation. There's no universal recipe on the board layout, but you may consider the following matters before you start and during the process of routing:
Routing is about putting conducting tracks onto your PCB, which connect pins of the devices, already connected at the schematic level. Initially, on unrouted board, all the unrouted wires are visible in the layer called Unrouted. As you route tracks, these unrouted wires disappear (replaced by the track).
You will find routing much easier if you keep in mind the following idea: use one layer for horizontal track routing, and another layer for vertical track routing. It is good to minimize number of vias, but it is not an aim as such. You should base your routing on some ideas I expressed before, for example, shortest path, even if it involves one or two vias.
Putting tracks onto the board in EAGLE looks almost the same you putting wires in the schematic, with the difference that now you put real conductors, not virtual wires.
Most tools available in schematic are also available in board, like move, mirror, rotate, text, smash, select region, and split. I must highlight that you will find split function very useful during manual routing, when you may need to change shape of the track without removing it.
You can use auto-routing capability of the EAGLE, if you possess license for auto-router. When you click this button, you will see auto-router menu. Play with options to see the results and differences. Do not forget to save your design before using auto-router, as its changes can not be undone. Tip: after placing components onto the board, try auto-router. If it will be able to route the board completely (100%), then you have good layout, however you should note number of via auto-router used. After seeing how auto-router routed the board, you may want to slightly change layout of the devices on the board to improve routing and decrease number of vias, or decide to route manually. You can route board partially manually, and partially automatically.
Route and Rip-up tools - you will use these during manual routing. Click route tool, and then click onto wire in Unrouted layer to route it. Rip-up is used to delete routed wire (if you click once), or whole signal (defined by its name) if you click twice. Of course, you should route so that tracks for different signals do not cross and are at the acceptable distance, vias you put onto the board not too small or big (I use 0.024") and do not touch each other, and all the components, tracks and vias are at specific distance from the board's dimensions and holes.
This tool, called "Ratsnest" is resetting all non-routed airwires to their shortest paths. I have no idea if it has any relation of the nest of the rats. But this tool is very useful when you moved component, and then want to see the closest pads or tracks which relate to signals connected to this component. Also, after this operation finishes, you will see how many air-wires are left to route in the EAGLE's status line at the bottom of the EAGLE's window, for example "Ratsnest: 8 airwires".
I put it in separate subchapter because it could be a real hassle to find an air-wire which Ratsnest reports to be unconnected when you seem to have connected everything. It happens, and happens often if you route board manually. If you have most of your "working" layers turned on, you will not find an issue. To achieve success, you turn off display of all the layers, except Unrouted. This layer displays air-wires, however your unconnected air-wire could be so short and you should be patient to zoom and un-zoom parts of the board to find small yellow line. If you still can not find the line, turn off the Grid.
It is a good practice, especially with the board functioning at high speeds, to cover unused space of the board with copper surface, connected to power rails, especially to ground. Doing this you decrease electromagnetic interference between signal layers or tracks located close to each other. For 2-layer board, I cover both sides with ground. Let's consider the following images, taken from the GR8BUS master board design.
You can see three thick power rails - top is +5 volts, middle is +3v3, and ground rails below them. I put a number of vias onto top +5v rail for reliable connection, but want to see a big polygon reliably covering these vias, not just those thinner tracks connecting vias. And this polygon should look like the one drawn in dashed style. At the same time, I want white space all around to be covered by the ground. How do I achieve it?
Here's what I have got after implementation of my wishes. Here's how I did it:
Explanation: polygon is a dynamic area, assigned to specific signal. I assign big polygon to ground, and then EAGLE dynamically "fills" every empty space by copper connected to this signal, including space which is occupied by this signal (that's why bottom track, GND, had disappeared from second image - it merged with polygon). Same happened to +5v polygon, but as +5v polygon has higher rank (1), its processing precedes processing of GND polygon (with rank 2), and GND filling just flows around the +5v polygon.
To remove filling from the inside of polygon, use rip-up function. To delete polygon, side by side, use delete function.
I only ran two scripts so far, and here I will explain one of them - import-bmp.ulp. It allows you to place bitmap images onto the board. This way I put Japanese Kanji text onto the GR8BUS master board.
Press this button in the top tool bar, or use command line at the top of the window putting "run import-bmp" into the line. It then will display explanation how the script works. In short, it represents your bitmap as a series of lines and dots. Remember script outcomes can not be undone with CTRL-Z, thus save your project before running it.
It is good idea not to put pictures into the signal layer, unless you have plenty of spare space and picture made of copper will not harm circuit operation in terms of EMI and self-oscillation.
Use monochrome pictures. Create separate layer for the picture - script will allow you to choose the layer number to put image to. Select empty or non-existing layer. Finally, if picture will look wrong, or you will want to move, rotate, mirror it, you will turn all layers except the one picture is in off, and then will be able to select whole area of lines or dots of picture to operate on.
Do you think you board is finished? Take a time to examine the following:
The files to be used for manufacturing are generated by EAGLE's CAM processor. It is very important you understand how to configure it properly, otherwise you risk, in worst case, to have your labels printed on the board at copper level and tracks printed with paint. Of course it will not happen, because manufacturers are used to check the design before they put it to manufacturing, but for sure you will lose some days to regenerate another, correct, output.
To access CAM processor, go to File→CAM Processor…. It will open the window shown on the picture below. CAM processor configuration files are stored in .cam files. I usually create .cam file for every project, and put it into the project's working directory.
You will see the number of tabs. There will be several default tabs, but you may need to add more. Here's my list for 2-layer (2-sided) board:
Please note that division for top of the board and bottom of the board is a logical. You define where top and bottom is, and as you defined it, keep it.
Look at the File definition in the window below - %P stands for current project's directory, %N stands for current project name.
After you defined outputs for every Gerber file, set styles (you can see defaults on the picture above), you press Process Job button, and have Gerber and drill files generated - in Gerber subdirectory of the project's directory.
I recommend tool called Gerbv to view and check Gerber and Excellon files. The tool is free to download and use. You may be able to catch final mistakes in your design, looking at how board will look in reality. You may see if you misplaced any labels, Or some dimensions are wrong. Or anything else. Load generated files layer by layer, and check them, toggling them on and off. For example - does Top Soldermask covers pads and vias properly? Are labels, names and values are properly placed on the board, not overlap each other?
With library editor you will be able to create devices to be used in your designs (and designs of others if you will decide to share your device). Quality of device entity you use will ultimately define the quality of your end product.
Device is the symbiosis of two entities - package and symbol. There should be strict correspondence between pads as they appear in package and pins as they appear on the symbol drawing.
Symbol Symbol is a drawing displayed on your schematic. Symbol is logical image of the device, descriptive of its function in the schematic.
Package is the footprint of the device on the board - pads, mounting holes, value and name of device. Package is physical image of the device. Package may contain several symbols (logical elements), and these logical elements need not to be identical.
Let's practice a little - create 74LS00 device from the scratch - the chip containing four 2-input NAND gates. First of all, let's create new library going to control panel, selecting File and New Library.
You will have library editor open, with "untitled.lbr" as its name. To avoid future problems, save empty library now. Select File→Save as. Do not save to default directory where collection of default libraries is located - you will have difficulty finding your library in the huge list. Create empty directory in your EAGLE project, and save it there with the meaningful name, for example, as 74LS00.lbr.
Next step is to turn grid on. Go to View→Grid. It is extremely important step for two reasons (a) you will be able to align drawings to the required dimensions, and (b) selecting correct measures will define level of easiness of you assembling your design from devices you create.
Let me elaborate on the point (b). First of all, you can create different scaling and measurement properties for each entity you create - for example, you make connector's package in millimeters, then make connector's symbol in inches, then assemble both to one device, which in schematic view will be aligned to inches and in board view - to millimeter's grid.
Now about selecting measurement units. Most symbols I created, and most symbols I used from standard libraries are created in inch measurements. Thus, unless you have special requirements, I strongly recommend using standard measurement and grid units when creating symbols. Having symbols created in the same way will make your life a lot easier when you start interconnecting them, and your circuit diagram will look much nicer.
Packages is the best to be created in the measurement units they are drawn in datasheet, again, unless you know there's better way. Correct footprint is extremely important for you, as you may identify at late stages that component you have on hand simply does not fit into the place you designed it for. Issues could be - wrong pitch between pins, short pads (for SMD components), wrong pin assignment, placing component at wrong side of the board thus reversing connection/location of the device.
Note that dimensions on datasheets may appear in millimeters, while "real" dimensions are in inches. For example, datasheet may list that pitch between pins of the chip is 2.54mm, and you guess it is 0.1". Width of the package is 7.62mm, and it is just 0.3". However if it lists 3.5mm, then you would better draw package in millimeters.
Hint: after you have made a device, print its package in 1:1 scale, and try aligning real component to its board drawing on the paper. Does it fit?
Let's create symbol for one NAND gate. Click onto Symbol icon at the top menu , put "2NAND" into New input space and click OK. Say yes to create new symbol. Select appropriate measurement units (usually by default inches are ok). At the bottom you will see "Description" test looking like weblink. Click it, and put the name of gate there.
Note that it uses a kind of HTML, and you can nicely format the headline.
Our gate will have three pins, two inputs and one output. Click onto Pin icon , and put three pins near the center of the drawing:
Now click Info icon, and edit properties of each pin: first pin will get the name of I1, direction of input; second name of I2, direction of input, and third O, direction of output (a). They will look like on figure (b). Then you put pins into the position of how they will look like on final symbol, and "around" the cross (c), which is (0;0) point of the drawing. Point (0;0) is very important to keep somewhere at the center of symbol and visible, because you will be moving symbol on schematic dragging it by its (0;0) point. Inputs are to the left, output is to the right. Use move tool to move pins, and right mouse button to rotate them when moving.
Names of the pins - I1, I2 and O, are actually looking ugly on the schematic. Use info tool to set their visibility to pad - it will trigger pin names to be invisible, but package's pin numbers visible. Note that you can not change properties of the pin's name (size and location of labels). Now you have nice picture of (d). Select wire tool in the left menu, ensure layer selected is "Symbols" and draw vertical line as shown on (e). Remember that you can change scale using mouse's wheel. Now select Arc tool , first click onto the top of the vertical line, then second click onto the bottom of this line and third click to finish. You have nice device shown on figure (f). Now we miss two very important components of the symbol - name and value. Select text tool, and create two text labels: one with text ">NAME" and another with text ">VALUE". They will both create in Symbols layer, use info toll to change them to Names and Values layers respectively. Position labels similar to figure (g).
>NAME field will receive device's enumerated name on your schematic, for example IC1. >VALUE will receive text from device's value field. These labels have to be in their respective layers so that during drawing and drawing debugging you, by turning off respective layers, turn these labels off.
Note swap level property of the pin (do not confuse with swap level of the gate). There's schematic editor's function called pinswap which allows swapping equivalent pins within same symbol. Equivalent means that you can swap pins logically without change of the behavior of the circuit. For example, for our 2-input NAND gate we can swap pins I1 and I2 and logically circuit will operate the same way. However it's wrong to swap A0 and A1 address pins of the ROM chip, because ROM access address will change. Within same symbol you can swap only pins with same swap level. As a test, let's set I1 and I2 to swap level 1 (note pin's property changed from "in 0" to "in 1"). Leave O with swap level 0, which means it is unswappable (h). Be very careful with pin swap levels; you may not need to use this feature, but anyway it is good to know for design troubleshooting purposes.
Now you click CTLR-S, saving the symbol, and we're ready for the next symbol!
What's the next symbol, you ask? Think about 74LS00 device. Does it contain only four logical elements with 4 pins each? Well, 4 by 3 equals to 12 pins, but package has 14 pins, so we should do something with remaining two pins.
Again, Symbol icon to the top, New "P", OK, Create. Put description as "Power symbol". Set both pins to pwr direction, and set visibility to pad. Rename top pin from P$1 to "VCC" and bottom pin from P$2 to "GND". Then put three text labels - ">NAME" between pins, and "VCC" and "GND" aligned to pins. All three will be in Names layer (that's logical). There's no sense to put value text onto the power symbol.
Now we move to package. We will create 74LS00 in two variants: DIL14 (dual-in-line, 14 pins) and SO14 (SMD, 14 pins). These packages will be completely independent, but will be connected to symbol at the last stage.
Click onto Package icon , and create new package called DIL14. Put description as "<b>DIL14 package</b><br>Dual in line package, 14 pins".
Click Pad icon and from the top select "long" type . Why long? Because DIL package's pitch is 0.1" (pins are relatively far away), and as bigger pad as more secure track will be during soldering as well as contact with the solder. You can choose any type you wish (for example, square for VCC pin - to physically show where power is).
DIL14's pitch between pins is 0.1", and between two rows of 7 is 0.3". Check Grid settings to be in inches with step 0.1, and one pad. This first one you put will be pad with name P$1. Use info tool to change its name from P$1 to just 1. Then use copy tool to copy pad 13 times (first copied will be automatically 2, next 3, and last 14). As an example I put one after another in two rows (a). Then arrange them in the two rows in the required order: one row pads 1-7 at the distance of 0.1" and second row 14-8 at the same distance (b) (you can see current position and grid properties at the top left corner of the workarea ). Mind the cross at the center: it is point (0;0), with exactly same function as in symbol editor - you will be manipulating package taking it by its (0;0) point, thus please abide same rules - it should be at the center and well visible. Now move rows (using group select and move) at the distance of 0.3" (c), again, with (0;0) at the center of package. Great, holes are there, but let's make package a little more usable. Leaving package as it is will confuse those who will be assembling your design which component goes where.
Yes, we will add value and name for the package, and draw sign of the chip. You can do whatever you want in the drawing layers (i.e. except signal layers - 1-16), but if you will need your drawing to appear on the board ensure you draw in the either standard layers (for example, names, values, place) or, if you create your own layer, include this layer into the CAM processing.
We add text to Names and Values layers respectively, use Wire tool to draw lines and arcs in tPlace layer. Please note that if you start drawing from the end of the line on the same layer, new line appears connected to the initial one, and to break connection you either delete one of the lines, or use "Split" tool to bend one of the lines into long and small segment, delete small segment, move and reconnect if needed.
Several words about why tPlace. Its name assumes that it is top, and place for something - draw placing of something at the top. There's another layer, called bPlace, which logically means drawing placing of something at the bottom (of the board). When drawing, ensure you draw on the proper layer, otherwise for SMD component you may be surprised to see its place drawing at the opposite side to its mounting place!
Now we are finished with DIL14 package. Let's go creating SO14 one. It is SMD-type package, and there will be no holes (pads we used before). Click onto package icon, and create new "SO14" package. Put "<b>SO14 package</b><br>Small outline package, 14 pins".
Click SMD icon and put one pad somewhere near (0;0) point. Then use information tool on it. You will see window shown on (a). We see here that pad is located in top layer, its size is 0.05 x 0.025 in inches because we have grid setting in inches. Thermals means that if you create polygon around this pad, there will be thermals (spaces empty of copper) between pad and polygon's surface. Stop means not to cover with protective mask during manufacturing (of course, because you will be soldering component to this pad!), and Cream means "please apply soldering paste to this area" - and useful in automated wave soldering. Normally you should leave these checkboxes set as default.
With SMD technology not only pitch between pins matters, but also shape and size of the pad. If you will make pad too wide, they may accidentally short during soldering. Too thin - tin may not distribute between pad and pin properly. If too short - pin may miss the pad completely, too long - again risk of shortages. There're actually ready-to-use packages in EAGLE libraries, but again, you use them at your own risk. Always check (for example printing footprint onto the paper and applying component to it to see how it fits) before manufacturing.
SO14 outline states that size of the pad is 0.65mm*1.7mm, pitch is 1.27mm and distance between rows is 5.6mm. Surely pitch is in inches, but other dimensions are hardly converted to this unit.
I will explain how I would do the design, you are free to do your way and share it in the comments to this article.
At this stage we have two entities created - symbol, the logical representation of the element you will use in your schematic, and package - the footprint of the real device on the board. Now we are going to create device. This device will have identical functions to 74LS00, and will let you choose from two packages - DIL and SO.
Click onto the device icon , and create new device called 74LS00. Put description "<b>74LS00 device</b><br>Quadruple 2-input NAND gates" (without quotes). Just in the center of the screen, in big blank area, we will compose logical representation of the chip using our symbols we just created.
Click add icon , and add four 2NAND symbols and one power symbol. We will call all five "gates".
Each gate received name starting G$. Value is not defined. All gates are "add=next" and "swap=0". All these properties will impact how you operate with gates on your schematic. Let's consider each of them.
Add defines algorithm how you add (or invoke) symbols to the schematic. Options are:
There're other options available. We will need only these two.
Swap defines similar mechanism as we learned for pinswap, but now it is at the gate level. Swap level 0 means gate is not swappable with any other gate from the device. Gate with swap level 1 can be swapped with other gates of level 1, etc. When using device with gateswap other than 0, you will use gateswap button. Of course to be able to swap gates, they should be identical. And, again, reminder - be careful with gateswaps.
Therefore, we will do the following with info toll on our device consisting of 4 2NAND gates and one power gate:
Now chip (device) is logically set up. We are going to assign packages - real chips - to this logical chip.
At the bottom right corner of the screen you click New button. Select DIL14 package, and put N into variant name. Again click New button, select SO14 package, and put D into variant name. These variant names will appear as a postfix to the device name (e.g. 74LS00N).
In the list of packages/variants double click onto DIL14 (or select this package and click Connect button). Task is simple, but extremely important, you assign pins to the specific functions. Use datasheet. After assignment, re-check. In our case gate A's I1 connects to pin 1, gate A's I2 to pin 2, gate A's O to pin 3. Connect all the gates as required, and connect P.GND to pin 7 and P.VCC to pin 14. Great, after clicking OK you will have pad numbers on the device symbols.
Select SO14 package, and perform the same assignment operation for it. As a shortcut you can use "Copy from N(DIL14)", and then re-check with datasheet anyway.
Last changes we make are:
We are done. When adding your new 74LS00 device to your schematic, you will see the choice:
Please review the list of mistakes, knowing these may help you not make them in the first place.
End of KB0015 "Best practices creating designs with EAGLE".
comments powered by Disqus
|© 2011-2018 Eugeny Brychkov||http://www.gr8bit.ru||Status: Released|
GR8BIT™, GR8BOOK™, GR8BUS™, GR8BOX™, GR8STORM™ and GR8NET™ are trademarks
copyright © 2010-2018 Eugeny Brychkov.