Lab 1 PSpice Op_Amp_Basics

13
Computer Aided Design & Simulation Page 1 Department of Electrical Engineering EE: Computer Aided Design & Simulations BEE-2ABC Course Instructor: Dr Awais Mehmood Kamboh Lab-1: BASIC OP-AMP CIRCUITS Name Reg. no. Report Marks / 5 Viva Marks + Lab Work / 10 Total/15

description

op-amp basic concepts.

Transcript of Lab 1 PSpice Op_Amp_Basics

Page 1: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 1

Department of Electrical Engineering

EE: Computer Aided Design & Simulations BEE-2ABC

Course Instructor: Dr Awais Mehmood Kamboh

Lab-1: BASIC OP-AMP CIRCUITS

Name

Reg. no. Report

Marks / 5

Viva Marks

+ Lab Work

/ 10

Total/15

Page 2: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 2

OBJECTIVE

To sketch the following basic op-amp circuits and explain the operation of each:

A. Inverting amplifier B. Non-inverting amplifier C. Differential amplifier D. Summing amplifier

In this laboratory experiment, you will learn several basic ways in which an op-amp can be connected using –ve feedback to stabilize the gain and increase the frequency response. The extremely high open-loop gain of an op-amp creates an unstable situation because a small noise voltage on the input can be amplified to a point where the amplifier in driven out of its linear region. Also unwanted oscillations can occur. In addition, the open-loop gain parameter of an op-amp can vary greatly from one device to the next. Negative feedback takes a portion of output and applies it back out of phase with the input, creating an effective reduction in gain. This closed-loop gain is usually much less than the open-loop gain and independent of it.

Note: You must submit a lab report containing the hand calculations and simulation results before

the start of next lab.

Closed – loop voltage gain, ACL

The closed-loop voltage gain is the voltage gain of an op-amp with external feedback. The amplifier configuration consists of the op-amp and an external –ve feedback circuit that connects the output to the inverting input. The closed loop voltage gain is determined by the external component values and can be precisely controlled by them.

A. Non-inverting amplifier

An op-amp connected in a closed-loop configuration as a non-inverting amplifier with a controlled amount of voltage gain is shown:

Page 3: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 3

The input signal is applied to the non-inverting (+) input. The output is applied back to the

inverting (-) input through the feedback circuit (closed loop) formed by the input resistor

R1 and the feedback resistor Rf. This creates –ve feedback as follows. Resistors R1 and Rf

form a voltage-divider circuit, which reduces VO and connects the reduced voltage Vf to the

inverting input. The feedback is expressed as:

The difference of the input voltage, Vin and the feedback voltage, Vf is the differential input of the Op Amp. This differential voltage is amplified by the gain of the Op-Amp and produces an output voltage expressed as:

The closed-loop gain of the non-inverting amplifier is, thus:

Notice that the closed loop gain is independent of open-loop gain of op-amp and set by selecting values of R1 and Rf. An expression for the input impedance of a non-inverting amplifier can be written as:

This equation shows that the input impedance of the non-inverting amplifier with –vefeedback is much greater than the internal output impedance of the Op Amp itself. The output impedance of a NI amplifier can be written as:

This equation shows that the output impedance of non-inverting amplifier is much less than theinternal output impedance, Zo of the Op Amp.

Page 4: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 4

Theoretical Calculations:

1. Design a non-inverting amplifier for the gain of 15. Let R1=1.5k. Please use uA741 as Op Amp. You can see the datasheet of uA741 from internet to find out its parameters like open loop gain, input resistance, etc.

2. Find the actual input and output resistance of non-inverting amplifier. 3. Find the bandwidth of this amplifier. (Hint: you can see gain-bandwidth product of

uA741 from its datasheet. Gain Bandwidth product = Overall Gain x Bandwidth)

Simulations:

Implement the following circuit in PSPICE. Use the values of R1 and Rf you calculated

above. Take RL=2K.

Make a new simulation profile. Give it some name. After you Click o.k, a new window will

appear. Select transient response in this window and make necessary changes as follows:

Page 5: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 5

Click apply and then o.k. Now simulate the circuit and see the output. You have given 1V input

signal. Does your Amplifier amplify the signal 15 times?

Now we have to see the frequency response of this amplifier in order to see its bandwidth.

Replace Vsin with Vac in the circuit as shown:

Now edit your simulation profile and then select AC Sweep/Noise in the window as shown:

Page 6: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 6

Click apply and then o.k. Now simulate the circuit. In PSPICE A/D lite window, click ‘Add

Trace’.

Now write ‘20*log((V(RL:2))/V(V4:+))’ in the trace expression as shown:

Page 7: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 7

Click O.K. and see the graph. You should see something like this:

Now you have to find the bandwidth of amplifier from this graph (the point where gain drops to

3dB from its original value is its bandwidth). Compare this value with the theoretical result.

Task1: Make an Amplifier whose bandwidth is 500 KHz and gain is 6dB. You can choose

any value of R1 and Rf.

Page 8: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 8

Slew Rate

Slew rate is the maximum rate (V/us, volts per microsecond) at which the output can change.In essence, slew rate is a measure of an amplifier's ability to follow its input signal. It is measured by applying a large amplitude step function (a signal starting at 0 volts and "instantaneously" jumping to some large level [without overshoot or ringing], creating a step-like look on an oscilloscope) to the amplifier under test and measuring the slope of the output waveform. For a "perfect" step input (i.e., one with a rise time at least 100 times faster than the amplifier under test), the output will not be vertical; it will exhibit a pronounced slope. The slope is caused by the amplifier having a finite amount of current available to charge and discharge its internal compensation capacitor.

When reading frequency response specifications, it is also necessary to know at what signal amplitude the given values apply. Also, the slew rate will differ if the amplifier is inverting or noninverting amplifier. The reason for this is that often a particular device has a very wide frequency response provided that only very small signals are applied, but slew rate limiting causes a much narrower frequency response when a normal signal is applied.

For a device to pass a sine wave with no distortion, the slew rate of the device must meet or exceed the highest rate of change of the sine wave. This occurs as the sine wave passes through zero going positive or negative and, although the rate of change has a different polarity in the two instances, the magnitude is the same in both instances:

Required Slew Rate = 2*pi*f*V f = frequency of the waveform in Hertz, V = maximum, or peak, amplitude of the waveform.

You can see the slew rate of uA741 from its datasheet but now we will also calculate the slew rate of

uA741 using PSPICE. Replace Vac with Vpulse in PSPICE and modify your Amplifier circuits as

follows:

Page 9: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 9

Now edit your simulation profile as follows:

Now simulate your circuit. Slew rate is the slope of rising edge of your output. Measure that slope and compare this value with the value of slew rate stated in the datasheet.

B. Inverting Amplifier

An op-amp connected as an inverting amplifier with a controlled amount of voltage gain is

shown in figure below:

Page 10: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 10

The input signal is applied through a series input resistor R1 to the inverting input. Also,

the output is fed back through Rf to the same input. The non-inverting input is grounded.

An expression for the output voltage of the inverting amplifier is written as:

The –ve sign indicates inversion. The closed-loop gain of the inverting amplifier is, thus:

The input & output impedances of an inverting amplifier are:

The output impedance of both the non-inverting and inverting amplifier configurations is very low; in-fact, it is almost zero in practical cases. Because of this near zero output impedance, any load impedance connected to the op-amp output can vary greatly and not change the output voltage at all. Theoretical Calculations:

1. Design inverting amplifier for the gain of 15. Let R1=1k. Please use uA741 as Op Amp.

2. Find the actual input and output resistance of inverting amplifier. 3. Find the bandwidth of this amplifier.

Simulations:

1. Implement inverting amplifier in PSPICE using the values of R1 and Rf calculated above. Take RL=2K. Using transient analysis tool plot the input and output voltage simultaneously in PSPICE.

2. Plot the frequency response of your inverting amplifier to see the bandwidth of your amplifier. Does it matches with the theoretical value.

3. Follow the steps of measuring slew rate as you followed in case of non-inverting Amplifier. Measure the slew rate of your inverting amplifier. Does this slew rate matches with the slew rate stated in datasheet? Does the slew rate matches with the slew rate of non-inverting amplifier?

Page 11: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 11

C. Difference Amplifier

It has inputs at both inverting and non inverting terminals. This configuration of op amp amplifies

the difference of the input signals based on the values of the feedback resistances. The differential

amplifier is designed to amplify the difference between the two input signals. A simple

differential amplifier is shown in following figure:

If the four resistors satisfy the relationship, R2/R1 = R4/R3, then the gain of this amplifier

is given by:

Because the amplifier only amplifies the difference between the two input signals, it rejects

common mode signals (signals which are common to the two inputs). Therefore, if common

noise appears at both inputs, it will be rejected. For this reason, the differential amplifier is

used in very noisy environments to reject noise.

If the same input signal is applied to both inputs, the common mode voltage gain of that

signal (which should be very small) is denoted as ACM. One can define what is known as

common mode rejection ratio (CMRR) as:

CMRR = 20log | AD / ACM |

Where AD is the ‘Differential Gain’ of the amplifier, and ACM is the ‘common mode gain’ of

the amplifier. For a good differential amplifier, the CMRR will be very large.

Page 12: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 12

Simulations:

Simulate the amplifier as shown in figure above. Take R2=R4=39k and R1=R3=2k. Then,

bias the amplifier with +15V or -15V. By applying a 1Vp-p, 200 Hz signal between two

inputs, measure the differential gain of this circuit.

Apply a common mode signal to the amplifier (this is done by connecting the function

generator simultaneously to both non-inverting and inverting inputs of the op-amp) as

shown in figure below. Measure the common mode gain of this amplifier. Measure the

CMRR of this amplifier.

D. Summing amplifier

This amplifier sums up all the inputs applied to its inverting terminal. Based on theatrical information given above calculate its gain transfer function.

Page 13: Lab 1 PSpice Op_Amp_Basics

Computer Aided Design & Simulation Page 13

Simulations:

1. Calculate theatrically and simulate the gain of this configuration when all resistances are equal, and when Rf is 100 times greater than the rest.