Professional Documents
Culture Documents
SDT Manual
SDT Manual
INTRODUCTION TO PSPICE
OBJECTIVE: To study about Pspice simulator.
Launch the ORCAD schematic editor by double-clicking on the ORCADdemoicon.Click
on File from the main menubar and then select Open New Project.You should then see
the following dialog box.
Use the Browse button to select the location where youwould like to save your files.
Make sure the Analog or Mixed A/Doption has been selected. You may then click the
OK button.
The following dialog box will appear.
Make sure to select Create a blank project and then click the OKbutton.
Let's create a simple voltage divider i.e. two resistors, each with a value of 10K. We
will drive the series combination with a sinusoid and observe the voltage at the node
between the two resistors. Voltage
division principles tell us that the voltage should be half of the input voltage.From the
menu at the top, select Place and then Part (Shift-P if you wish can be used as a
shortcut).
The following dialog box will appear.
Click on the Add Library button and choose the ANALOG library.
You will see the following
Select the R i.e. resistor component. This can be done by doubleclicking on the R. Place
the component by clicking somewhere near the middle of the schematic page. Click again
and place R2. You should
then hit the Esc key to exit the place mode. The resistor R2 should still be selected as is
shown on the next page.
With resistor R2 selected, right mouse click on it. A menu will appear. Select the Rotate
option. You should observe the following
Right mouse click on the 1k value on the R1 component. A menu will appear. Select Edit
Properties. The dialog box shown below will appear. Change the value to 10K.
Do the same for the R2 component.At this point we should probably save our work. This
can be done by
either typing Ctrl-S or by clicking on the diskette icon in the toolbar or by going to the
File menu and selecting Save.Do a Place Part again. This time add the Source library,
From the Source library, select VSIN. Place the sinewave generator and change the
parameter values. VOFF should be 0. VAMPL should be set to 1.FREQ should be set to
1k.
Now place the ground symbol. Choose Place and Ground. Let's use the GND/CAPSYM
symbol. Any of the grounds would work but this is my personal favorite!
In order for PSPICE to simulate the circuit correctly, we must change the name of the
GND symbol from GND to 0. This is because in all versions of SPICE, circuit ground
must always be assigned a nodename of
0. We can do this by selecting the GND symbol. Now, right mouse click on the symbol.
A menu will pop up. Select the Edit Properties option.In the Name field where it says
GND, change this to 0 as I have done
below. Use a right mouse click on the Name field to highlight the field and click on
display. The Display Properties dialog box will appear.
It is now time to wire the components to one another. This can be done by placing a wire.
Place Wire and Shift-w is the shortcut! Click on a pin then drag to mouse to another pin
and click again.When the components are all wired together, leave the wiring mode by
hitting the Esc key.Your circuit should look like mine below.
We now are ready to simulate the circuit. We must first prepare a simulation profile
where we describe how we want the simulation to be performed. To do this select PSpice
and then New Simulation Profile.
The following dialog box appears. I have entered a name for the simulation. I decided to
call it tran. You may call it anything you wish. Click on the Create button to create the
profile
We also need to tell PSPICE which nodes we would like to plot. We do this by going to
the main menubar and selecting PSpice. We then select Markers and Voltage. We place
the marker on the output of the voltage divider as shown below.
For comparison purposes, let's also place a marker on the input node as illustrated in the
figure below.
At this point we should probably save our work. This can be done by either typing Ctrl-S
or by clicking on the diskette icon in the toolbar or by going to the File menu and
selecting Save.We are now ready to run the PSPICE simulation. We do this by selecting
PSpice from the main menubar and then Run. We could also click on the the arrow icon
on the toolbar. After a few seconds another window will open and you will see the
following simulation traces
EXPERIMENT NO:5
CLIPPER CLAMPER CIRCUIT
OUTPUT:
10
0
DC
2
D
UIC
V(1)
1KHZ)
1MEG
5
DIODE
PROGRAM:
* DIODE CLAMPER CIRCUIT
VIN 1 0 SIN(0 10 1KHZ)
*CAPACITOR WITH AN INITIAL VOLTAGE OF -15V
C1 1 2 1UF IC=-15V
R1 2 0 1MEG
VDC 3 0 DC 5
D1 3 2 DIODE
.MODEL DIODE D
.TRAN 20US 3MS UIC
.PLOT TRAN V(2) V(1)
.OP
.PROBE
.END
OUTPUT:
OUTPUT:
CIRCUIT DIAGRAM(CLAMPER):
OUTPUT:
OUTPUT:
EXPERIMENT NO:3
CHARECTERISTIC OF DIODE,BJT AND FET
*DIODE CHARACTERISTICS
PROGRAM:
VD
1
0
DC
0V
D1 1
2
D1N914
VX
2
0
DC 0V
;Measures diode current
.MODEL D1N914 D(IS=3.93E-9 RS=1 BV=100V IBV=5E6 CJO=1.7PF
.TEMP 50 100 150 ;Operating temperatures:50,100,150
.OPTIONS
NOPAGE NOECHO
OUTPUT:
TT=2NS)
0
1
DC
1MA
2
0
DC
12V
Q1
2
1
0
Q2N2222A
.MODEL
Q2N2222A
NPN
(IS=2.105E-16
+
CJC=19.4PF TF=489.88PS TR=4.9NS)
.DC
VCE
0
10V
0.0SV IB
.PROBE
.END
OUTPUT:
BF=173 VA=83.3VCJE=29.6PF
0
1MA
200UA
OUTPUT:
VTO=-5)
OUTPUT:
OUTPUT:
EXPERIMENT NO:7
DARLINGTON PAIR CIRCUIT
OUTPUT:
SMALL SIGNAL BIAS SOLUTION
NODE VOLTAGES:
(
1) 5.0000 (
2) 12.0000 (
3)
4.3560 (
4)
3.5909
-9.129E-04
1.489E-04
****
SMALL-SIGNAL CHARACTERISTICS
V(4)/VIN = 9.851E-01
INPUT RESISTANCE AT VIN = 4.696E+04
OUTPUT RESISTANCE AT V(4) = 6.677E+01
JOB CONCLUDED
TOTAL JOB TIME
0.00
EXPERIMENT NO:2
POTENTIAL DIVIDER CIRCUIT
OBJECTIVE: To study &simulate the Potential divider circuit.
PROGRAM:
* POTENTIAL DIVIDER
VS 1 0 DC 10V
R1 1 2 1KOHM
R2 2 3 1KOHM
R3 2 4 1KOHM
VX 3 0 DC 0V
VY 4 0 DC 0V
.DC VS 10V 30V 10V
.PRINT DC V(2) I(VX) I(VY)
.PLOT DC I(VY)
.PROBE
.END
OUTPUT:
OUTPUT:
EXPERIMENT NO:6
BJT CE AMPLIFIER
OBJECTIVE: To study &simulate the BJT CE amplifier circuit.
PROGRAM:
*Amplifier
VIN 1 0 AC 1 SIN(0 0.01 1KHZ)
VCC 0 7 DC 15V
RS 1 2 500
R1 7 3 47K
R2 3 0 2K
RC 7 4 10K
RE 5 0 2K
RL 6 0 20K
C1 2 3 1UF
C2 4 6 1UF
CE 5 0 10UF
XQ1 4 3 5 TRANS
.SUBCKT TRANS 6 7 5
RB 1 2 100
RE 3 5 1
RC 4 6 10
RPI 2 3 1K
CPI 2 3 2PF
RU 2 4 1MEG
CU 2 4 1PF
RO 4 3 100K
CSS 6 0 2PF
VI 1 7 DC 0V
F1 3 4 VI 20
.ENDS TRANS
.OPTIONS NOPAGE NOECHO
.TRAN 50US 2MS
.AC DEC 10 1HZ 10KHZ
.PLOT TRAN V(4) V(6) V(1)
.PLOT AC VM(6) VP(6)
.PROBE
.END
OUTPUT:
EXPERIMENT NO:4
RECTIFIERS
OBJECTIVE: To study &simulate the rectifier circuits.
(a)Circuit diagram Half wave rectifier:
OUTPUT:
OUTPUT:
EXPERIMENT NO:8
INTEGRATOR
OBJECTIVE: To study &simulate the integrator circuits.
PROGRAM:
*INTEGRATOR CIRCUIT
VIN 1 0 PWL (0 0 1NS -1V 1MS -1V 1.0001MS 1V 2MS 1V
+ 2.0001MS -1V 3MS -1V 3.0001MS 1V 4MS 1V)
R1 1 2 2.5K
RF 2 4 1MEG
RX 3 0 2.5K
RL 4 0 100K
C1 2 4 0.1UF
XA1 2 3 4 0 OPAMP
.SUBCKT OPAMP 1 2 7 4
RI 1 2 2.0E6
GB 4 3 1 2 0.1M
R1 3 4 10K
C1 3 4 1.5619UF
EA 4 5 3 4 2E+5
RO 5 7 75
.ENDS OPAMP
.TRAN 50US 4MS
.PLOT TRAN V(4) V(1)
.PROBE
.END
OUTPUT:
EXPERIMENT NO:11
Z-TRANSFORM
OBJECTIVE: Write a MATLAB program to find Z-transform of a given function.
PROGRAM:
n=sym('n');
a=sym('a');
w=sym('w');
%x1=(1/2)^n
x1=(1/2)^n;
y1=ztrans(x1);
disp('Z transform of (1/2)^n');
disp(y1);
w1=iztrans(y1);
disp('inverse Z-transform of y1');
disp(w1);
%x2=cosw*n
x2=cos(w*n);
y2=ztrans(x2);
disp('Z transform of cos(w*n)');
disp(y2);
w2=iztrans(y2);
disp('inverse Z-transform of y2');
disp(w2);
%x3=(a^n)*cos(w*n)
x3=cos(w*n);
y3=ztrans(x2);
disp('Z transform of (a^n)*cos(w*n)');
disp(y3);
w3=iztrans(y3);
disp('inverse Z-transform ofy3');
disp(w3);
COMMAND WINDOW:
Z transform of (1/2)^n
2*z/(2*z-1)
inverse Z-transform of y1
(1/2)^n
Z transform of cos(w*n)
(z-cos(w))*z/(z^2-2*z*cos(w)+1)
inverse Z-transform of y2
cos(w*n)
Z transform of (a^n)*cos(w*n)
(z-cos(w))*z/(z^2-2*z*cos(w)+1)
inverse Z-transform ofy3
cos(w*n)
EXPERIMENT NO:12
POLES AND ZEROS FROM GIVEN TRANSFER FUNCTION
TRANSFER FUNCTION FROM GIVEN POLES AND ZEROS
OBJECTIVE: Write a MATLAB program,
(a) To find poles and zeros from a given transfer function.
(b) To find transfer function from given poles and zeros.
% To
b = [2 3];
%coefficient of numerator
a = [1 0.4 1];
[z,p,k] = tf2zp(b,a)
zplane(b,a);
%coefficient of denominator
COMMAND WINDOW:
z=
-1.5000
p=
-0.2000 + 0.9798i
-0.2000 - 0.9798i
k=
2
1
0.8
0.6
Imaginary Part
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1.5
-1
-0.5
0
Real Part
0.5
COMMAND WINDOW:
enter the zeros[1 4 6]
enter the poles[2 5 8]
numerator coefficients are:
10 -110 340 -240
denominator coefficients are:
1 -15
66 -80
Imaginary Part
2
1
0
-1
-2
-3
-1
3
4
Real Part
EXPERIMENT NO:9
LOGIC GATES
OUTPUT:
OUTPUT:
OUTPUT:
OUTPUT:
OUTPUT:
EXPERIMENT NO:
ADDER CIRCUIT
OUTPUT:
OUTPUT:
EXPERIMENT NO:13
PCB DESIGNING
The new project dialog box will pop up as shown in the figure.
Type a name for your project, and then select the PC board wizard radio button. Click
ok. After you click OK, the PCB Project Wizard dialog box shown in figure will pop up.
For now circuit simulation will not be performed, so leave the enable project simulation
box unchecked. Click next.
After you click next, the PCB project wizard dialog box shown in figure will pop up. This
box allows you to add specific libraries to your project. Scroll down until you find the
discrete.olb library, highlight it by clicking on it, and then click the add button and then
click finish. This completes the project set up. You should have a project manager
window in the left side of the capture session frame as shown in figure.
You may also have a schematic window in the work space. If the schematic is not open,
expand the projectname.dsn directory by clicking the - box that is to the left of the
projectname.dsn icon. Click the - box next to the schematics folder, and then double
click the file called page1. The schematic page should open.
After you click ok you should immediately return to the schematic page.
From the create netlist dialog box, select the layout tab and then save it to the current
directory and remember where the netlist file is saved. Click finish to generate the
netlist. Capture will display a warning text box stating Design Path/Yourname.dsn will be
saved prior to netlisting. Click ok. Capture will then generate the netlist and report the
results in the session log. At this point you have generated a netlist file with a .MNL
extension that layout can use.
STEP V: Designing the PCB with layout - Starting layout and importing
the netlist
Now you will use the netlist to route a board using layout. Begin Orcad layout. Once
layout is up and running you will be presented with a blank session frame initially. To
begin working on your board you need to tell layout what kind of board you want to use
and then import the netlist file you generated with capture into that board type. Begin by
selecting new from the session frames file menu. An auto ECO dialog box will pop up
as shown in figure. There are three pieces of information that need to be entered into the
auto ECO dialog box. You will add the first two pieces of information in the TCH and the
MNL text boxes and layout will enter a default value into the third MAX text box. The
first step is to select a board technology template. Click the browse button across from
the TCH text box and navigate to the tools-layout-data folder and select the default
technology template as shown in figure. Once the technology file is assigned you need to
select the Layout netlist .MNL file you generated in Capture. To do so, click the browse
button across from the MNL text box and locate the .MNL file you created in capture.
Once you have entered these first two pieces of information the wizard will fill in the
MAX file information for you with a default name as shown in the figure. The MAX file
is layouts project file that contains the information needed to build your board. You can
use the default name or save it with a different name. Click the apply ECO button at the
bottom of the dialog box. You do not need to make any changes to the options settings at
this point.
Layout will immediately go about setting up the project environment. When setting up
the project layout checks for footprint assignments for each part in the netlist. If no
footprint was assigned or if a footprint that layout does not know about is assigned to a
part, layout will ask you to choose a footprint with the link footprint to component dialog
box shown in the figure. If you get the link footprint dialog box click on the link existing
footprint to component button. Layout will initiate the footprint library utility shown in
the figure. Depending on how layout has been used before you may have libraries
different from those shown in the figure. If you are using the demo version you should at
the very least have the ex-gui library which you should select. In the Footprints box
below the Libraries box, find the SIP/TM/L.200/2 footprint. A picture of the footprint
will be displayed in the preview window on the right of the dialog box. Once the auto
ECO utility has completed assigning the footprints, you should end up in the board layout
environment shown in figure. This is the design window for your board. Here you can see
the component footprints as well as the silk screen and assembly details. Also visible is
the board origin and the board drill symbol table.