Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit...

10
Lab manual EEE 3510 Circuit Simulation Sessional Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC 1 International Islamic University Chittagong Department of Electrical and Electronic Engineering Experiment 6: Familiarization with PROTEUS simulator. Objective: (1) To know about proteus. (2) To know how to simulate a circuit in proteus. What is Proteus VSM? Proteus Virtual System Modeling (VSM) combines mixed mode SPICE circuit simulation, animated components and microprocessor models to facilitate co-simulation of complete microcontroller based designs. For the first time ever, it is possible to develop and test such designs before a physical prototype is constructed. This is possible because you can interact with the design using on screen indicators such as LED and LCD displays and actuators such as switches and buttons. The simulation takes place in real time (or near enough to it): a 1GMHz Pentium III can simulate a basic 8051 system clocking at over 12MHz. Proteus VSM also provides extensive debugging facilities including breakpoints, single stepping and variable display for both assembly code and high level language source. Proteus VSM includes a number of virtual instruments including an Oscilloscope, Logic Analyzer, Function Generator, Pattern Generator, Counter Timer and Virtual Terminal as well as simple voltmeters and ammeters.

Transcript of Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit...

Page 1: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

1

International Islamic University Chittagong

Department of Electrical and Electronic Engineering

Experiment 6: Familiarization with PROTEUS simulator.

Objective:

(1) To know about proteus.

(2) To know how to simulate a circuit in proteus.

What is Proteus VSM?

Proteus Virtual System Modeling (VSM) combines mixed mode SPICE circuit simulation,

animated components and microprocessor models to facilitate co-simulation of complete

microcontroller based designs. For the first time ever, it is possible to develop and test such

designs before a physical prototype is constructed.

This is possible because you can interact with the design using on screen indicators such as LED

and LCD displays and actuators such as switches and buttons. The simulation takes place in real

time (or near enough to it): a 1GMHz Pentium III can simulate a basic 8051 system clocking at

over 12MHz. Proteus VSM also provides extensive debugging facilities including breakpoints,

single stepping and variable display for both assembly code and high level language source.

Proteus VSM includes a number of virtual instruments including an Oscilloscope, Logic

Analyzer, Function Generator, Pattern Generator, Counter Timer and Virtual Terminal as well as

simple voltmeters and ammeters.

Page 2: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

2

Should you wish to take detailed measurements on graphs, or perform other analysis types such

as frequency, distortion, noise or sweep analyses of analogue circuits, you can purchase the

Advanced Simulation Option. This option also includes Conformance Analysis - a unique and

powerful tool for Software Quality Assurance.

Why Use Proteus VSM ?

Proteus VSM was the first product to bridge the gap between schematic and PCB for embedded

design, offering system level simulation of microcontroller based designs inside the schematic

package itself.

Over ten years later, Proteus VSM is still leading the field with more microcontroller variants

and peripherals than any competing product, better debugging tools and instruments and a

consistent focus on innovation.

This page outlines some of the benefits to using Proteus VSM as an embedded prototyping tool

in your workflow.

Flexibility

Key Points

» An Experimental Canvas for Design

» Write Firmware for Virtual Hardware

» Change Either Quickly and Easily

» Freedom to Create, Test and Perfect

Page 3: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

3

Proteus VSM provides a unique development platform for the embedded engineer. It allows you

to specify a program (HEX file, COF File, ELF/DWARF2 File, UBROF File etc) as a property

of the microcontroller part on the schematic and during simulation will show you the effects of

the program on the schematic you have created.

You can change your 'hardware' by rewiring the schematic, changing component values for

resistors, capacitors etc. and deleting or adding new components to the design. You can change

your firmware in the IDE of your choice and, once compiled, test the new code on the new

system at the press of a button.

This gives you total freedom to experiment with different ideas and to find the optimal design

solution for his project. The schematic serves as a 'virtual prototpye' for the firmware and it's

quick and easy to make changes to either.

Productivity

Key Points

» Faster Bug Fixes

» Fewer Design Iterations

» Enables Parallel Development

» Shorter Time to Market

Typically, engineers spend as much time finding and fixing problems and testing projects as they

do in creating them in the first place. This is an area where Proteus VSM excels.

When you set a breakpoint in your code the entire system stops when that line of code is reached.

When you then single step the entire system will advance, showing you the effects of the

execution of that line of code on your schematic (virtual prototype). This makes it easier to work

out where a particular problem lies and whether the software design or hardware design is at

fault.

Since the schematic is serving as the hardware it is perfectly possible to divide tasks and for one

person to develop the PCB layout whilst another uses the schematic as the basis for writing,

testing and debugging the firmware. This means that when the physical prototype finally arrives

from the manufacturer the firmware has already been completed and tested.

Since the system has been debugged and tested in software it will require fewer physical design

iterations and the product will therefore be market ready sooner.

Cost

Key Points

» Reduced Development Time

» Reduced Debugging/Testing Time

» Reduced Manufacturing Delays

» Reduced Equipment Costs

» Reasonable Cost of Ownership

As discussed above, Proteus VSM will save time and effort during the design phase and in the

testing/debugging phase. Both of these translate into cost savings for a project and these savings

multiply with each additional project undertaken.

Page 4: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

4

The ability to use the schematic in Proteus as a virtual prototype for firmware design and

debugging improves the quality of the physical prototype. Less design iterations mean less delay

at manufacturing and indeed lower manufacturing costs.

Proteus comes equipped with a rich suite of instrumentation and analysis tools, from DSO to

Logic Analyzer to I2C and SPI Protocol Analyzers. This makes it a mobile electronic workbench

and reduces the need for expensive physical equipment.

How Is This Useful Educationally?

In addition to providing high quality Schematic Capture and PCB Layout for traditional

computer aided design Proteus VSM is uniquely suited to teaching students about the design and

operation of embedded systems solutions. For the first time a full virtual debugging interface is

available in software, obviating the need for expensive hardware and allowing students the

freedom and flexibility to design and develop microcontroller solutions without the need for a

physical prototype.

The following is a comparison of Proteus VSM against a typical microprocessor hardware lab

equipped with evaluation boards and In Circuit Emulators.

Hardware Lab Proteus VSM Lab

Installation of hardware equipment typically

requires a dedicated lab.

Proteus VSM can be installed in general purpose

computer rooms anywhere on campus.

Equipping a hardware lab with In Circuit

Emulators is expensive.

Site Licences of Proteus VSM are significantly

discounted for educational use.

Test instruments such as oscilloscopes, logic

analysers and pattern generators add further

expense.

Proteus VSM includes 11 virtual instruments as

standard.

The number of users is limited to the amount

of physical hardware purchased.

Unlimited site licences of Proteus VSM have no

upper limit on the number of users.

Reworking or modifying hardware circuitry

can be tedious and prone to errors.

Circuit design in Proteus VSM is both simple and

flexible, allowing students to experiment easily

and quickly.

Student error can result in blown hardware

components and additional expense.

Proteus VSM is totally safe and virtual

components are indestructible!

Students are limited to working on the

equipment within the lab.

All site licences include a version for distribution

to students.

Students must wire up hardware in the lab

before attempting software tasks.

Circuits for lab exercises can be prepared in

advance.

Starting Simulation:

Install PROTEUS in your PC

Go to Start Manu> then Proteus 7 Professional> then open ISIS 7 Professional.

Page 5: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

5

After opening ISIS 7 Professional, you will see the following window.

Circuit Construction & Assembly:

Select component mode

Click on Pick Device/Symbol or just click on “P” to pick component or device.

Write down the name of your component in the dialogue box known as “Keywords”.

All steps are shown in the following figure-

Page 6: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

6

The selected component can be located on the left side window of the design diagram.

To put the component to the design sheet, just left click the component and put it to the

sheet.

To move the components, simply right click on the component (the component will be

red-lighted), and left click and drag the component to the desired location.

Selection of power and ground terminals: For power terminal and ground, the

component is NOT selected from the library. Select the “terminals mode” icon at the left-

side toolbar. Select POWER and GROUND terminals.

Page 7: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

7

Component Parameter Settings: To edit the component, select the component (right-

click) and left-click to open the Edit Component dialog. The dialog is different according

to the devices. Set the parameters as your circuit requirement.

Power source and signal input: To supply circuit power and different input signals such

as DC, SIN, PULSE, Clock and Audio etc select Generator Mode. You can also select

voltage and current sources from library.

Fig: Piecewise Linear Generator Type.

Measuring Instruments: To measure different parameters of the designed circuit select

Virtual Instrument Mode. You will get oscilloscope, ammeter, voltmeter, signal generator

etc in virtual instrument mode.

Graphs: To trace the graphs the following three modes are required.

a) Graph Mode.

b) Voltage Probe Mode.

Page 8: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

8

c) Current Probe Mode.

Having drawn the schematic, you choose the type of circuit analysis you require (transient,

frequency, noise, etc.) by placing a Graph of the appropriate type on the schematic. You can

place as many graphs as you want and can even have several graphs of the same type if you

wish. Graph types supported include: Analogue, Digital and Mixed transient graphs as well as

Frequency, Transfer, Noise, Distortion, Fourier, AC Sweep and DC Sweep and Audio graphs.

Set voltage probe or current probe to the circuit node or branch in which you want to see the

graphs. Then drag the probe to graph box or right click the graph box to add probe parameter by

“Add Traces” option. Finally right click the graph box and select “Simulate Graph” option.

Simulation:

After completing the circuit assembly and configuration, now it’s time to verify whether the

source code compiled is virtually accurate or not. Proteus offer a whole lot of variety virtual

devices. In fact, simulation using oscilloscope and function generator can be done using Proteus.

Even virtual hyperterminal is provided to demonstrate how your code performs in real world

without really doing the hardware section yet.

To start simulation, press the play button at the bottom toolbar. To stop the simulation, press the

stop button or press ESC.

Page 9: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

9

Example 1: Use of function generator and oscilloscope.

Example 2: Simulation of astable operation of a 555 timer.

R1

10k

R22k

A

B

C

D

AM FM

+

-

R4

DC7

Q3

GN

D1

VC

C8

TR2

TH6

CV5

U1

555

R139k

R268k

C110u

AK

D1LED-BIBY

AK

D2LED-BIBY

R3220R

R4220R

1

2

J1

CONN-H2

Page 10: Lab manual EEE 3510 Circuit Simulation Sessional · PDF fileLab manual EEE 3510 Circuit Simulation Sessional ... Department of Electrical and Electronic Engineering ... Lab manual

Lab manual EEE 3510 Circuit Simulation Sessional

Prepared By: Mohammed Abdul Kader, Assistant Prof., Dept. of EEE, IIUC

10

Example 3: 0-99 Counter

CLK1

E2

MR7

Q03

Q14

Q25

Q36

U1:A

4518

CLK9

E10

MR15

Q011

Q112

Q213

Q314

U1:B

4518

U1:A(CLK)

R2(1)

A7

QA13

B1

QB12

C2

QC11

D6

QD10

BI/RBO4

QE9

RBI5

QF15

LT3

QG14

U4

7448

A7

QA13

B1

QB12

C2

QC11

D6

QD10

BI/RBO4

QE9

RBI5

QF15

LT3

QG14

U2

7448Q1

2N2222A

R1

1k

R21k