Professional Documents
Culture Documents
ORCAD Tutorial
by
Eur Ing Dr. Simon Sherratt.
Electronic Engineering
7 EXPORTING TO PCB............................................................................................ 23
7.1 TO CONNECT A POWER CONNECTOR ...................................................................... 23
7.2 PCB FOOTPRINTS .................................................................................................. 24
7.3 ENTERING PCB FOOTPRINTS................................................................................. 25
7.4 GENERATING A LAYOUT NETLIST................................................................. 25
7.5 INVOKING LAYOUT ............................................................................................... 26
7.6 WHAT IF THE ECO UTILITY REPORTS ERRORS?..................................................... 27
7.7 POSITIONING COMPONENTS .................................................................................. 27
7.8 DEFINING WHICH LAYERS AND TRACK THICKNESS TO USE .................................... 28
7.9 STARTING THE AUTOROUTER ................................................................................ 28
7.10 CREATING A COPPER POUR .................................................................................. 28
8 PRINTING................................................................................................................ 29
8.1 FINDING THE BOTTOM LAYER. ............................................................................. 29
8.2 PRINTING THE BOARD DESIGN ............................................................................... 29
9 OPTIONAL ADDITIONAL TOUCHES ............................................................... 29
9.1.1 Pad resizing .................................................................................................. 29
9.1.2 Adding text. ................................................................................................... 29
SE2P6 Engineering Applications (Anemometer Project) 2
Project Supervisor: Dr Simant Prakoonwit
www.reading.ac.uk/~sis04sp
ORCAD Tutorial
9.1.3 Increasing the size of the white box (route box) in Layout. .......................... 30
INTRODUCTION
The aim of this booklet is to take you through the process of schematic capture, mixed
mode simulation and creating a printed circuit board layout. You will be taken through
each stage step by step in tutorial fashion.
This booklet will serve as invaluable reference material for the upcoming EA1
(anemometer) project and your electronic projects throughout your course.
Firstly, this chapter describes the Computer Aided Design (CAD) tools available to
you. It then describes the generic process of simulation using Spice and finally describes
a demonstration project that will be the theme for this tutorial. This project contains both
analogue and digital components.
This tutorial assumes that you are familiar with Microsoft Windows, for example
manipulating windows, printing, load, save and the mouse operations.
Place a part from the current library or to add libraries to your project
Click this to place a generic ground. Be careful, as there are lots of types
of ground. The simulator needs ground 0. IC's expect GND
Click this to connect your components with wires
Component Description
A diode which has had its type field changed to OSCILLATOR and its
D1 label is D1
OSCILLATOR
VCC
Symbol to tie the connected node to a node termed VCC. Its use is to
save on lots of wires, in your design, which would connect back to the
supply.
The Electronic Engineering Division has been using CAD tools from OrCAD for
many years. You will be using OrCAD for Microsoft Windows. OrCAD is very costly
and probably the most comprehensive set of EE CAD tools currently available for the
PC. However, you will only be using some of the features as:
• Schematic Capture. This is used to enter, or draw, your circuit on the PC.
• Mixed mode simulation. This is used to simulate the behaviour of your circuit. Mixed
mode means that the simulator can operate on a circuit with both analogue and digital
parts, unlike just an analogue simulator or a digital simulator.
• Automatic netlist extraction. This is the process of describing your schematic drawing
in a standard textual form. This description contains what devices you have, what
connections you have made and the types of packages (or Printed Circuit Board
(PCB) footprints) you are using.
• Layout. This is the process of using the netlist description to logically connect the
actual pins and wires of your components onto a PCB.
These software tools are available by clicking on Start / Programs / Cadence PSD
where you will be presented with a selection of tools available to launch. The individual
tools are described in the relevant sections below.
This tutorial does not yet cover the VHDL, FPGA (Xilinx etc), PAL, GAL, CPLD
and digital simulation tools that OrCAD contains.
In this experiment, you will become familiar with the process of electronic circuit
simulation (in-circuit emulation) using a common tool termed PSpice, but first a word
about Spice.
For many years, the industry standard package for circuit simulation has been Spice,
which was invented in the 1960’s. Spice is capable of predicting the behaviour of an
SE2P6 Engineering Applications (Anemometer Project) 6
Project Supervisor: Dr Simant Prakoonwit
www.reading.ac.uk/~sis04sp
ORCAD Tutorial
electrical and/or electronic circuit. The first Spice used paper tape to describe the circuit.
However, nowadays Graphical User Interfaces (GUI) within CAD tools enable the user
to draw the circuit using a computer drawing package. The drawing is then textually
described and passed into the Spice package for simulation.
A Spice package written for the PC is termed PSpice and many companies offer
various PSpice simulation packages. You will be using the PSpice tool within OrCAD.
You will be using the schematic capture tool to enter your schematic (circuit drawing).
When instructed to do so, the computer will invoke the automatic netlist extraction to
create a numerical description of your drawing (termed a netlist). The netlist file and a
user specified simulation parameter file will then be passed to PSpice for mixed mode
simulation. Once you are happy that your circuit is working, then you commit the design
to a PCB layout with a high degree of certainty that it will work.
In this tutorial, you will be simulating and generating a PCB layout of a mixed
mode circuit (i.e. a circuit with both analog and digital components). For this tutorial, the
actual circuit does not matter. What is of importance is the process of capture, simulate
and PCB design methods described in the tutorial.
In order not to distract from the learning process, the circuit chosen is very simple and
should not take up too much of your time. The circuit is based on a 555 timer IC to form
a clock. The clock signal is then passed to a 74 series 393 IC that contains 2 separate 4 bit
counters. You will be using one of these counters to drive 4 LED's. The LED's will turn
on describing the count sequence.
You may start your project on any of the EE PC's that have access to the OrCAD
There are 4 types of projects that OrCAD has to offer. These are:
• Analogue or mixed mode circuit design. This is the type of project of interest
for this tutorial.
• PC board. You select this type of project if you want to target your project
straight to a PCB design.
• Programmable logic project. You select this type of project if you want to target
your project as a CPLD or FPGA design. The project will configure libraries based on the
vendor (manufacturer) you choose to target.
• Schematic. You select this type of project if you want to create a project that is
NOT specifically targeted for vendor specific devices or PCB.
The purpose of specifying your project is to tell OrCAD what libraries of components
you will need. However, you may change your project and add libraries later in the
project.
*** When you do the Anemometer project, you will be selecting the Schematic project.
− enter My tutorial in the name box (or what you would like to call it)
− Select Analog or Mixed-Signal Circuit wizard(or A/D depending on version)
− In the location box, i.e. where to save the project, Click Browse.
− Select the N; drive.
− Create an Orcad folder for present and future designs.
The project will then require a set of libraries to be selected that contain electronic
components. You need the following libraries. (add them by clicking the >>Add button):
− analog.olb
− source.olb
− anl_misc.olb
− 74ls.olb
− opto.olb
SE2P6 Engineering Applications (Anemometer Project) 9
Project Supervisor: Dr Simant Prakoonwit
www.reading.ac.uk/~sis04sp
ORCAD Tutorial
As you don’t need some of the default libraries, remove the other libraries:
e.g.
− connector.olb
− system.olb
Once you have all the 5 required libraries in the 'Use these libraries' window we
are ready. Don’t worry if you have a design and later decide that you need a component
that is not in your selected library list, as you can add and remove libraries later.
In this section, you will be drawing just the clock part of your circuit using the capture
tool.
In line with common practice, you will be entering your circuit in 2 parts, firstly the
clock oscillator and then the counter. You will enter the clock circuit, simulate it and then
enter the counter part, which will be clocked by the clock circuit you previously entered.
U1
555alt
R1 8 4
220K
VCC RESET
7
DISCHARGE 2
6 TRIGGER
R2 THRESHOLD
220K 5
V1 CONTROL 3
5V C3 OUTPUT
GND
100n
1
C1 D1
0.47u MLED81
C2
10n R3
220
To place a resistor:
From the place part window, just select the Analog library (by clicking on it)
and then scroll down the parts list window and select the R part. A resistor
symbol should appear. Click OK and place the resistor on your worksheet, by
clicking it.
When it is placed, another component will automatically appear. You may either
press the Esc key on the keyboard or click the right hand mouse button and
select End mode.
In schematic terms, each component needs a label, but it does not matter what
the label is (as long as all the labels are different). Therefore, you may have
different component labels from those in figure 1. However, if you wish, you
can edit them by double-clicking on a component (not the label), select the parts
tab on the bottom of the property editor, edit the part reference box then close
the window.
You have the usual copy and paste facilities. However, this will place at least 2
components on the worksheet with the same label. You will need to alter the
label number so as two components don’t share the same label.
To place a capacitor:
Place a capacitor in the same fashion as the resistor, by selecting part C and
changing its value from 1n to 10n, 100n or 0.47u depending on what capacitor
you are entering.
To place an LED:
Place the LED in the same fashion as above, but the component is termed
MLED81 in the opto library.
To place a Ground:
To place a ground symbol you click on the GND button, , select the source
library, and select the 0 component. See the paragraph below:
Important
PSpice expects to measure voltages from node 0. Therefore, it is common
practice to refer to node 0 as 'ground'. This does not have to be the case and
many ground symbols and terminologys exist. As we will see later, Integrated
Circuits expect their ground to be node GND.
Moving components
You may click on components, keep the mouse button down and drag
components around the worksheet.
Unconnected components have a square box around the area where the wire is to
connect. To place a wire, click on the Place wire button, . You must place
the wire into the connection box, rather than just on the symbol. For example:
R3
220
Unconnected resistor with boxes around the connection points.
Go to the bottom right hand side of the schematic window where you will find a
title box (you may need to scroll). Double-click on the word <title> and the property
editor will appear. Enter your name in the title field and it will appear in the title box.
You may now print (scaled to paper size) your schematic and it would be a good idea at
this point to save.
Its often a good idea to have a list of components, their values and a note of where
OrCAD is getting the simulation details for individual components. This is done by
creating an XRF.
To do this, you must go to the project window. This can be done either by
clicking on 'Window' and then select the window with your project name.opj (opj stands
for OrCAD project) or by clicking on the .opj window itself.
Click on the .dsn file (this is your design file holding the schematic file), click on
'Tools' and then 'Cross Reference...'. The Cross Reference Parts window will appear.
As the default settings are adequate, just click on OK. OrCAD generates an .xrf file,
which you may view by double-clicking on the outputs folder in the project window, and
then double- clicking on the .xrf file.
Underneath the Cross Reference option, there is a Bill of Materials option. Here,
Capture will analyse your circuit and give a textual file that you might use for ordering
components from a manufacturer. To create the BOM, select the window with your
project name.opj. Click on the .dsn file, click on 'Tools' and then 'Bill of Materials...'. The
BOM is also stored in the outputs folder of the project window as a .bom file.
You can view its contents by double-clicking on it.
Example BOM.
1 1 C1 0.47u
2 1 C2 10n
3 1 C3 100n
4 1 D1 MLED81
5 2 R1, R2 220K
6 1 R3 220
7 1 U1 555alt
Before the PC simulates your project, you must tell the simulator what type of
simulation to do. When you invoke PSpice, the netlist of your circuit will be
automatically created and passed to PSpice along with your type-of-simulation
information.
Select the schematic window by clicking on it. Click on PSpice and then New
Simulation Profile. Enter a name for your simulation parameters, e.g. “sim 1” (it doesn't
matter), and then click on Create. Then:
Click on OK to finish your definition of the type of simulation you want to perform.
PSpice now knows how you want to simulate your circuit but it does not know what
voltages or currents you are interested in. To do this, click on PSpice, Markers, Voltage
Level and place a marker on the output wire of the 555 (connects the 555 to the LED).
SE2P6 Engineering Applications (Anemometer Project) 17
Project Supervisor: Dr Simant Prakoonwit
www.reading.ac.uk/~sis04sp
Orcad v9.1 Tutorial
Once the markers are attached to a wire then they should change colour, from black to
grey.
Out of interest, also place a voltage marker on the wire to pin 6 of the 555. This is only
for you to see the operation of the circuit.
To simulate the circuit, click on PSpice, Run. Your schematic is automatically saved.
If all is well, the PSpice window will appear and you should see the simulation being
calculated. A graph window will appear within the PSpice window (which you may
maximize) and you should see the square wave output of the 555 timer of period 0.214
seconds (0.143 seconds for the mark and 0.071 seconds for the space). You should also
see the charge/discharge curve of the capacitor.
1. Check that you have done all of the above actions (particularly PSpice simulation
parameters).
2. Check the circuit is wired correctly and the component values are correct.
4. If you are in a class, contact the demonstrator. If not, ask for help from the staff in the
lab, or help from your colleagues. It’s a good skill to be able to fault find!
Experiment with your simulation ! Change the capacitor value, re-simulate and you
should see that the output frequency changes.
Once you are happy with the simulation procedure, change your circuit back to how it
was in figure 1, re-simulate to check its OK and then proceed to the next section.
The second part of this tutorial is a digital counter, the 393 chip from the TTL family.
This chip actually has 2 separate counters in the same package and each counter is 4 bits.
We will use the 555 square wave output to clock the 393, such that for each positive edge
(or rising edge) of the square wave clock input, the 393 counts up 1 state.
The output of the 393 will drive 4 LED’s to indicate the count state.
On the schematic worksheet, click on the Place Parts button, click Libraries, and pick
the 74ls library. Select the 74ls393 and place it on the sheet as per figure 2.
As stated, there are 2 counters per 393 chip. To bring up the second counter, place
another 393 (as per figure 2), double-click on the second chip and change:
− Its part reference to the same as the first 393 you entered, e.g. U2B.
− Its Designator to part B (click on the designator window and pull down part B).
− Close the Property Editor window.
You should have the same U number for each chip and a part A and B on the
worksheet.
OrCAD does not default to showing the power pins on integrated circuits (as do some
packages). If you double-click on part A, scroll along horizontally on the Property Editor
window and place a tick in the ‘Power Pins Visible’ box and close the Property Editor
window. You now are presented with the power pins of the chip.
Important
Notice that the power pins do not have a box to connect wires to. The power
pins are just for show!
OrCAD gives names to the power pins of your chips. If chips share the same
name for their power pins then OrCAD will know they must be connected.
All you have to do is place a power point in your worksheet for each power pin
label and connect it to the proper voltage.
In the 74 series case, all 5v power pins are termed VCC, while all ground power
pins are termed GND. So we have to put a power symbol in our worksheet
termed VCC and connect it to 5V. Place a ground symbol onto the other end of
the 5v supply and label this symbol GND.
Therefore, our circuit has 1 ground, but it is labeled both GND and 0.
Important
If you don’t put VCC and GND power connection points, then the PCB layout
tool won’t know where to connect the power pins for IC's.
Enter 4 LEDs and resistors to the output of the 393 part A, in the same fashion
as in section 3.
Connect the circuit as per figure 2, not forgetting that the unused counter (393
part B) should also be connected. The output of the unused counter may be
connected to no-connect points, which specify that you know that the output is
no-connect,rather than you have forgotten to connect that part of the circuit.
After correctly wiring your circuit, no pins should be unconnected, i.e. have a
thin square box next to them.
VCC
U1
555alt
R1 8 4
220K
J1
VCC RESET
7
2 DISCHARGE 2
1 6 TRIGGER
R2 THRESHOLD
14
CON2 220K 5 U2A
V1 CONTROL 3 1 3
CLR VCC
5V C3 OUTPUT
GND A QA 4
100n QB 5
GND
1 QC 6
QD
C1 D1 74HC393 D5 D4 D3 D2
0.47u MLED81 BIT 0 BIT 0 BIT 0 BIT 0
7
2
C2 R4 R5 R6 R7
10n R3 220 220 220 220
220
0 GND
U2B
13 11
A QA 10
QB 9
CLR
QC 8
QD
74HC393
12
You have already specified how you want the circuit to be simulated. By adding the
counter, the circuit should still be simulated in the same fashion.
Now all that is needed, is to place a voltage marker on the QA output (pin 3) of the
counter, (if you wish, you may remove the marker on pin 6 of the 555 IC). Run the
simulation as before, and you should see that the output on QA is running at half the rate
of the counter.
You may place voltage markers on QB, QC and QD to see the count sequence. Is this
simulation what you expect, remember the binary count sequence?
Check that the period of the QD is correct (16 clock pulses wide).
7 EXPORTING TO PCB
You have now entered the schematic and tested (simulated) to check the circuit
operates as you expect. We do, however, need to add a connector to the schematic so that
you can connect power supply wires to the PCB.
The battery symbol is just a voltage source to simulate the circuit. We need a
connector on the schematic to connect power to the PCB (power may be supplied by a
battery or power supply unit).
Click on the place part button and you will see that no connector library exists. We
need to add a library by, clicking on add library, go up a directory level (use the ),
double-click on Connector. In the Part window, select CON2. Place CON2 part onto your
schematic, mirror horizontally, and connect in parallel with the battery as per figure 3.
This will place the appropriate ‘pads’ to solder some wires to on the PCB.
VCC
J1
2 V1
1 5V C3
100n
CON2
0 GND
CON2 does not have a PSpice library associated with it, so your simulation will still
run and not have been changed.
Each component has a physical size and needs to be soldered onto to the PCB. A PCB
footprint defines the space and placing of the pins of the component onto the PCB. There
are 2 standards, footprints for metric packages (i.e. millimeters) and footprints for
imperial units (i.e. inches). We are using imperial.
power connector
JUMPER200 2 pins spaced 0.2 inches apart
all resistors
AX/.500X.125/.034 2 pins spaced 0.5 inches apart for horizontal
mounting
0.47uF capacitor
CYL/D.200/LS.100/.031 2 pins spaced 0.2 inches apart for vertical mounting
(NOTE NOT ….../0.031) and the package is cylindrical in shape.
The leads are 31 thou in diameter.
Obviously, before you design your PCB, you need to know the type of packages you
will be using.
To tell OrCAD Capture what footprint each package has, double-click on each
component in turn, bringing up the Property editor window. In the PCB Footprint, type in
the footprint you require.
For this project use the footprints defined on the previous page. Some symbols already
have the footprint entered. Make sure you enter the whole footprint description (including
the decimal places).
Just to check, why not re-simulate your circuit. It should still work, as all you have
done is to enter some more data in fields associated with components that are not
examined by PSpice.
A Layout netlist is required to convert from the schematic into a form that the Layout
tool (PCB package) can understand. This has the same format as the netlist generated for
PSpice, but this has the footprint information as well.
Go to the project window and click on the project file (it has the project name and
.DSN after it). Click on Tools, Create Netlist, then
Select the Layout tab,
Make sure the Run ECO to Layout box is ticked. (Engineering Change Order)
Select user properties are in inches
Click OK.
Capture will then compile a binary netlist file (.MNL) describing your circuit for
import into the Layout tool.
Figure 4. Screen dump of the PCB rat’s nest layout (inverted image)
As can be seen from figure 4, all your components are laid out onto the PCB
worksheet with what is termed rat’s nest wiring. These wires are not physical, but rather
logical connections that the Layout tool knows about and will have to connect. You can
also see the PCB footprints and individual pads (circular and rectangular locations that
components will be soldered to).
7.6 WHAT IF THE ECO UTILITY REPORTS ERRORS?
The only errors that normally exist are that you have not entered a footprint for each
component on the Capture schematic or that you have entered the footprint text
incorrectly. Close Layout and go back to Capture. Make the changes, then run Layout
again. Alternatively, a footprint library has not been loaded. In which case, use the Add
Library button and search in c:\Program files\ Layout\library for the .llb file, which may
contain the required footprint.
7.7 POSITIONING COMPONENTS
Move the Vert + Horiz scroll bars so that the components mostly fit into the Route box
(white frame). Click on each component and drag it to where you want it to be, for
example see figure 5. Try to place the components to minimize the rat’s nest, (the number
of wires that cross). To do this you may also rotate the components when selected (use
the 'R' key).
Click on the component. It goes purple. Roll it with the mouse rather than drag.
Click on View, Database Spreadsheets… and then Layers. Individually select the
GND, POWER and all inner layers to “unused” routing by double-clicking on the Layer
type field for each layer and selecting unused routing. (You may also select a block using
the mouse like you do in Excel !) Set the Top layer to a Jumper layer (i.e. manual links
you would put in) and the Bottom layer to Routing. This tells the autorouter to only use
the bottom PCB layer. In a double-sided board design, both the Top and Bottom layers
are set to Routing. Close the layers spreadsheet.
Track Thickness.
Click on View, Data Spreadsheets… and then Nets. Here, you can change the
thickness of the tracks that will be laid down to make the connections. In order to make a
good PCB using the University facilities, a minimum of 20 (20 thousandths of a inch) for
each track, 30 or 40 is better. You may make the power wires (node 0 and VCC) a little
bit thicker, 50, if you wish. You may select all or a block of the nets in the min con max
field with the mouse, right click on the mouse and select properties…, enter 30 for the
Min, Conn and Max and boxes, click OK and all the tracks change. Close the Nets
spreadsheet.
Click on Auto, Autoroute and then board. After routing, all sweeps should be
completed. If not, then the autorouter can't place a track. If this is the case then click on
Auto, Unroute, board and move the components apart. Having thicker tracks may prevent
the process from completing, if so go back to 20 thou’.
You should be able to do a design with only routing on the bottom layer (i.e. a single
sided board). To check that all routes have been placed, click on View, Data
Spreadsheets… and then Statistics. The % routed should be 100%.
Click on the “Obstacle Tool” icon. Move your pointer over to one corner of your
board and right click on the mouse. Select “New” from the pop-up menu. Move your
mouse around to each corner of the board (left click on each corner). This should draw a
box around your board. When you have finished drawing the box, right click again and
select “properties” from the pop-up menu. The “Edit Obstacle” box should appear.
Select the following option in the “Edit Obstacle” box:
Then press OK. Now right click again and select “End Command”. Orcad should now
grow your track to fill the available space.
8 PRINTING
8.1 FINDING THE BOTTOM LAYER.
Printing will print a “top view” of the PCB, including the text for all the component
names and details.
However, we want just the tracking to be laid down in copper when the board is
manufactured. Any other marks may short tracks together.
You may wish to identify your board such that it shows on the copper layer, alongside the
tracking.
SE2P6 Engineering Applications (Anemometer Project) 29
Project Supervisor: Dr Simant Prakoonwit
www.reading.ac.uk/~sis04sp
Orcad v9.2 Tutorial
Click on Tools menu, then Text, New…, which opens the Text Edit box.
Type in your Text String (perhaps your initials ?).
Put a tick in the Mirrored box. This will make a top view, looking down onto the board,
back to front, but when viewed from underneath will read as normal.
Select the Layer as Bottom, OK
The text string is now rolling with the cursor. Click to place it. To move it, click on it
again.
9.1.3 Increasing the size of the white box (route box) in Layout.
The maximum size is 500x500 units, (5 inches).
Click on Options, Route strategy, Route sweeps. Double-click Win/Comp/Man and
specify route box. Change the X,Y to 500.
Edited ND Sept. 03
Edited SAS Aug 04
Edited RSS Sept 06
Edited SP Sept 07