24
SAW TOOTH WAVE GENERATION: AIM: Our aim is to generate the saw tooth waveform generation using pspice schematic. INTRODUCTION: 1

Analysis of Opamp Using Pspice

  • Upload
    karthi

  • View
    24

  • Download
    7

Embed Size (px)

DESCRIPTION

Opamp using Pspice

Citation preview

Page 1: Analysis of Opamp Using Pspice

SAW TOOTH WAVE GENERATION:

AIM:

Our aim is to generate the saw tooth waveform generation using pspice schematic.

INTRODUCTION:

1

Page 2: Analysis of Opamp Using Pspice

2

Page 3: Analysis of Opamp Using Pspice

SCHEMATIC OF SAWTOOTH GENERATOR:

3

Page 4: Analysis of Opamp Using Pspice

OUTPUT WAVEFORM :

SPICE DESGN USING LPF AND HPF:

The aim of this experiment

1. To design a First Order Low Pass OR a High Pass Filter using an Op-Amp and a

designated capacitor as the frequency determining component.

2. Build the low-pass or high-pass filter of your design and check its frequency response.

Drive the circuit with a sine wave and record input (constant) and output voltage for

different frequencies.

INTRODUCTIONS:

In this experiment you will design, build, and test the filters. The configurations to build

are: Active Low Pass Filter / Active High Pass Filter

Simulate the design using PSpice.

Layout the board using PCB Editor.

Construct the circuit on the PCB

4

Page 5: Analysis of Opamp Using Pspice

FREQUENCY RESPONSE OF FILTERS:

TYPES OF FILTERS:

The most common filters are:

1. Low Pass Filters (LPF)

2. High Pass Filters (HPF)

3. Band Pass Filters (BPF)

4. Band Reject Filters (also called Band Stop Filters BSF)

You’ll be building either an LPF or an HPF in this lab. The typical Frequency response

of these filters is as shown below

COMPONENTS REQUIRED:

These are your design constraints for this experiment: You are required to use the

LM318 Operational Amplifier, and the 0.22uF capacitor as one of the two frequency

determining components. All other resistor & capacitor values are determined by your

design calculations, but you may only use standard value components in the EECS Shop.

Standard Values will be discussed in the lab.

5

Page 6: Analysis of Opamp Using Pspice

CIRCUIT DIAGRAM:

The circuit configuration looks something like this Note that the op-amp is used in its non-

inverting mode (the input is connected to pin 3).

The resistor-capacitor configuration between the input and the op-amp's non-inverting input

provides the desired filtering.

PROCEDURE:

1. Design a Filter for the given Cut-off Frequency and Gain. The Relevant Equations for both

Low pass & High pass circuits are:

Note: Use C = 0.22uF for the capacitor in the filter network.

Select RF and RG between 1khz and 50khz. If RF and RG are less than 100 (chosen to be 1khz

or greater for a safety margin) too much current will flow through the feedback loop, and the LM

318 will be damaged. If RF and RG are greater than 50khz not enough current will flow

through the feedback loop, and will invalidate some of the other practical assumptions of the LM

318.

Gain: = 1 + RF/ RG

Cut off Frequency = 1 / (2 π RC)

6

Page 7: Analysis of Opamp Using Pspice

2. Simulate the circuit that you designed in PSpice. Use appropriate standard valuesof resistors.

Be careful to only pick values available in the EECS shop. Determine the power supply filter

capacitors by looking at the LM 318 datasheet on the lab website. Follow the steps below to

create the circuit simulation. If you do not follow the steps below the simulation will work, but

the circuit will not transfer to PCB Editor correctly.Creating your Circuit Schematic in Allegro

Design Entry CIS (PSpice) so it is compatible with PCB Editor.

a. Create a new “Analog or Mixed A/D” blank project.

b. Select and delete all libraries currently in the “Libraries” field. The only library left will be the

Design Cache (because it may not be deleted), but do not use any of its parts.

Create your schematic for simulation using the components in this folder.The recommended

components are:

Resistor – R/ANALOG

Capacitor – C disc/ANALOG

OP Amp – LM318

3.Bias the op-amp with a ±12 V supply. Apply an AC signal of 1Vpp to the Input.

4. Obtain the Frequency Response (the Bode Plot – magnitude and phase) of the filter using

PSpice.

FILTER DESIGN:

Filters are electric components that allow applying different operations to signals based on

specific frequencies. – Example Operation: Gain, Attenuation, Phase Shift

EXAMPLES OF FILTERS:

Equalizer on a stereo

Allows you to apply different gains at different frequencies

Car fuel gauge Display the level of fuel in the gas tank without changing the reading as

the car drives over bumps and goes through corner

7

Page 8: Analysis of Opamp Using Pspice

IMPEDANCE OF A CAPACITOR:

IMPEDANCE OF AN INDUCTOR

IMPEDANCE OF A RESISTOR:

FREQUENCY RESPONSE:

Here we can see the circuit passes low-frequencies.

High-frequency signals are reduced in magnitude (attenuated) and shifted -90deg

There is a transition region in between low and high, near the time constant of the circuit.

This is called a low-pass filter.

AC CIRCUIT ANALYSIS:

PSPICE has a mode which does circuit simulation one frequency at a time and does the

measurements you just performed.

Called AC Sweep. Horizontal axis is frequency, not time.

Use VAC as the signal source, not VSIN.

Important to realize:

8

Page 9: Analysis of Opamp Using Pspice

Circuit simulator first solves for DC operating point

Then it finds how small AC signals get transferred through the circuit (in a linear manner for

linear circuits)

Circuit simulation then takes the AC small-signal source and passes it through the linearized

circuit

Important output data is magnitude or phase

SIMULATE THE SCHEMATIC:

Setup an AC Sweep Analysis

Decade spacing means use an equal number of points from 1kHz to 10kHz as from

100kHz to 1MHz (in each decade)

PHASOR OUTPUT:

Magnitude: often represented in decibels

Magnitude dB = 20 log10(Magnitude)

PHASE ANGLE:

9

Page 10: Analysis of Opamp Using Pspice

LOW PASS FILTER(SIMULATION):

Build the circuit shown below and determine the cut-off frequency (P-Spice).

HIGH PASS FILTER (SIMULATION):

Build the circuit shown below and determine the cut-off frequency (P-Spice).

10

Page 11: Analysis of Opamp Using Pspice

OPERATIONAL AMPLIFIERS USED FILTERS:

Continuing the discussion of Op Amps, the next step is filters. There are many different types of

filters, including low pass, high pass and band pass. We will discuss each of the following filters

in turn and how they are used and constructed using Op Amps. When a filter contains a device

like an OpAmp they are called active filters.These active filters differ from passive filters

(simple RC circuits) by the fact that there is the ability for gain depending on the configuration

of the elements in the circuit. There are some problems encountered in active filters that need to

be overcome. The first is that there is still a gain bandwidth limitation that arises. The second is

the bandwidth in general. In a high pass filter there is going to be high frequency roll off due to

the limitations of the Op Amp used. This is hard to overcome with conventional op amps. The

mathematical operations discussed in the previous lab (the integrator and differentiator) are both

types of active filters.As for now, the discussion will focus mainly on the low pass(LP),high

pass(HP)and band pass(BP)filters.There is also a band stop filter that can be created from the

band pass filter with a simple change of components. Low Pass Filters.The low pass filter is one

that allow slow frequencies and stops (attenuates)higher frequencies, hence the name. The design

of a low pass filter needs to take into consideration the maximum frequency that would need to

be allowed through. This is called the cut off frequency (or the 3 dB down frequency). Based on

the type of filter that is used (e.g. Butterworth, Bessel, Tschebyscheff) the attenuation of the

higher frequencies can be greater.This attenuation is also based on the order (e.g. 1st, 2nd, 3rd…)

of the filter that is used. Based on the order of the filter the roll off of the filter calculated using

the formula –n*20 dB/decade.This means that a first order low pass filter has an attenuation of -

20 dB/decade,while a second order filter should have -40 dB/decade roll off and on down the list

for higher orders. Shown in Figure 1 is the basic active 1storderlow pass filter (in the non-

inverting configuration) with unity gainThe equation in (1) is used to calculate the value of the

capacitor needed based on a chosen value for cutoff frequency and R1(or vice versa if a value for

C1anda cutoff frequency are chosen then the value of R1can be found). There is unity gain in

this configuration because of the non-inverting properties of the Op Amp. To change the gain,

the feed back network must be changed to include two other resistors (R2and R3).

11

Page 12: Analysis of Opamp Using Pspice

The gain is then found to be 1 + R3/R2because of the non-inverting configuration. The circuit

with a non-unity gain is shown.

To find the value of the capacitors needed the equations listed in (2) are helpful. Notice that the

values of the resistors in the circuit of Figure 3 and in (2) are equal. The odd coefficients of the

equations in (2) come from finding the transfer function and then solving for the desired cutoff

frequency. These are sometimes referred to as the frequency normalization coefficients. As the

need to go to higher orders arises, the need to cascade filters comes out. To get a 4thorder EE

3305 Bessel filter one would cascade two 2ndorder Bessel filters. Based on the cutoff frequency

chosen and the values of resistors available, the values of the capacitors can be calculated.High

Pass Filters If creating a low pass filter was easy, then creating a high pass filter is even easier.

In the case of the 1storder Bessel LP filter the capacitor and resistor only need to be interchanged

with each other and the result is a high pass filter.The same equation holds for finding the cutoff

frequency and is shown in (1). The circuit showninFigure4isthatofa1storder Bessel HP filter with

unity gain. The gain can be adjusted to the non-unity case by adding the feedback network

resistors in the same location as the LP circuit of Figure 2.

HIGH PASS FILTER:

If creating a low pass filter was easy, then creating a high pass filter is even easier. In the case of

the 1st order Bessel LP filter the capacitor and resistor only need to be interchanged with each

other and the result is a high pass filter. The same equation holds for finding the cutoff

frequency and is shown.

The circuit shown in Figure 4 is that of a 1st order Bessel HP filter with unity gain. The gain can

be adjusted to the non-unity case by adding the feedback network resistors in the same location

as the LPF.

SECOND ORDER BESSEL FUNCTION:

The values of the components used are calculated from (3). These values again arise from the

transfer function and then solving for each of the coefficients. To obtain a higher order filter the

12

Page 13: Analysis of Opamp Using Pspice

cascade technique will have to be used. Therefore to make a 4th order HP filter two 2nd order

HP filters need to be cascaded.

LPF SPICE MODEL:

RESPONSE FOR LPF :

13

Page 14: Analysis of Opamp Using Pspice

HPF SPICE MODEL:

RESPONSE:

OP-AMP COMPARATOR:

A comparator finds its importance in circuits where two voltage signals are to be compared and

to be distinguished on which is stronger. A comparator is also an important circuit in the design

of non-sinusoidal waveform generators as relaxation oscillators.

In an op-amp with an open loop configuration with a differential or single input signal has a

value greater than 0, the high gain which goes to infinity drives the output of the op-amp into

saturation. Thus, an op-amp operating in open loop configuration will have an output that goes to

positive saturation or negative saturation level or switch between positive and negative saturation

14

Page 15: Analysis of Opamp Using Pspice

levels and thus clips the output above these levels. This principle is used in a comparator circuit

with two inputs and an output. The 2 inputs, out of which one is  a reference voltage (Vref) is

compared with each other.

WORKING OF 741 IC OP-AMP COMPARATOR CIRCUIT:

NON-INVERTING 741 IC OP-AMP COMPARATOR CIRCUIT:

A non-inverting 741 IC op-amp comparator circuit is shown in the figure below. It is called a

non-inverting comparator circuit as the sinusoidal input signal Vin is applied to the non-inverting

terminal. The fixed reference voltage Vref is give to the inverting terminal (-) of the op-amp.

When the value of the input voltage Vin is greater than the reference voltage Vref the output

voltage Vo goes to positive saturation. This is because the voltage at the non-inverting input is

greater than the voltage at the inverting input.

741 IC Non-Inverting Comparator Circuit

When the value of the input voltage Vin is lesser than the reference voltage Vref, the output

voltage Vo goes to negative saturation. This is because the voltage at the non-inverting input is

smaller than the voltage at the inverting input. Thus, output voltage Vo changes from positive

saturation point to negative saturation point whenever the difference between Vin and Vref

changes. This is shown in the waveform below. The comparator can be called a voltage level

detector, as for a fixed value of Vref, the voltage level of Vin can be detected.

The circuit diagram shows the diodes D1and D2. These two diodes are used to protect the op-

amp from damage due to increase in input voltage. Thes diodes are called clamp diodes as they

clamp the differential input voltages to either 0.7V or -0.7V. Most op-amps do not need clamp

15

Page 16: Analysis of Opamp Using Pspice

diodes as most of them already have built in protection. Resistance R1 is connected in series with

input voltage Vin and R is connected between the inverting input and reference voltage Vref. R1

limits the current through the clamp diodes and R reduces the offset problem.

741 IC Op-Amp Non-Inverting Comparator Waveform

 INVERTING 741 IC OP-AMP COMPARATOR CIRCUIT:

An inverting 741 IC op-amp comparator circuit is shown in the figure below. It is called a

inverting comparator circuit as the sinusoidal input signal Vin is applied to the inverting

terminal. The fixed reference voltage Vref is give to the non-inverting terminal (+) of the op-

amp. A potentiometer is used as a voltage divider circuit to obtain the reference voltage in the

non-inverting input terminal. Bothe ends of the POT are connected to the dc supply voltage

+VCC and -VEE. The wiper is connected to the non-inverting input terminal.

When the wiper is rotated to a value near +VCC, Vref becomes more positive, and when the

wiper is rotated towards -VEE, the value of Vref becomes more negative. The waveforms are

shown below.

16

Page 17: Analysis of Opamp Using Pspice

Op-amp 741 IC Inverting Comparator Circuit

 COMPARATOR CHARACTERISTICS:

1. Operation Speed – According to change of conditions in the input, a comparator circuit

switches at a good speed beween the saturation levels and the response is instantaneous. 

2. Accuracy – Accuracy of the comparator circuit causes the following characteristics:-

(a) High Voltage Gain – The comparator circuit is said to have a high voltage gain characteristic

that results in the requirement of smaller hysteresis voltage. As a result the comparator output

voltage switches between the upper and lower saturation levels.

(b) High Common Mode Rejection Ratio (CMRR) – The common mode input voltage

parameters such a noise is rejected with the help of a high CMRR.

(c) Very Small Input Offset Current and Input Offset Voltage – A negligible amount of Input

Offset Current and Input Offset Voltage causes a lesser amount of offset problems. To reduce

further offset problems, offset voltage compensating networks and offset minimizing resistors

can be used.

17

Page 18: Analysis of Opamp Using Pspice

SPICE MODEL FOR OPAMP BASED COMPARATOR:

RESULT:

Thus the analysis of sawtooth wave generation ,high pass filter ,low pass filter and comparator is

verified successfully by using pspice simulation software.

18

Page 19: Analysis of Opamp Using Pspice

19