EENG 393

In Lab 2 - VU Meter Layout

Requirements

When you have worked through all the material in this lab writeup, please take the inLab 02 Quiz. You may find quiz questions to be similar to, but not identical to the numbered questions in this inLab write up. Note, you wil have 60 minutes to complete the ten questions in the Canvas quiz so it would be a good idea to complete all the inLab activities before taking the Canvas quiz. Do not turn in the answers to the numbered questions in this inLab writeup.

Integrated circuit packages

The heart and soul of most electronics devices are integrated circuits (ICs), collections of metal oxide silicon field effect transistors (MOSFET) photographically etched onto the surface of thin slices of silicon. Silicon is one of the primary ingredients in glass, and like glass, ICs, are very fragile. Hence, the silicon slice is encapsulated in plastic resin and connected to the outside world bonding wires connected to pins (leadframe). This combination has proven to be very reliable in operation and inexpensive to manufacture in large quantities.




There are a wide variety of IC packages to accommodate the wide range of applications they are asked to serve in. A few are shown in the image below.


Despite outward differences in shape and size, IC packages share some common characteristics which are well worth knowing.
Package type
The package type refers to the shape of the plastic package and pins.
  1. Do some Internet searching to complete the following table using the parts in the image above. In the "abbreviation" column, use the abbreviation closest to the Full name of the device. In the image column list a letter [A … J].
    Abbreviation Full name Application image
      Small outline package Production surface mount  
    TO-220 TO-220 Power devices  
    TO-220-5R TO-220-5R Power devices  
      Plastic leaded chip carrier Replaceable high pin-count devices  
      Ball grid array High pin count performance chip  
    QFP Quad flat pack Production surface mount  
      Dual in-line package Through hole prototyping  
    SOT-23 SOT-23 Low power devices  
    TO-92 TO-92 Low power through hole parts  
    QFN Quad Flat No-lead Production surface mount  
Index pin
Many IC packages have multiple axis' of symmetry, making it possible to install the IC incorrectly on the PCB. Even when IC orientation is more obvious, manufactures will often add visual clues to indicate one particular pin on the package. This index pin is often labeled pin 1 in the IC's technical documents. There are a variety of methods vendors use to identify pin 1 including special markers printed onto the surface of the IC, special markers molded into the surface of the IC package, and physical differences in the length or shape of the pins.

Printed methods include a small circle to indicate a particular pin, or a stripe of paint to indicate the "top" of the part. When an IC is held so that the dot is top left, or the strip is at the top, pin 1 is the top pin on the left side with pin numbers increasing downward along the left side and then continuing from the bottom-up on the right.

There are several ways to indicate pin 1 by molding features into the IC. The simplest is to mold a round indentations next to pin 1. Some manufactures will bevel a long edge on rectilinear ICs. When you orientate the IC so that the beveled edge is on the left side, pin 1 is the top pin on the left side. On square IC packages, a corner may be nipped off. When the IC is orientated with the nipper corner as the upper left corer, pin 1 is the top pin on the left side.


Many 2-pin polarized through-hole devices are symmetrical enough that they can easily be installed backward. One physical clue to the orientation of these devices is to note the length of the leads. If there is a noticeable difference (greater than 0.5cm), then it's a good bet that the longer lead is the positive potential, and the shorter lead the negative potential of the device.
Manufacture
In some of the larger IC packages, the vendor has the luxury of being able to print their entire name. With more limited space, the vendor may only be able to fix their logo. The following image, coutsey of www.electronicspoint.com lists many of the leading semiconductor manufactured and their associated logos.
Part number
The part number for many devices are surprisingly complex creations, with far less randomness that you would expect at first glance. You can read about manufacture specific coding standards by reading through a document like National Semiconductor Marking Convention.
Date Codes
Often you will find a four digit number sandwiched between two non-numeric symbols printed on the surface of an IC. This may be a date code, the date the IC was manufactured. The first two digits are the decade and year the IC was manufactured. The last two digits are the numeric week number (1 - 52). For example if a chip had "1138" printed on its surface, it's a fair guess that it was manufactured in the 38th week of 2011. Date codes have been used on ICs for a long time - take a look at this super clean Apple 2 motherboard similar to the one that I learned to program on.
  1. Make an educated guess about the date the board was assembled by looking for the most recent original chip on the board.

PCB structure

Once the schematic is complete it's time to layout the physical board, the printed circuit board (PCB). The PCB structure is illustrated in the following diagram. Each of the numbers in the diagram is explained in the numbered text which follows.


Note, the following are not question numbers, but identifiers to the figure above.
  1. Fiberglass substrate (FR4) - If you look at the PCB edge-on you will see a tan colored plate of material that composes the majority of the PCBs volume. Our PCBs are made from most common substrate called FR4. The "FR" in FR4 stands for Flame Retardant meaning that this material self-extinguishes once a flame is removed.
  2. Trace - The fiberglass substrate of our PCB is laminated with a layer of copper on the top and bottom sides. The thickness of this copper is stated in terms of weight (in ounces) per square foot. Our boards are fabricated with 1 ounce copper which results in a copper thickness of 34µm. During the manufacture of the PCB, copper on both sides is selectively etched away to form the pattern on copper that you see. A trace is a thin strip of copper that forms a wire connecting two or more terminals. Laying out the traces on a PCB is the most time consuming task when designing a PCB. Traces on the top of the board are red and traces on the bottom of the board are blue.
  3. Plated through-hole - There are a variety of reasons that we need to put holes in a PCB. For example, you might need to mount a through-hole component, or cross a pair of traces without electrically connecting them. When holes are put into a PCB we most often plate the sides of the hole with a conductive material so that an electrical signal can pass from the bottom of the hole to the top. If you look carefully at the hole in your PCB you will see that they are shiny.
  4. SMT pad or SMT land - In order to attach a surface mount component to the PCB, part of the solder mask is removed from each contact point between the component and the PCB. Each of the exposed copper areas is coated with solder producing a shiny silver surface called a pad or land. The set of exposed pads associated with a component is called the component's footprint on the PCB.
  5. Solder mask - The solder mask is the green (or blue) coating over the majority of the PCBs surface. It performs three useful functions; it provides a modest level of electrical insulation for the copper it covers, it protects the copper from oxidation, and it helps prevent solder from sticking to areas you do not want soldered.
  6. Top copper pour - Only a fraction of the top layer is covered in traces. The unused copper on the top layer is often put to use by a PCB design by having it carry a power voltage, in our case 3.3v. Consequently, anytime a device needs power, it will connect to excess copper in the top layer. The term "pour" is used to conjure the idea that the copper is poured onto the PCB in a liquid state, flowing to all available regions not occupied by some PCB feature.
  7. Bottom copper pour - The unused region of the bottom side of the PCB is almost always connected to the ground. This is most frequently called the "ground plane". Since many components need to be connected to ground, there are a lot of holes through the board that connect to the ground plane.
  8. Silk screen - the silk screen is the white text on the PCB. Generally the silk screen tells you where you to place a component and the components value. The part identifiers on the PCB should exactly match the part identifiers on the schematic.

EAGLE layout

The goal of this weeks lab is to give you some experience actually laying out a PCB based on the circuit that you built last week with one modification. After laying out your PCB, you will compare your work against my layout of this circuit to gain some insight into other ways to solve this problem. The schematic for the circuit you will be laying out should look familiar and is shown below.


I have provided lots of material to get you started with this lab. The next circuit will require you to make all these materials for yourself. These files include:

EAGLE CAD - Getting started

Let's start off by getting EAGLE setup and the starter files that I've proved in the correct locations. Before you start on the instructions below, it would be a good idea to place a directory structure for this class on your Hornet drive. I have a EENG393 master directory for all course content. In this folder I have a lab directory which contains all my lab work. I then have a lab01, lab02 &helips; directory for each lab - the "01" allows a alphabetic order to retain the numerical order of the labs when we get to labs 10 and later. In each lab0x directory I have a inLab folder and a postLab folder for work performed during and after lab respectively.

Create a directory for lab02 and a subfolder for inLab work. Now continue with the instructions below.

Schematic Layout
For this lab, I've given you the initial layout. In future labs, you will have to create an initial layout. You can do this by switching to the layout view using the Generate/switch icon shown in the image below. When you first make this switch, the EAGLE software will throw a pop-up and ask you if you want to create a board. Answer Yes. After you do this, you can switch between the schematic and layout views of your PCB using the Generate/switch icon - it is in the same location on both the schematic and layout screens. Click it a couple of times to switch back and forth between the schematic and layout.


Ok, we are ready to layout that PCB, but wait, what are we looking at???


EAGLE CAD layout - the quick overview

Like most (all?) PCB design tools, EAGLE presents the you with an overhead view of the PCB. You are looking down through the PCB seeing all the layers. The colors of the objects tells you about what layer they belong to and as a consequence what they mean. In the image below the board outline is orange, part outlines white and the component pads green. In order to complete the layout of this circuit you will need the tools identified in the left menu bar - we will examine these next.


Please take a minute to read through the following descriptions of what is going on in this image. While you are reading through, try clicking on the tools and experimenting. If you really goof something up, you can always re-download the files and start again.
Grid Size
When moving components or laying wires, your moves will be in increments of this size. You should make 50 mils the default for component positions and 20 mils the default for laying out wires. I'll show you how to change this before you start routing wires.
Cursor location
This piece of information is useful when you are trying to line up components or set the outline of your PCB.
Information tool
Use this tool to get information about a component or trace.
Layer tool
Allows you to hide or view the different layers of a PCB.
Move tool
Allows you to move (and rotate) components and traces.
Route tool
Allows you to convert unrouted wires into traces on the PCB. This is probably what you think about when you think "PCB layout".
Ripup tool
Allows you to convert a trace into an unrouted wire. Useful when you want to reroute a trace on the PCB - this happens a lot. You will also need to use the Ripup tool to hide copper pours - more on this later.
Ratsnest tool
Would you just look at that messy collection of components and unrouted wires. Ratsnest allows you to refresh the layout. This is useful when you move a bunch of components, or lay down a lot of new traces.
Part handle
In order to select a component with the move tool, you need to click on the part handle - a lightly marked cross hair. Maybe it's just me, but often have a very hard time finding the parts handle because there is no standard location for the part handle. When this happens to you, zoom-in on the part and click madly about, remembering that the part handle does not need to be inside the part outline.
Board outline
All your components and traces need to be inside this outline. Try to move something outside this boarder and EAGLE will complain and not allow it. A plain board outline is orange; I've added two copper pours to the board in order to simple layout - more on this later.
Board origin
Your boards should always have their lower left corner on the board origin. The origin always has a white cross hair over it.

Layer tool

You may find it helpful to occasionally suppress or select layers to view when laying out your PCB. The layer tool provides you with complete control over which layers are visible. Note, invisible layers are not deleted. Click on the Layer tool and you should see the following pop-up.


Layers 1 and 16 are the Top and Bottom copper layers - the conductive traces on the printed circuit board. Try selecting the "Select None" or "Hide Layers" button, everything is gone! Now try selecting a few layers clicking on the eye to the left of the layer name (or anywhere in the row). Click on "Select All" or "Show Layers". A handy feature is the preset layers - they are preset collections of layers with names. Try clicking on the "Layer Sets ↓" pull-down and select "Preset_Top". When you do, you will see a subset of the layers selected and shown in the layout. For the time being click on the "Cancel" button to go back to the default view.

Fortunately, you do not need to work with all 256 layers right from the start. For the time being, we will focus on the following layers.
Layer Name Function
1 Top Top copper foil - traces on the top of the PCB
16 Bottom Bottom copper foil - traces on the bottom of the PCB
17 Pads Ring of copper surrounding through holes. Used to solder device pins to board.
18 Via Electrical connections between the top and bottom layers.
19 Unrouted Air wires that form logical connections between electrical devices that need to be replaced by wires in the top or bottom layer.
20 Dimension The outline defining the edge of the PCB. Called "Board outline" above.
21 tPlace Silk screen text placed on the top side of the PCB.
25 tNames Silk screened component names placed on the top side of the PCB.
25 tValues Silk screened component values placed on the top side of the PCB.

Moving around the layout

There are times when you will want to zoom-on and view a small area of the PCB. You could use the magnifier glass +/- icons at the top of the window, but there is a better options, the scroll wheel. The center scroll wheel on your mouse allows you to zoom in and out of the layout, centered on the current mouse position. Scrolling forward (away from you) zooms in and scrolling backwards (towards you) zooms out. When you get comfortable with this you will never need to use the slides on the side of the layout window to adjust what you are looking at, you'll just zoom in and out.

Move tool

The Move tool is designed to allow you to adjust the positions of the components and traces on the PCB. You are going to need to move the unplaced parts into the board outline as part of this assignment. Move the parts to minimize the overlapping wires in the design. This is an art that you will need to practice in order to get better at. Move a few parts inside the board outline. Don't make too much of this as you will move more parts in later steps.

Pro-tip when placing components, the schematic is a useful tool. Take a look at the schematic and, to some extent, try to copy this organization in the layout.

Ratsnest tool

The Ratsnest tool probablly gets its name from the messy-looking collection of unrouted wires that litter a layout when it's first started. Whatever the reason for the name, use this tool whenever you want to refresh/redraw the layout. Try clicking on the ratsnest tool now. You will see two things: That's pretty much it about the Ratsnest tool. However, I think you might have some questions about that red (and blue) areas. Let's dive into this now.

If you look closely at a fabricated PCB you will notice that a small portion of the board is dedicated to traces connecting components, but the vast majority of the surface of the PCB is unused copper. It may look unused, but most/all PCB designer use this "left over" copper to route power and ground.


EAGLE CAD allows you to do this using the Polygon tool - I already set this up for you on this first board. It is tradition to use the spare copper in the top layer to route the positive supply rail (VCC in our case), and the bottom layer to route ground (GND in our design). This spare copper is often called a copper pour because you can imagine that we are pouring the liquid copper over the parts of the board not containing traces. If you look closely at the LM324 you will see that that top copper pour (in red) is connected to the green VCC pad through four red lines attached to the red pour. The same goes for the GND pins of the LM324. We learn how to associate a signal with the copper pour in a later lab.


While these copper pours are very useful, there are many times when you don't want to see the pour as you are laying out your PCB. To make the copper pour invisible (but still there), click on the edge of the copper pour (red or blue dotted line) with the ripup tool. However there is a complication with this because the perimeter of the board has three different objects on it - the outline on layer 20, the top copper pour on layer 1, and the bottom copper pour on layer 16. When you click on the edge of the pour, EAGLE does not know which of these three layers you want to ripup because they are all coincident. When this happens you need to choose the layer using the following procedure:

Information tool

Shockingly, the Information tool will provide you with the information about any component whose handle you click on. Note, the handle for an object can be tricky to locate, especially when it's coincident with the silk screen. Let's experiment with the information tool and its options. Click the Information tool from the left menu bar and click on the LM324's part handle this is a small cross-hairs in the middle of the IC, near the letter "L" in "LM324". Note, the component handle will not always be in the middle of the component. When you've done this you will get a "Properties" pop-up shown in the image below.


Name
The name of a component is given a default name that can be changed.
Position
The two boxes for the position are the X and Y coordinates of the component. You can also change the position of the component using the Move tool - you did this in a previous step.
Mirror
Moves the component to the bottom layer of the PCB. There is also a Mirror tool on the left menu bar especially for this operation. We may use this tool later in the term.
Angle
The angle of the component. You can also change the angle of the component by right mouse-clicking the component while it's selected with the Move tool.
Spin
Let's you flip the orientation of the component Value
Locked
Locks the position of the component on the PCB and will not allow the component moved until this box is unchecked.
Smashed
Let's you move the Name and Value of the component on the board independent of the position of the component. This is important when you are trying to make your board readable for the assembler.
Let's use the Information tool to make adjustments to resistor R5's position. Do this by first clicking on the information tool in the menu on the left side of the window. Next click on the component handle for the R5, this is a small crashers in the middle of the resistor. Note, the component handle will not always be in the middle of the component. When you've done this you will get a "Properties" pop-up. You can manually enter the position (first coordinate is X and the second coordinate is Y). Do future you a solid and make the position (500, 1300).

Route tool

Finally, it's time to lay some tracks on the PCB.


Make sure that your route tool setting match those in the image above - you will need to adjust the Width. Now let's route an unrouted wire using the following steps. To start this exercise, place: You should have something that looks like the following image.


Look at the top menu in the EAGLE CAD window, Now select the route tool in the left toolbar by clicking on it. Now look back at the top toolbar, it's changed. The top toolbar is context sensitive - it changes its function depending on which tool is currently selected.
  • With the bottom trace still pending, click the center mouse wheel. You have just added a via to the end of your trace. A via will allow your trace to move between layers - in this case from the bottom to the top layer,
  • Move the mouse and watch the trace/via combination move around the board,
  • left mouse click in some empty space on the board between the N$1 pad and the LM324,
  • Move the mouse. The via acts as a waypoint, the top layer trace is trailing from the via to the current mouse location,
  • Click on the target N$1 pad on the LM324 to complete the route,
  • Ripup the track that you just laid.

    Vias

    The word "via" comes from Latin and means "by way of" a reference to roads. In electronics design, we use the term "via" to mean a conductive holes placed along a routed wire that allows the signal associated with that wire to move between layers. You will be designing 2-layer PCBs, so your via's will move between the top and bottom layers.

    You will need via's because there are circuit configurations that cannot be routed in a single layer. Even through you should not need via's in the current layout, let's experiment with them so that we know how to use them for later assignments.

    Look at the top menu in the EAGLE CAD window, Now select the route tool in the left toolbar by clicking on it. Now look back at the top toolbar, it's changed. The top toolbar is context sensitive - it changes its function depending on which tool is currently selected.