E72 Lab #1

Schematic Entry and PCB layout

In this lab you will be using a program to enter a schematic and lay out a printed circuit board (PCB) that will then be manufactured.  At this point of the semester you don't know enough to design your own circuit, so I am giving you one that we will use again later in the semester.  The program that we will be using to do the schematic entry is called Multisim and the program for the PCB layout is called Ultiboard   This lab will serve as an introduction to schematic entry and PCB layout.

You will be doing this lab while seated at computers that have web-browsers, so you need not  print these directions unless you prefer to have hard-copy at your side.


The Lab

Schematic Entry

Starting out

Step 1.  The software for this lab should be on any of the PC's in room 310 or 314 of Hicks.  Log on to one of the computers and start the program called "MultiSim" (it is in the "National Instruments/Circuit Design Suite 11.0" program group).  The schematic defines all the interconnections between various circuit elements.

First, we'll add a title block to identify the schematic as your own.  Now download the file SwatTitleBlock.tb7 and then from the MultiSim menu choose Place→Title Block and choose that file.  Place the title block onto your schematic.  After placing it, you can right-click on the title block to move it exactly into place (e.g., the lower right corner).  Now double click on the title block and change the data in the block to reflect your circuit.

Save your circuit -- You should save your circuit in your student  folder (not the Multisim folder).   Files stored on the local PC may be deleted.  Also, having the files stored remotely allows you to work on your design from any of the PC's running Multisim.  Make sure that the filename is unique -- some permutation of the names of the people in the group is good.  You will be emailing me your design later on, and a unique name will keep your design from being confused with another.

Picking Components for the Schematic

Step 2.  At this point we want to pick the components that will be in your design and put them on the schematic diagram.  Go to Place→Component and select the "Corporate" database, then select the "Misc Digital" group and finally select the "S-MSP430H1232" as the component by hitting the "OK" button..  If you can't find one of the parts, hit the "Search..." button on the right side of the dialog box; this should make the missing parts appear.

Place the component anywhere on the diagram.   This component is a microprocessor (or microcontroller, since the chip also has many peripherals).  Later in the semester we will program this to do some data acquisition and system control.  Pertinent connections on the microcontroller include:

The rest of the components are listed in the table below.  They are all in the Corporate database.  Note that some components are used more than once, so you need to place multiple copies
Quantity Group Family Component Description.
1 Basic LED LED-G
(or LED-R)
This LED will be used as an indicator that power is applied to the microcontroller..
1 Basic LED LED-R This LED is controlled by pin B1 of the microcontroller.
2 Basic Resistor 470ohm Used to limit the current through the LED's.
Note: When placing resistors, make sure the "Filter" setting in the dialog box is set to "ALL."
3 Basic Resistor 10kohm One is used to pull unconnected pins  to Vcc, a logic level of 1.  The other two are used in voltage dividers.
2 Basic Resistor 20kohm Used with 10k resistors in voltage dividers.
1 Basic Resistor Potentiometer

The potentiometer  is a variable resistor that lets us apply a voltage between 0 and 5 volts to the microcontroller.  If the wiper (the arrow) is near the bottom, the voltage is near 0.  As we turn the potentiometer, the voltage increases to 5 volts as the wiper approaches the top.

2 Basic Capacitor 0.1u

As you know, the voltage across the capacitor likes to remain constant (it takes energy to change it).  We use this fact to keep the 5 volt line from varying as the current to and from it varies by placing a capacitor between the 5 volt line and ground. 
Make sure the "Filter" setting in the dialog box is set to "ALL."

2 Basic Capacitor 10uF
1 Misc Connector E72_Brd2010 The connector is used to attach to circuits on a breadboard that you will make in later labs.
1 Electro_
Mechanical
SSwitch PBS When the input switch is not pressed, the pin RB0 will be at 5 volts (because of the pull-up resistor).  When the switch is pressed, RB0 is at 0 volts because the switch is connecting it to ground.
1 Power Regulator_Ref S-MCP-1700_3.3 A voltage regulator that take will convert 5V (Vdd) to 3.3V (Vcc) for our microcontroller.

Next you need to place some components from the MultiSim database.  Go to Place→Component and choose

  1. Database:  Multisim Master
  2. Group: Sources
  3. Family: POWER_SOURCES
  4. Component: Vdd

Place two or three Vdd symbols on your schematic.  Also place two or three GROUND and  Vcc symbols symbols from the same Database, Group and Family.  As you are doing your design use as many or as few of these power symbols as you need to make a neat drawing.

Your schematic should now look something like the circuit shown below.

Schematic w/o connections. 

Step 3.  Now you need to make all the connections.  Lets start with some simple ones.

The first LED (L1in my diagram) will indicate that power is applied to the circuit.  To make this work we simply put the LED between Vcc (3.3 volts) and ground (0 volts).  We also include a 470 Ω resistor to limit the current so the LED doesn't burn out.  To do this drag the components into position, then wire them by clicking on a connection point and dragging to the connection point on another symbol.  To rotate elements, simply select them and the do a right-click to get options on what to do (or hit ctrl-R).  Also place the three capacitors between power and ground, making sure that the positive side of the 10 μF capacitor is connected to Vdd.  These capacitors help to keep the supply voltage constant as the current drawn by the circuit varies.  The resulting circuit is shown below.

 

Complete the rest of the connections as shown in the diagram below.  Your diagram may look substantially different than mine, depending on the placement of your parts.  Neatness counts -- make your diagram as neat as possible.  Note, wires that cross but don't have an intersection symbol (a dot, as shown above) are not touching.  (pdf version of circuit)

Finished Schematic 

Important:  Double check all your connections.  Have one member of your group read off connections from my diagram while another checks it against your own diagram.  This sound tedious, but takes little time.  Any connections that get fabricated incorrectly are much more difficult to change later on. 

Save your schematic.

PCB Layout

Step 4.  From Multisim, save your schematic.  Now go to Transfer→Transfer to Ultiboard 11.  Save the files that are created in the same directory you saved your schematic (your student folder).  Hit "OK" on the "Import Netlist" window.  Your window should look something like the one below:

Step 5. The objects at the top of the screen are the components that form your circuit, the large yellow rectangle is the circuit board.   The circuit board is large than we want.  To make it smaller, select the "Layers" tab in the lower left corner and select "Board Outline".  Now use the cursor to select the yellow rectangle, then right-click and choose "Properties".  Change the width to 3000 mils (thousandths of an inch) and the width to 1250 mils to define a board that is 3x1.25 inches.  (Note: you must use 3x1.25" or 1.25x3 because all boards must be the same size because they are fabricated in a rectangular array).

Step 6.  Move the component onto the board.  Exact location is not important except for the following:

  1. You should turn off "Part-shoving."  (Go to DesignPart Shoving to turn it off).  Part-shoving keeps you from placing components on top of each other (but our design requires parts to be on top of each other).
  2. Put the E72_Brd2010 should be centered on the board.  You should then lock it in place (to do this, right-click on it and hit the lock icon).
  3. Put one of the 0.1 μF capacitor (e.g., C2 in my design) near pins 2 and 4 of the microprocessor: S-MSP430H1232(the square pin is pin 1, and then the numbers increase in a counterclockwise direction).
  4. Place two other capacitors (C1 and C3 in my design) near the voltage regulator.
  5. You may rotate components, but do not do a "Flip Horizontal" or "Flip Vertical" as this will make the layout incorrect.

You will get errors that tell you that parts are overlapping with the E72_Brd2010 part.  You can ignore these, but fix other errors. 

A general rule to follow is to place components that are associate with each other on the schematic near to each other on the PCB layout, to minimize trace lengths and to make routing the wires on the board easier.  The light blue lettering may be moved anywhere - it will not appear on the final board.

Neatness counts in your board layout as well as in the schematics.  You may want to move component labels to make the diagram clearer.  Also, rotating components often makes connections more direct.  Circuit connections are shown by the yellow lines called, appropriately, the ratsnest.  Force vectors (in brown) show, approximately, where a component should be placed to (approximately) minimize trace lengths.  Note that judicious placement of parts can significantly simplify the ratsnest (and resulting PCB).  The following diagrams show too possible layouts.  Note that one looks much cleaner than the other.

Gallant's Good Layout Goofus' Bad Layout
Gallant No Routing  Goofus Norouting 

Now, add some text.  The light blue text will not be put on our boards -- there is an added charge, and increased time required, for that.  Instead we will put our text down in copper. Hit the "Layers" tab (as you did to select the board outline).  Now select the layer labeled "Copper Top".  You can now add some text to the board.   I added text to show what the LED's and push button do, and my name.  Go to Place→Graphics→Text.  You should add some text that will uniquely identify your board (like your name).  My completed layout is shown later.

Most of the connections on our PCB will be 10 mils (1 mil=1/1000 inch), but we will make the power connections (with somewhat higher currents) 15 mils.  To set the trace widths, Go to View→Spreadsheet View  and select the Nets tab and then select all.  Set the "Trace Width" to 10 and set the "Trace Clearance" to 10.  Now select Net 0 (Ground) and set its width to 15 mil.  Do the same for the nets Vdd and Vcc.

Step 7.  Now lets set the rules for the boards.  Go to Edit→Properties

  1. Go to the "Copper Layers" tab and set "Layer Pairs" to 1.  We will have two copper layers, one on top of the board, and one below.  More elaborate boards can be made with several layers embedded within the PC board itself.  Hit "Apply".
  2. Go to the "Design Rules" tab and set the "Vias -- Drill Diameter to 28".  Also set the "Vias -- Pad Diameter to 40".  A via is a connection that is made to get a copper trace from one side of the board to another via a hole drilled in the board.  Hit "Apply".

Save your design.

Step 8.  All that is left is to make connections.  To do that go to Autoroute→Start/Resume Autorouter.  I This may take a few seconds (a bad layout takes longer, and may ultimately fail).

A completed board is shown below.  Note that the left board has a much neater appearance - this, in general, makes life easier if (when?) something goes wrong.

Gallant's Good Layout Goofus' Bad Layout
Gallant Routed  Goofus Routed 

To make sure everything was properly connected go to Design→Netlist and DRC Check.  (DRC stands for Design Rule Check - this ensures that all the nets are connected properly, and that all design rules are obeyed - e.f., there is sufficient spacing between traces...).    There will be Design Rule Violations (shown as red circles) because parts overlap with the "E72_Brd2010" connector.  You can ignore these, but if you get any other errors and can't fix them yourself, please contact me so we can figure out what went wrong.  (Occasionally two traces are routed too closely together, if you grab one with the cursor you can usually "nudge" it to make the violation go away).

Also make sure all the connections are made with Design→Connectivity Check and check all nets.

Any mistakes (Netlist, DRC or Connectivity) will come back to haunt you.  Double check (or have me check) to make sure there are no problems.

Image of completed board with text on Copper Top layer

One last thing

Read Aron Dobos' ('06) description of how to mount surface mount parts, and then set up an appointment with me to help you put together a small board with surface mount parts.  It should take less than an hour.  The purpose is to get you acquainted with how we assemble boards with surface mount parts.  You may not need to do this again, but it might be very useful because many newer parts only come in a surface mount version (i.e., not through hole).

A schematic of the board is below, along with an image of the printed circuit board.  It consists of 2 RGB (Red Green Blue) LED modules, a resistor array, and a connector.

LED Board SchematicLEDBrd Layout

Finishing up

To finish up

  1. Print out 2 copies of your schematic from Multisim, one for you and one for me.  Go to File→Print Circuit Setup and make sure "Fit to page is selected."
  2. Print out 2 copies of your layout from Ultiboard.  Make sure you choose the option Zoom Options→Fit to Page in the print dialog box.  Choose the layers
    • Copper Top
    • Copper Bottom
    • Silkscreen Top
  3. Email me a copy of your Ultiboard file.  It is the one with the filename extension ".ewprj".  Make sure
    • the name of everybody in your group is on the email.  
    • that you save the file before you attach it to your email (so I don't get an unrouted file).
    • that the filename is unique -- some permutation of the names of the people in the group is good.
  4. Turn in a copy of the printouts for me, and keep one for yourself.  Make sure you the name of everybody in your group is on the printouts.

Congratulations, you have finished the first lab!  Be sure to turn everything in by Thursday at noon.  I will send the circuits out to be fabricated over the weekend.