Monday, October 14, 2013

Eagle Tutorial

Setting-up Eagle for PCB Design

Step - 1: Download latest free version of Eagle from here and install it.

Step - 2: When you start Eagle, it opens a windows called "Control Panel" as shown below
 Libraries are component library which you will use in project, Design rule is useful when you send board for manufacturing or mill and Projects is where you save all your projects.

Step - 3: Add frequently use libraries.
 Download some useful part library for eagle such as Sparkfun Eagle Library , fablab library and Adafruit library. As you will work along, you will make some modification to these libraries and you want to be able to access those library from any where. For this, I like to keep my library and Projects in my dropbox. Create a folder eag   le and a sub-folder "libraries". Copy the "Sparkfun" and "fablab" library folder in this folder. To add this folder to your library go to Eagle control panel then click on menu Option-Directories. In Directories windows, browse and select folder "Sparkfun", "fablab" and adafruit folders.  Do same for project directory.



Note - It is recommended to use mouse instead of laptop touch-pad.

Eagle Library Management




Important - In-order to use a library, right click the "SparkFun Library" folder and click "use all". You should see a "green bulb" in front of every library file indicating they are being used.
  1. Adding a Component to Library from other Library
    I prefer to keep my favorite components in one library so that they can be ready used. Usually, this involve copying a component from other library to your "favorite" library. To add component from one library to other. First open the library where you want to copy the component by double-clicking it. Then navigate to the "device" you want to add in library list, right click and click "Add to library". This will open the component in library editor. Here, you can edit the description and delete certain package associated with this device if you don't need them. To rename the component, in library editor go to Library--Rename and enter new name. Once you are done with edition click "save" in library editor to save component to new library. To change the symbol's prefix (e.g. IC1, IC2 for diodes or R1,R2 for resistors), click on Prefix and enter the desired prefix. To change pin names, you need to open symbol go to device -  symbol open it. Rename symbol, right click on any pin and rename it accordingly.
  1. Edition a Component in a Library
    First open the library by double clicking the name.lbr in control panel. Now in library editor go to Library-Devices select the device you want to edit and open it. The device will open in the library editor where you can edit it.
  2. Removing a Component from a Library
    Open the library in library editor by double-clikcing it. Then go to Library- Device/Package/Symbol (depending upon component) and open it. On the top of the library editor windows you will find the name of the file you just opened. Now go to Library-remove and type search filename and search than hit OK to remove. Click save icon in toolbar of eagle library editor. If you try using the remove option without opening a part from the library Eagle will throw you a “not found” error.

    In eagle library for every part you have, symbol+package+device file. Package is components footprint for PCBs. A device is for schematic and Package is for board. Device links the symbol and package and makes the whole part. To remove a component, you have to make sure you delete symbol and package and device associated with that component.
  3. Creating a part in library
    An eagle part consist of a symbol and corresponding package. The package is the footprint of the device in board. You make a "device" by linking a "symbol" and all its corresponding "packages". While making apart you can use preexisting packages such as SOIC8 etc. Information about the package can usually be find in the datasheet.


Schematic Design

Schematics should always be drawn on a grid of 0.1 inches (2.54 mm) since the libraries are defined this way. 

Rename part - Use name command click on the origin of the part and enter new name.

Change Value - To change value use value command click on the origin of the part and enter new value 

 To change the value and name of the component, first type "smash" then select a component. This will bring + near the corresponding name/value.  Use move command and click on + sign for moving name and components.


Board Design

To let eagle redraw the connection use "Ratsnest" tool from the toolbar on the left or "rats" command. For optimizing the PCB milling use the design rule Patil.dru which make sure the spacing between tracks and pads are 

Set the grid to 10mil while routing tracks. And visually make sure the distance between the tracks you draw is more than 1.5 grid size as that will be 15mil and the drill bit we will use is ~15.6mil. Offcouse check with "drc"using the Patil.dru to find any problems.

Resizing a rectangle - Type       "move" command and hold the "Ctrl" key while clicking on the box. This way you can re-size the rectangle. 

Once routing is done, optionally you can increase the width of track (~16mil) which are not tightly paced. Type change, select width and double click on the tracks for changing width. The track between the resistor can be changed to 16mil (check it)

when making the bottom box for final cutting of board, make sure that you keep atleast 20mil space otherwise fabmodules won't recognize it.

For boundary of the board, keep 40mil (not more) distance from the side tracks.


For exporting track, select top layer and export monochrome at 2000dpi


For exporting boundary, select bottom layer and Dimension layer. Make sure the blue box is inside the boundary and has 10mil boundary. 


Exporting Image for milling


Board Boundary - Select the layer - Top, Bottom and Dimension. Make sure that the rectangle in bottom layer at least have 40mil space from the tracks. Move the dimension rectangle such that the space between the bottom layer blue rectangle and dimension rectangle is 10mil (1box if grid is set to 10mil). 
Go to layer and select only bottom layer, Export monochrome at 2000dpi.



Layers in Board Layout Editor

1) Top - for tracks (red)
16) Bottom -
19) Unrouted track (yellow)
20) Dimensions - dimension of the board (white rectangular box)
21) tPlace -  which is used to draw lines that will be rendered as the silk screen on your PCBs (the printed text/lines/shapes we see)
23) tOrigins - origin of each component in top layer
25) tName - Name of each component (white) like R1 U$1 etc
27) tValue - Value of component in top layer (white) like 1K, 1uF etc (value set in schematic)
29) tStop - This layer is used for solder mask (hashed white boxes around pads)
51) tDoc - is used for documentation purposes, such as drawing the mechanical dimensions of your part. Normally this layer isn't printed on the PCBs, but it's very important for documentation and for PCB design.


Silk layer

Silk layer is useful while soldering the board. I prefer to keep only component value (as the unit already tells you the type of component) so disable the tName layer. Sometime value of two component overlap each other. To avoid overlap first click on smash button (or smash command), click on component when + sign appear click move and move the value to other location.


Library Editor


Editing footprint of a device

1) Double click on the library name in control panel to open it in library editor.
2) Go to Library - Device and open desired Device. In the left side of the window you will see various packages assosiated with this device. Right click the package you want to edit and click on "Edit Package"
3) To re-size pads, right click on pad,  go to property and enter new size.Once you've done that it will show up on all new boards and new placements
4) In order to update the board you've already started you need to select Library - Update all from the board window and all the footprints will be updated to the new one you've edited.

Creating a Part Libary

The part symbol should be made on 0.1inch grid because the schematic editor by default uses 0.1inch grid to place symbol in schematic.

File -  New - Library
save it as IC-icnumber-discription (just to that its easy to short later)
Symbol (for schematic), Package (footprint for board) and Device (co-relate symbol to package)
In library editor make sure grid is 0.1inch and visible.
2) Select "Wire" and make sure "symbol" layer is selected in the drop-down list. Make a rectangle with wire, 3) Put pin using Pin (select size to small in medium) and click both icon (for name and value). You can also select type of pin, by default its I/O pin.
4) Use Name command to assign meaningful name to each pin.
5) To assign name to newly created symbol click Text [T] icon, give it a generic name >Name so that eagle can automatically assign it a name. Make sure layer 95 Name is selected from drop-down list and put the text near the symbol.
6) For value to go Text, type value, select layer 96 Value and put it near the symbol >VALUE


PCB Milling Using Modella

Eagle Settings

Grid - 10mil 
Change the track width to 0.01inch (10mil) or 16mil. 10mil is ideal for small and dense board however, you might see some track coming out of board during debarring if board is large and not flat during milling. One good way is to first rout the board using 10mil and than change it to 16mil where space is available.

While routing make sure that you have at 1.5 to 2 box difference (16mil to 20mil space, drill bit for milling is 16mil)
In drc make sure that track width is set to 10mil and clearance between track is set to 16mil.
Type change in cmd and then select width
Export image in 2000dpi

Some important parts

FTDI header - M06SMD
01_Sparkfun -> M06 -> M06SMD


Modela

1/64inch = 15.6mil = 0.4mm

Schematic Design

Use "net" command to make electrical connection. Never use "wire" command.

Connecting pins of two IC by name - Some time in-order to have clean schematic and to avoid drawing many nets you may want to connect pins using name. To do this

1. Draw a very short net (using the net command) out from Pin 1 of IC1, double click at the end  to end net. Do the same for other pin also
2. Now select the NAME tool. Click on the little net you drew in step 1 and give it a name. Give the same name to other short net you draw on other pin. You will be asked if you wish to join the two nets together, say yes.
3. Select the LABEL tool. Click on each of the little nets and attach the labels.

Milling trouble shooting
1) Tracks thinner then expected?
Make sure you are exporting it at 2000dpi

2) Tracks are not smooth?
Make sure the modela plateform is tight and sturdy.

3) 



FAQ

1) Moving group - First type group cmd and use press and  drag method to group components , right click and select "move group"

2) Changing all track width. go to Edit-> channge a list will open at the bottom go to width and select desired width and than click the track who's width you want to change.

3) Alternate - altium

4)

" The same can be done for "User Language Programs" or, for example, for the "Projects"
branch. By the way: User Language Programs (ULPs) are more or less simple, C-like
programs that can be used for a variety of tasks. It is possible to export data from your
schematic or layout into any format. There is for example "dxf.ulp" which creates DXF
data or "bom.ulp" for creating a bill of materials"

"session"

Idea - circuit design - board design - fabricating board - testing - loopback or deploy

echo board, circuit diagram
 - microcontroller with reset circuit and crystal
- ISP connector
- FTDI serial connector

new project then new schematic - microcontroller power supply - rest circuit - crystal - programmer and ftdi connector.

No comments:

Post a Comment