digital electronics labsite.iugaza.edu.ps/askalloub/files/2017/02/lab1.pdfpspice lite 9.2 is one of...

13
Digital Electronics LAB Lab 1 : Introduction to LTSPICE

Upload: others

Post on 03-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

Digital Electronics LAB

Lab 1 Introduction to LTSPICE

SPICE (Simulation Program for Integrated Circuit Engineering) is a powerful general purpose analog and mixed-mode circuit simulator that is used to verify circuit designs and to predict the circuit behavior

PSpice Lite 92 is one of the OrCAD family of products from Cadence Design

Systems Inc offering a complete suite of electronic design tools It is free and

includes limited versions of OrCAD Capture for schematic capture PSpice for

analog circuit simulation and Pspice AD for mixed analog and digital circuit

simulation

LT SPICE ndash is a free SPICE simulator with schematic capture from Linear

Technology It is quite similar to PSpice Lite but is not limited in the number of

devices or nodes Linear Technology (LT) is one of the industry leaders in

analog and digital integrated circuits Linear Technology provides a complete

set of SPICE models for LT components

Before we start we must remember the values of elements can be specified using scaling factors (upper or lower case) as

Both upper and lower case letters are allowed in PSpice and LTSpice As an example one can specify a capacitor of 225 picofarad in the following ways 225P 225p 225pF 225pFarad 225E-12 0225N

Notice that Mega is written as MEG eg a 15 megaOhm resistor can be specified as 15MEG 15MEGohm 15meg or 15E6 Be careful not to use M for Mega When you write 15Mohm or 15M Spice will read this as 15 milliOhm

In this season Well take an examples to be familiar with this program to analysis any circuit we first want to draw the circuit in schematic window and edit it Second we simulate the circuit

They are many type of simulation that available in LTSPICE we will focus in the DC operation point simulation transient simulation and DC sweep simulation

A) DC operation point To more details about this simulation let us take a complete example

EX1) we want to analysis the voltage divider circuit shown in figure(1)

Figure(1)

First Drawing the Circuit in Schematic Window

1) Go to FilegtNew Schematic or click on New Schematic icon as shown in figure (2)

Then a new page will open in the Project Design Manager here you can use the menu bar or Tool bar as shown below

2) Go to Editgtcomponent click on component icon or press F2 to get any

element Then this will open a dialog box shown in figure (3)

Figure (3)

So we must now find the resistor we can write res in the dialog then press ok then move the

mouse to the position you want to place it Right click or press the ESC key to end this

command

You can also gate specific components by clicking on their symbols in the menu bar

This is good for getting common components like resistors capacitors

inductors and diode

To rotate a component press CTRL+R click or go to EditgtRotate To get the

mirror image of a component press CTRL+E click or go to EditgtMirror

3) To get the voltage source go again to component icon and write voltage in the a dialog box that appear then click ok then move the mouse to the position you

want to place it You must arrange elements as shown in figure (4)

Figure (4)

4) To edit the values of the passive elements (inductors capacitors and resistors) right

click on the components and enter the value Or you can right click on the LRC text

and just enter the value

5) To edit the voltage sources right click on it By default the sources are DC So if you

are dealing with a DC circuit you can just enter the value of the source However to

deal with AC sources after you right click on them click on the advanced button and

select the source type (sinusoidal pulse piecewise linear etc) Edit the sources as the

desired circuit

6) Click on the wire button press F3 or go to EditgtDraw Wire to connect the

components to draw your circuit When three or more wires connect at a point you

should see a squire box

7) Add a ground to your circuit by clicking on pressing G key on keyboard or

going to EditgtPlace GND This is very important you cannot simulate your circuit

without a ground

8) If you need to move any component use If you need to drag a portion of your

circuit use To delete a component press Delete key or use To copy a

component click or press CTRL+C click on the component you want to copy

and then click on the location where you want the new component Right click or

press the ESC key to end any command

9) To label any node click press F4 or go to EditgtLabel Net You can label the

nets to identify the nodes of interest easily in the simulation

10) To edit the properties and values of the components right click on them

11) To edit the names of the components right click on their names

After all procedure we get the circuit that its complete and ready to simulate as shown

in figure (5)

Figure(5)

Second Simulating the Circuit

Before you start the simulation make sure that

You have to have your circuit properly drawn and saved

There must not be any floating parts on your page (ie unattached devices)

You should make sure that all parts have the values that you want

There are no extra wires

It is essential that you have a ground in your circuit

DC operation point Simulation 1 Draw the DC circuit by following the steps described above

2 Go to EditgtSimulation CMD Choose the type of analysis you want to simulate

3 To view the DC operating points write op in the syntax field of the command window or

select DC op pnt tab as shown in figure (6) then click on anywhere in the schematic window

to place command

Figure (6)

4 Click on button or go to SimulategtRun to run your simulation

A simulation showing only the DC operating points will look like this( figure 7)

Figure (7)

Note that the voltage across R2 equal to 6V and the current passes through the circuit equal to 6mA

B) Transient analysis

To more details about this simulation let us take an example

EX1) we want to analysis the voltage divider circuit shown in figure(8)

Figure(8)

Here I want the voltage source to be AC voltage ( sine wave)

First Drawing the Circuit in Schematic Window 1) Use the same procedure that we take above in the DC operation point and

connect the circuit as shown in figure (9)

Figure (9)

2) To get the Ac voltage source itrsquos the same manner go again to component

icon and write voltage in the a dialog box that appear then click ok To edit the voltage sources right click on it By default the sources are DC So if

you are dealing with a DC circuit you can just enter the value of the source

However to deal with AC sources after you right click on them click on the

advanced button as shown in figure (10)

Figure (10)

and select the source type (sinusoidal pulse piecewise linear etc) Edit the

sources as the desired circuit as shown in figure (11)

3) Then the circuit will look as shown in figure (12)

Figure (12)

Second Simulating the Circuit As the previous procedure in the DC operation point but here we choose Transient analysis

To do the transient simulation click on the Transient tab and fill the command window with

appropriate values as shown in figure (13)

Figure(13)

Note that we use the voltage source with frequency 50Hz so the time of one period equal to

20ms So to draw one circle we write 20ms in stop time If we want to draw 5 cycle we write

100ms as shown in figure (13)

Also note that if we previously operates in the operation point simulation and now we

operate at transient simulation then the ldquordquo denotes the active simulation currently running

and ldquordquo denotes other simulation not running now as shown in figure (14)

Figure (14)

After running the simulation the simulation showing the transient analysis will look like as

in figure (15)

Figure (15)

In the graph window you can right click and select Add Traces to draw the signal of interest

Then choose V(in) to draw the input voltage signal

To add the output voltage right click again and select Add Trace then select V(out) Here the

result will be as shown in Figure(16)

Figure(16)

Note

1) Another way to draw the voltage at any node by using voltage probe cursor

by left click on any wire to plot the voltage on the waveform viewer

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 2: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

SPICE (Simulation Program for Integrated Circuit Engineering) is a powerful general purpose analog and mixed-mode circuit simulator that is used to verify circuit designs and to predict the circuit behavior

PSpice Lite 92 is one of the OrCAD family of products from Cadence Design

Systems Inc offering a complete suite of electronic design tools It is free and

includes limited versions of OrCAD Capture for schematic capture PSpice for

analog circuit simulation and Pspice AD for mixed analog and digital circuit

simulation

LT SPICE ndash is a free SPICE simulator with schematic capture from Linear

Technology It is quite similar to PSpice Lite but is not limited in the number of

devices or nodes Linear Technology (LT) is one of the industry leaders in

analog and digital integrated circuits Linear Technology provides a complete

set of SPICE models for LT components

Before we start we must remember the values of elements can be specified using scaling factors (upper or lower case) as

Both upper and lower case letters are allowed in PSpice and LTSpice As an example one can specify a capacitor of 225 picofarad in the following ways 225P 225p 225pF 225pFarad 225E-12 0225N

Notice that Mega is written as MEG eg a 15 megaOhm resistor can be specified as 15MEG 15MEGohm 15meg or 15E6 Be careful not to use M for Mega When you write 15Mohm or 15M Spice will read this as 15 milliOhm

In this season Well take an examples to be familiar with this program to analysis any circuit we first want to draw the circuit in schematic window and edit it Second we simulate the circuit

They are many type of simulation that available in LTSPICE we will focus in the DC operation point simulation transient simulation and DC sweep simulation

A) DC operation point To more details about this simulation let us take a complete example

EX1) we want to analysis the voltage divider circuit shown in figure(1)

Figure(1)

First Drawing the Circuit in Schematic Window

1) Go to FilegtNew Schematic or click on New Schematic icon as shown in figure (2)

Then a new page will open in the Project Design Manager here you can use the menu bar or Tool bar as shown below

2) Go to Editgtcomponent click on component icon or press F2 to get any

element Then this will open a dialog box shown in figure (3)

Figure (3)

So we must now find the resistor we can write res in the dialog then press ok then move the

mouse to the position you want to place it Right click or press the ESC key to end this

command

You can also gate specific components by clicking on their symbols in the menu bar

This is good for getting common components like resistors capacitors

inductors and diode

To rotate a component press CTRL+R click or go to EditgtRotate To get the

mirror image of a component press CTRL+E click or go to EditgtMirror

3) To get the voltage source go again to component icon and write voltage in the a dialog box that appear then click ok then move the mouse to the position you

want to place it You must arrange elements as shown in figure (4)

Figure (4)

4) To edit the values of the passive elements (inductors capacitors and resistors) right

click on the components and enter the value Or you can right click on the LRC text

and just enter the value

5) To edit the voltage sources right click on it By default the sources are DC So if you

are dealing with a DC circuit you can just enter the value of the source However to

deal with AC sources after you right click on them click on the advanced button and

select the source type (sinusoidal pulse piecewise linear etc) Edit the sources as the

desired circuit

6) Click on the wire button press F3 or go to EditgtDraw Wire to connect the

components to draw your circuit When three or more wires connect at a point you

should see a squire box

7) Add a ground to your circuit by clicking on pressing G key on keyboard or

going to EditgtPlace GND This is very important you cannot simulate your circuit

without a ground

8) If you need to move any component use If you need to drag a portion of your

circuit use To delete a component press Delete key or use To copy a

component click or press CTRL+C click on the component you want to copy

and then click on the location where you want the new component Right click or

press the ESC key to end any command

9) To label any node click press F4 or go to EditgtLabel Net You can label the

nets to identify the nodes of interest easily in the simulation

10) To edit the properties and values of the components right click on them

11) To edit the names of the components right click on their names

After all procedure we get the circuit that its complete and ready to simulate as shown

in figure (5)

Figure(5)

Second Simulating the Circuit

Before you start the simulation make sure that

You have to have your circuit properly drawn and saved

There must not be any floating parts on your page (ie unattached devices)

You should make sure that all parts have the values that you want

There are no extra wires

It is essential that you have a ground in your circuit

DC operation point Simulation 1 Draw the DC circuit by following the steps described above

2 Go to EditgtSimulation CMD Choose the type of analysis you want to simulate

3 To view the DC operating points write op in the syntax field of the command window or

select DC op pnt tab as shown in figure (6) then click on anywhere in the schematic window

to place command

Figure (6)

4 Click on button or go to SimulategtRun to run your simulation

A simulation showing only the DC operating points will look like this( figure 7)

Figure (7)

Note that the voltage across R2 equal to 6V and the current passes through the circuit equal to 6mA

B) Transient analysis

To more details about this simulation let us take an example

EX1) we want to analysis the voltage divider circuit shown in figure(8)

Figure(8)

Here I want the voltage source to be AC voltage ( sine wave)

First Drawing the Circuit in Schematic Window 1) Use the same procedure that we take above in the DC operation point and

connect the circuit as shown in figure (9)

Figure (9)

2) To get the Ac voltage source itrsquos the same manner go again to component

icon and write voltage in the a dialog box that appear then click ok To edit the voltage sources right click on it By default the sources are DC So if

you are dealing with a DC circuit you can just enter the value of the source

However to deal with AC sources after you right click on them click on the

advanced button as shown in figure (10)

Figure (10)

and select the source type (sinusoidal pulse piecewise linear etc) Edit the

sources as the desired circuit as shown in figure (11)

3) Then the circuit will look as shown in figure (12)

Figure (12)

Second Simulating the Circuit As the previous procedure in the DC operation point but here we choose Transient analysis

To do the transient simulation click on the Transient tab and fill the command window with

appropriate values as shown in figure (13)

Figure(13)

Note that we use the voltage source with frequency 50Hz so the time of one period equal to

20ms So to draw one circle we write 20ms in stop time If we want to draw 5 cycle we write

100ms as shown in figure (13)

Also note that if we previously operates in the operation point simulation and now we

operate at transient simulation then the ldquordquo denotes the active simulation currently running

and ldquordquo denotes other simulation not running now as shown in figure (14)

Figure (14)

After running the simulation the simulation showing the transient analysis will look like as

in figure (15)

Figure (15)

In the graph window you can right click and select Add Traces to draw the signal of interest

Then choose V(in) to draw the input voltage signal

To add the output voltage right click again and select Add Trace then select V(out) Here the

result will be as shown in Figure(16)

Figure(16)

Note

1) Another way to draw the voltage at any node by using voltage probe cursor

by left click on any wire to plot the voltage on the waveform viewer

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 3: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

A) DC operation point To more details about this simulation let us take a complete example

EX1) we want to analysis the voltage divider circuit shown in figure(1)

Figure(1)

First Drawing the Circuit in Schematic Window

1) Go to FilegtNew Schematic or click on New Schematic icon as shown in figure (2)

Then a new page will open in the Project Design Manager here you can use the menu bar or Tool bar as shown below

2) Go to Editgtcomponent click on component icon or press F2 to get any

element Then this will open a dialog box shown in figure (3)

Figure (3)

So we must now find the resistor we can write res in the dialog then press ok then move the

mouse to the position you want to place it Right click or press the ESC key to end this

command

You can also gate specific components by clicking on their symbols in the menu bar

This is good for getting common components like resistors capacitors

inductors and diode

To rotate a component press CTRL+R click or go to EditgtRotate To get the

mirror image of a component press CTRL+E click or go to EditgtMirror

3) To get the voltage source go again to component icon and write voltage in the a dialog box that appear then click ok then move the mouse to the position you

want to place it You must arrange elements as shown in figure (4)

Figure (4)

4) To edit the values of the passive elements (inductors capacitors and resistors) right

click on the components and enter the value Or you can right click on the LRC text

and just enter the value

5) To edit the voltage sources right click on it By default the sources are DC So if you

are dealing with a DC circuit you can just enter the value of the source However to

deal with AC sources after you right click on them click on the advanced button and

select the source type (sinusoidal pulse piecewise linear etc) Edit the sources as the

desired circuit

6) Click on the wire button press F3 or go to EditgtDraw Wire to connect the

components to draw your circuit When three or more wires connect at a point you

should see a squire box

7) Add a ground to your circuit by clicking on pressing G key on keyboard or

going to EditgtPlace GND This is very important you cannot simulate your circuit

without a ground

8) If you need to move any component use If you need to drag a portion of your

circuit use To delete a component press Delete key or use To copy a

component click or press CTRL+C click on the component you want to copy

and then click on the location where you want the new component Right click or

press the ESC key to end any command

9) To label any node click press F4 or go to EditgtLabel Net You can label the

nets to identify the nodes of interest easily in the simulation

10) To edit the properties and values of the components right click on them

11) To edit the names of the components right click on their names

After all procedure we get the circuit that its complete and ready to simulate as shown

in figure (5)

Figure(5)

Second Simulating the Circuit

Before you start the simulation make sure that

You have to have your circuit properly drawn and saved

There must not be any floating parts on your page (ie unattached devices)

You should make sure that all parts have the values that you want

There are no extra wires

It is essential that you have a ground in your circuit

DC operation point Simulation 1 Draw the DC circuit by following the steps described above

2 Go to EditgtSimulation CMD Choose the type of analysis you want to simulate

3 To view the DC operating points write op in the syntax field of the command window or

select DC op pnt tab as shown in figure (6) then click on anywhere in the schematic window

to place command

Figure (6)

4 Click on button or go to SimulategtRun to run your simulation

A simulation showing only the DC operating points will look like this( figure 7)

Figure (7)

Note that the voltage across R2 equal to 6V and the current passes through the circuit equal to 6mA

B) Transient analysis

To more details about this simulation let us take an example

EX1) we want to analysis the voltage divider circuit shown in figure(8)

Figure(8)

Here I want the voltage source to be AC voltage ( sine wave)

First Drawing the Circuit in Schematic Window 1) Use the same procedure that we take above in the DC operation point and

connect the circuit as shown in figure (9)

Figure (9)

2) To get the Ac voltage source itrsquos the same manner go again to component

icon and write voltage in the a dialog box that appear then click ok To edit the voltage sources right click on it By default the sources are DC So if

you are dealing with a DC circuit you can just enter the value of the source

However to deal with AC sources after you right click on them click on the

advanced button as shown in figure (10)

Figure (10)

and select the source type (sinusoidal pulse piecewise linear etc) Edit the

sources as the desired circuit as shown in figure (11)

3) Then the circuit will look as shown in figure (12)

Figure (12)

Second Simulating the Circuit As the previous procedure in the DC operation point but here we choose Transient analysis

To do the transient simulation click on the Transient tab and fill the command window with

appropriate values as shown in figure (13)

Figure(13)

Note that we use the voltage source with frequency 50Hz so the time of one period equal to

20ms So to draw one circle we write 20ms in stop time If we want to draw 5 cycle we write

100ms as shown in figure (13)

Also note that if we previously operates in the operation point simulation and now we

operate at transient simulation then the ldquordquo denotes the active simulation currently running

and ldquordquo denotes other simulation not running now as shown in figure (14)

Figure (14)

After running the simulation the simulation showing the transient analysis will look like as

in figure (15)

Figure (15)

In the graph window you can right click and select Add Traces to draw the signal of interest

Then choose V(in) to draw the input voltage signal

To add the output voltage right click again and select Add Trace then select V(out) Here the

result will be as shown in Figure(16)

Figure(16)

Note

1) Another way to draw the voltage at any node by using voltage probe cursor

by left click on any wire to plot the voltage on the waveform viewer

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 4: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

So we must now find the resistor we can write res in the dialog then press ok then move the

mouse to the position you want to place it Right click or press the ESC key to end this

command

You can also gate specific components by clicking on their symbols in the menu bar

This is good for getting common components like resistors capacitors

inductors and diode

To rotate a component press CTRL+R click or go to EditgtRotate To get the

mirror image of a component press CTRL+E click or go to EditgtMirror

3) To get the voltage source go again to component icon and write voltage in the a dialog box that appear then click ok then move the mouse to the position you

want to place it You must arrange elements as shown in figure (4)

Figure (4)

4) To edit the values of the passive elements (inductors capacitors and resistors) right

click on the components and enter the value Or you can right click on the LRC text

and just enter the value

5) To edit the voltage sources right click on it By default the sources are DC So if you

are dealing with a DC circuit you can just enter the value of the source However to

deal with AC sources after you right click on them click on the advanced button and

select the source type (sinusoidal pulse piecewise linear etc) Edit the sources as the

desired circuit

6) Click on the wire button press F3 or go to EditgtDraw Wire to connect the

components to draw your circuit When three or more wires connect at a point you

should see a squire box

7) Add a ground to your circuit by clicking on pressing G key on keyboard or

going to EditgtPlace GND This is very important you cannot simulate your circuit

without a ground

8) If you need to move any component use If you need to drag a portion of your

circuit use To delete a component press Delete key or use To copy a

component click or press CTRL+C click on the component you want to copy

and then click on the location where you want the new component Right click or

press the ESC key to end any command

9) To label any node click press F4 or go to EditgtLabel Net You can label the

nets to identify the nodes of interest easily in the simulation

10) To edit the properties and values of the components right click on them

11) To edit the names of the components right click on their names

After all procedure we get the circuit that its complete and ready to simulate as shown

in figure (5)

Figure(5)

Second Simulating the Circuit

Before you start the simulation make sure that

You have to have your circuit properly drawn and saved

There must not be any floating parts on your page (ie unattached devices)

You should make sure that all parts have the values that you want

There are no extra wires

It is essential that you have a ground in your circuit

DC operation point Simulation 1 Draw the DC circuit by following the steps described above

2 Go to EditgtSimulation CMD Choose the type of analysis you want to simulate

3 To view the DC operating points write op in the syntax field of the command window or

select DC op pnt tab as shown in figure (6) then click on anywhere in the schematic window

to place command

Figure (6)

4 Click on button or go to SimulategtRun to run your simulation

A simulation showing only the DC operating points will look like this( figure 7)

Figure (7)

Note that the voltage across R2 equal to 6V and the current passes through the circuit equal to 6mA

B) Transient analysis

To more details about this simulation let us take an example

EX1) we want to analysis the voltage divider circuit shown in figure(8)

Figure(8)

Here I want the voltage source to be AC voltage ( sine wave)

First Drawing the Circuit in Schematic Window 1) Use the same procedure that we take above in the DC operation point and

connect the circuit as shown in figure (9)

Figure (9)

2) To get the Ac voltage source itrsquos the same manner go again to component

icon and write voltage in the a dialog box that appear then click ok To edit the voltage sources right click on it By default the sources are DC So if

you are dealing with a DC circuit you can just enter the value of the source

However to deal with AC sources after you right click on them click on the

advanced button as shown in figure (10)

Figure (10)

and select the source type (sinusoidal pulse piecewise linear etc) Edit the

sources as the desired circuit as shown in figure (11)

3) Then the circuit will look as shown in figure (12)

Figure (12)

Second Simulating the Circuit As the previous procedure in the DC operation point but here we choose Transient analysis

To do the transient simulation click on the Transient tab and fill the command window with

appropriate values as shown in figure (13)

Figure(13)

Note that we use the voltage source with frequency 50Hz so the time of one period equal to

20ms So to draw one circle we write 20ms in stop time If we want to draw 5 cycle we write

100ms as shown in figure (13)

Also note that if we previously operates in the operation point simulation and now we

operate at transient simulation then the ldquordquo denotes the active simulation currently running

and ldquordquo denotes other simulation not running now as shown in figure (14)

Figure (14)

After running the simulation the simulation showing the transient analysis will look like as

in figure (15)

Figure (15)

In the graph window you can right click and select Add Traces to draw the signal of interest

Then choose V(in) to draw the input voltage signal

To add the output voltage right click again and select Add Trace then select V(out) Here the

result will be as shown in Figure(16)

Figure(16)

Note

1) Another way to draw the voltage at any node by using voltage probe cursor

by left click on any wire to plot the voltage on the waveform viewer

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 5: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

Figure(5)

Second Simulating the Circuit

Before you start the simulation make sure that

You have to have your circuit properly drawn and saved

There must not be any floating parts on your page (ie unattached devices)

You should make sure that all parts have the values that you want

There are no extra wires

It is essential that you have a ground in your circuit

DC operation point Simulation 1 Draw the DC circuit by following the steps described above

2 Go to EditgtSimulation CMD Choose the type of analysis you want to simulate

3 To view the DC operating points write op in the syntax field of the command window or

select DC op pnt tab as shown in figure (6) then click on anywhere in the schematic window

to place command

Figure (6)

4 Click on button or go to SimulategtRun to run your simulation

A simulation showing only the DC operating points will look like this( figure 7)

Figure (7)

Note that the voltage across R2 equal to 6V and the current passes through the circuit equal to 6mA

B) Transient analysis

To more details about this simulation let us take an example

EX1) we want to analysis the voltage divider circuit shown in figure(8)

Figure(8)

Here I want the voltage source to be AC voltage ( sine wave)

First Drawing the Circuit in Schematic Window 1) Use the same procedure that we take above in the DC operation point and

connect the circuit as shown in figure (9)

Figure (9)

2) To get the Ac voltage source itrsquos the same manner go again to component

icon and write voltage in the a dialog box that appear then click ok To edit the voltage sources right click on it By default the sources are DC So if

you are dealing with a DC circuit you can just enter the value of the source

However to deal with AC sources after you right click on them click on the

advanced button as shown in figure (10)

Figure (10)

and select the source type (sinusoidal pulse piecewise linear etc) Edit the

sources as the desired circuit as shown in figure (11)

3) Then the circuit will look as shown in figure (12)

Figure (12)

Second Simulating the Circuit As the previous procedure in the DC operation point but here we choose Transient analysis

To do the transient simulation click on the Transient tab and fill the command window with

appropriate values as shown in figure (13)

Figure(13)

Note that we use the voltage source with frequency 50Hz so the time of one period equal to

20ms So to draw one circle we write 20ms in stop time If we want to draw 5 cycle we write

100ms as shown in figure (13)

Also note that if we previously operates in the operation point simulation and now we

operate at transient simulation then the ldquordquo denotes the active simulation currently running

and ldquordquo denotes other simulation not running now as shown in figure (14)

Figure (14)

After running the simulation the simulation showing the transient analysis will look like as

in figure (15)

Figure (15)

In the graph window you can right click and select Add Traces to draw the signal of interest

Then choose V(in) to draw the input voltage signal

To add the output voltage right click again and select Add Trace then select V(out) Here the

result will be as shown in Figure(16)

Figure(16)

Note

1) Another way to draw the voltage at any node by using voltage probe cursor

by left click on any wire to plot the voltage on the waveform viewer

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 6: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

B) Transient analysis

To more details about this simulation let us take an example

EX1) we want to analysis the voltage divider circuit shown in figure(8)

Figure(8)

Here I want the voltage source to be AC voltage ( sine wave)

First Drawing the Circuit in Schematic Window 1) Use the same procedure that we take above in the DC operation point and

connect the circuit as shown in figure (9)

Figure (9)

2) To get the Ac voltage source itrsquos the same manner go again to component

icon and write voltage in the a dialog box that appear then click ok To edit the voltage sources right click on it By default the sources are DC So if

you are dealing with a DC circuit you can just enter the value of the source

However to deal with AC sources after you right click on them click on the

advanced button as shown in figure (10)

Figure (10)

and select the source type (sinusoidal pulse piecewise linear etc) Edit the

sources as the desired circuit as shown in figure (11)

3) Then the circuit will look as shown in figure (12)

Figure (12)

Second Simulating the Circuit As the previous procedure in the DC operation point but here we choose Transient analysis

To do the transient simulation click on the Transient tab and fill the command window with

appropriate values as shown in figure (13)

Figure(13)

Note that we use the voltage source with frequency 50Hz so the time of one period equal to

20ms So to draw one circle we write 20ms in stop time If we want to draw 5 cycle we write

100ms as shown in figure (13)

Also note that if we previously operates in the operation point simulation and now we

operate at transient simulation then the ldquordquo denotes the active simulation currently running

and ldquordquo denotes other simulation not running now as shown in figure (14)

Figure (14)

After running the simulation the simulation showing the transient analysis will look like as

in figure (15)

Figure (15)

In the graph window you can right click and select Add Traces to draw the signal of interest

Then choose V(in) to draw the input voltage signal

To add the output voltage right click again and select Add Trace then select V(out) Here the

result will be as shown in Figure(16)

Figure(16)

Note

1) Another way to draw the voltage at any node by using voltage probe cursor

by left click on any wire to plot the voltage on the waveform viewer

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 7: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

3) Then the circuit will look as shown in figure (12)

Figure (12)

Second Simulating the Circuit As the previous procedure in the DC operation point but here we choose Transient analysis

To do the transient simulation click on the Transient tab and fill the command window with

appropriate values as shown in figure (13)

Figure(13)

Note that we use the voltage source with frequency 50Hz so the time of one period equal to

20ms So to draw one circle we write 20ms in stop time If we want to draw 5 cycle we write

100ms as shown in figure (13)

Also note that if we previously operates in the operation point simulation and now we

operate at transient simulation then the ldquordquo denotes the active simulation currently running

and ldquordquo denotes other simulation not running now as shown in figure (14)

Figure (14)

After running the simulation the simulation showing the transient analysis will look like as

in figure (15)

Figure (15)

In the graph window you can right click and select Add Traces to draw the signal of interest

Then choose V(in) to draw the input voltage signal

To add the output voltage right click again and select Add Trace then select V(out) Here the

result will be as shown in Figure(16)

Figure(16)

Note

1) Another way to draw the voltage at any node by using voltage probe cursor

by left click on any wire to plot the voltage on the waveform viewer

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 8: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

Figure (15)

In the graph window you can right click and select Add Traces to draw the signal of interest

Then choose V(in) to draw the input voltage signal

To add the output voltage right click again and select Add Trace then select V(out) Here the

result will be as shown in Figure(16)

Figure(16)

Note

1) Another way to draw the voltage at any node by using voltage probe cursor

by left click on any wire to plot the voltage on the waveform viewer

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 9: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

2) To plot the current passes through any element you can use the current probe

cursor By left click on the body of the component

1048714 Convention of positive current is in the direction into the pin

Now to draw the current passes through resistor R2 in a separate graph at graph

window you can right click and select Add Plot Pane it will appear a new graph

At the new graph you can use the current probe cursor at R2 or right click and select

Add Traces then choose I(R2) the result will be as shown in figure (17)

Figure (17)

Now you can draw the Power dissipated in resistor R2 as follow

a) Right click on the graph window and select Add Plot Pane to plot the power at

separate graph

b) At the new graph Right click and select Add Traces then choose I(R2) and write

( ) then choose V(out) as shown in Figure (18)

Figure (18)

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 10: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

The result will look like as shown in figure (19)

Figure(19)

To measure the RMS value for any signal Hold down Ctrl and left click on the I or V trace label in the waveform viewer For example the RMS value for input

signal equal to (119881119886119898119901

radic2=

315

radic2= 2227119881)as shown in figure (20)

Figure (20)

You can exchange the color by right click on the trace label of the signal and

choose the color from the window that appear

You can also edit the color of the graph waveform schematic and traces by

left click on the Tool menu gtgt color reference Then exchange the color as

you want let us now exchange the background of graph from black to white

as shown n figure (21)

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 11: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

Figure (21)

Then we can take the graph to word file and print it as shown in figure (22)

Figure (22)

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 12: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

C) DC sweep

DC Sweep Analysis is used to calculate a circuitsrsquo bias point over a range of values This procedure allows you to simulate a circuit many times sweeping the DC values within a predetermined range You can control the source values by choosing the start and stop values and the increment for the DC range The bias point of the circuit is calculated for each value of the sweep

Ex ) let us make a DC sweep for the circuit shown in figure(23)

Figure(23)

First Drawing the Circuit in Schematic Window Its very easy now to draw the circuit as we learn above

Note that the voltage source must be DC source to make a DC sweep simulation

After drawing the circuit it will be as shown in figure (24)

Figure (24)

Second Simulating the Circuit

As the previous procedure above but here we choose DC sweep simulation

To do the DC sweep simulation click on the DC sweep and fill the command window

with appropriate values as shown in figure (25)

Figure(25)

After running the simulation draw the Vin and Vout as you learn above

The figure that have a dc sweep will be as shown in figure (26)

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph

Page 13: Digital Electronics LABsite.iugaza.edu.ps/askalloub/files/2017/02/LAB1.pdfPSpice Lite 9.2 is one of the OrCAD family of products, from Cadence Design Systems, Inc., offering a complete

Figure (26)

Note that at the dc sweep the X axis represent the voltage that will increase from

value to another Here from 0V to 12V But in transient simulation the X axis

represent the time

Homework For the circuit shown in figure (27) we can find the independent current source by

click on component icon then writing current in the dialogue widow that appear

Figure(27)

a) Assume that the voltage source equal to 20 VDC measure the current passes

through resistor R2 (use DC operation point)

b) Use the DC sweep analysis to draw the vin and vout when the input voltage

increased from 0V to 20V

c) Replace the voltage source with an AC sine wave that has amplitude 1mv and

frequency 1Khz ( let the offset equal zero ) Then use the transient analysis to

draw Vin and Vout Hint a- use stop time equal to 3 ms to draw 3 cicles

b- Draw each signal ( Vin amp Vout) in a separate graph