op amp basics 8 - university of colorado boulder€¦ · 4 7 characteristics of the ideal op amp 1....

21
1 1 Op Amp Basics op amp = operational amplifier Prepared by Scott Robertson Fall 2007 Diefenderfer and Holton (D&H), Ch. 9 Horowitz and Hill (H&H), Ch. 4,5,6,7 2 What are they good for? • Amplifiers: sum and difference of voltages • Differentiators • Integrators Buffers or follower (cable drivers) • Filters: high pass, low pass, bandpass, band reject, notch • Comparators Limitations of op amps (nonideal behavior) Oscillators (another lecture)

Upload: dinhnhan

Post on 13-Apr-2018

217 views

Category:

Documents


2 download

TRANSCRIPT

1

1

Op Amp Basics

op amp = operational amplifier

Prepared by Scott RobertsonFall 2007

Diefenderfer and Holton (D&H), Ch. 9

Horowitz and Hill (H&H), Ch. 4,5,6,7

2

What are they good for?• Amplifiers: sum and difference of voltages• Differentiators• Integrators• Buffers or follower (cable drivers)• Filters: high pass, low pass,

bandpass, band reject, notch• Comparators• Limitations of op amps (nonideal behavior)• Oscillators (another lecture)

2

3

Theorists view: 3 pins:

Experimentalists view:7 pins + ground:

+

VoutVB

VA

VoutVB

VA

V+

V−

Offset adjust

(optional)

Vout = Gain × (VB – VA) Vout from Golden Rules

Inverting input

Non-inverting input

+

Positive power supply

Negative power supply

Ground is sometimes not connected to the op amp.

4

Manufacturer’s views

Dual-in-line (DIP) PackageThe socket also has a notch at pin 1 so you don’t put the op amp in backwards.

Notch

3

5

What’s inside?

National’s LF356

6

“Bypass” the impedance of the power supply wires using small capacitors

VoutVB

VA

V+

V−

+

0.01 μF, >15 V

Failure to do this can cause oscillation and “cross talk”between circuits because the power supply voltage will otherwise vary when the load varies.

To power supply

To power supply

A screwdriver-adjust potentiometeris used for “one time” offset adjustment

Small disc ceramic capacitors are used for “bypass.” They MUST be located near (a few cm) to the chip and attached to a “good” ground.

4

7

Characteristics of the ideal op amp1. Input impedance is infinite

inputs draw no current2. Gain G is infinite

in the math, terms with 1/G → 03. Negative feedback determines the

function performed Negative feedback is a connection from the output to the inverting input

4. Output impedance is zero

From D & H ch 9-1

8

Inverting x1 amplifier (G not ∞)

+

− Vout

VB

VA

R

R

I1

I2Vin

BGAGV

AB

inGGV

inout

Ainout

outAAin

Aout

B

VVVV

VVV

VVVR

VVR

VV

VGVV

out

out

⎯⎯ →⎯=−

−⎯⎯ →⎯−−=

+−=

−=

−=

−×==

∞→

∞→

;

unknowns 2 equations, 22

(2)

II(1) )0(

thus0

2

21

Negativefeedback

5

9

Golden rules of ideal op amps

1. The output does what is necessary to make VB = VA.

2. The inputs draw no current.

With these rules, knowledge of G is not needed as long as G>>1.

Reference: H&H 4.03

10

Inverting amplifier from Golden Rules

+

Vout

VB

VA

R2

R1

I1

I2Vin

inout

outin

AB

VRRV

RV

RV

VVII

1

2

21

21

unknown 1 equation, 1

000 and

:rulesGolden

−=

−=

−===

X10 inverting amplifier if R2 = 100KΩ and R1 = 10 kΩ.

6

11

Summing amplifier

+

Vout

VB

VA

R

V1V2V3

VA = 0

Vout = -(V1 + V2 + V3)

R,R,R

“intuitively obvious”

12

Current to voltage converteror electrometer

+Vout

VB

VA

R

I1

-I1

Vout = −I1 R + Voffset

Used to measure small currents.

Offset error: Voffset = -Ileak R,

where Ileak is the nonideal input offset current

(also called Ibias).

→ Ileak-

7

13

Non-inverting amplifier with gain >1

+

Vout

VA

R2

R1

I1

I2

Vin

1

2

1

21

21

1

1

:divider voltagesimple isFeedback rule)(Golden

RR

VV

RRRVV

RRRVV

VV

in

out

inout

outA

Ain

+=

⎟⎟⎠

⎞⎜⎜⎝

⎛ +=

⎟⎟⎠

⎞⎜⎜⎝

⎛+

=

=

Answer is NOT R2/R1.

Can’t make a x1 or x0.5 amplifier this way!

VB

14

Non-inverting amplifier with gain = 1 or <1

+

Vout

VA

Vin

x1 amplifier is a buffer or followerIt is used to drive long lengths of cable, otherwise signal is decreased.

High current buffer amplifiers with no “-B”input are available.

VB

+

Vout

VA

Vin

VB

Volume control, gain <1

BUF634 can put out 250 mA !

8

15

Difference or “B-A” amplifier

+

Vout

V1

VA

R2

R1

V2

R1R2

VB

The mathematical analysis is in D&H, ch. 9-5, (3 eqns., 2 unknowns)

1

212 )(

RRVVVout −=

Gain can be 1, >1 or <1.

16

Differentiator from Golden Rules

inout

outin

outin

AB

VdtdRCV

RCVV

dtd

RVV

dtdC

VVII

−=

−=

−=

===

unknown 1 equation, 1

or

0 and :rulesGolden

21

+

Vout

VB

VA

R

C

I1

I2Vin

The derivative of a step fcn. is a delta fcn.

What determines the width of the delta fcn. in this case?What determines the height?

Vin

Vout

Here is what it will do to a square pulse:

oscilloscope

9

17

Simple integrator is “ruined” by nonideal Ibias

+

→ Ileak

Vout

VB

VA

C

R

I1

I2Vin

stops.n integratio andcurrent leakage by the voltagesupply the tocharged iscapacitor the,Eventually

)0(11

unknown 1 equation, 1

or

0 and :rulesGolden

nintegratioofconstant

00

21

4342143421

=+′−′−=

+−=−=−

===

∞→

∫∫ tVtdIC

tdVRC

V

CI

RCVV

dtdV

dtdCI

RV

VVII

out

t

leak

t

inout

leakinoutoutleak

in

AB

Ileak is the tiny input current to terminal VA, often ignored. Ileak is also called Ibias.

18

Practical op amp integrator with extra resistor

+Vout

VB

VA

C

R1

I1

I2Vin

22

2

02

merror ter

0201

2121

21

:is thisofcost The big. R make so

1or 1

1

if small is error term

11

or

0 and :rulesGolden

RIVCR

tV

tdVCR

tdVCR

tdVCR

V

CRV

CRVV

dtd

RVV

dtdC

RV

VVII

leakoffset

out

t

out

t

out

t

inout

outinout

outout

in

AB

−=

<<<<

′−′−=

−−=−−=

===

∫∫4434421

Ileak is the tiny input current to terminal VA, often ignored.

R2

R2 tends to discharge C

→ Ileak

10

19

Error of practical integrator is “droop”Vin

t’ → t

Vout True integral

Output of practical integrator “droops” with time constant R2C

Not significant if R2C >> t

Input signal

oscilloscope

20

The comparator

a special kind of op amp

11

21

Comparatoroutput is either high (V+) or low (V-)

+

Vout

VA

V+

VB

Vref

Vtest

Vtest > Vref Vout is V+

Vtest < Vref Vout is V-

Op amps designed to be comparators are not damaged if VA ≠ VB.

22

Comparator as temperature controller

+

Vout

V+

Vref

Vtest

V+

Heater

RT

Thermistor RT is heated and gets more resistive, driving Vtest down below Vref, and the heater turns off until the comparator changes state again.

Buffer

R

R

R

Note that V- can be ground.

“Thermostat”

Colder

Hotter

12

23

Some comparators only “sink” currentthe output is an “open collector”

+

Vout

VA

V+

VB

Vref

Vtest

Rload

LF311

Wait a bit and we will talk about transistors and what this means.

V+

24

Schmitt triggerDefinition:

A comparator that goes high at a higher reference voltage than the reference voltage for going low.

If off, and then

Vtest > Vref - ΔV then output goes high (furnace turns on at 68 F)

If on, and then

Vtest < Vref + ΔV then output goes low (furnace turns off at 70 F)

Why do this?

So that your furnace (for example) will stay on until the house heats up a few degrees, then turn off. The furnace should run 5 minutes per hour rather than 5 seconds per minute. ΔV determines how much the parameter being controlled is allowed to vary.

13

25

Comparator made into Schmitt trigger

+

Vout

V+

Vref

“thermostat”

Vtest

V+

Heater

RT Buffer

Positive feedback (100RT) raises Vtest relative to Vref when the heater is on, which has the same effect as lowering Vref (by about 1% in this case). This circuit provides control to order 1%.

100 RT

R R

R

RT ≅ R

26

Schmitt trigger for digital logicprevents noise from changing the output

Vref+ΔVVref – ΔV

Vin

Noisy signal

Special symbol For Schmitt trigger

time →

Clean output

Noisy outputOrdinary

comparator

Vout

Vout

14

27

Comparator made into time delay

+

Vout

VA

V+

VB

Vref

time →

Vref

Vin

Vout

Input pulse (solid)

C voltage (dotted)

Delayed output pulseDelay is of order RC

R CVin

28

Filters

15

29

Filters are for1. removal of noise2. selecting a feature (radio station?)Low pass High pass Bandpass,

Band reject

f f f

Q ≅ f / Δf

Quality factor

in

out

VV

in

out

VV

in

out

VV

30

Unsophisticated low pass filter (3db per octave)

+

Vout

VB

VA

Z2 = [(R2)-1+jC2ω]−1

Z1= R1

Vin

ω

ω

ω

jRCVV

CjRRR

VV

RZjCR

Z

VZZVV

RRV

in

out

in

out

inoutinout

+=

+⎟⎟⎠

⎞⎜⎜⎝

⎛−=

=⎟⎟⎠

⎞⎜⎜⎝

⎛+=

−=−=

11

:RC simple toCompare

11

and 1 :Let

becomes

analysiscircuit amp opin by Z R Replace

21

2

11

1

22

2

1

2

1

2C2

R2

Vin Vout

Vout/Vin

f

16

31

Unsophisticated high pass filter

+

VB

VA

R2

C

I1

I2Vin R1

ωωω

ω

ωωω

ω

ω

jRCjRCjRC

jCRR

VV

CjRRR

CjRCjR

jCRR

VV

RZjCRZ

VZZV

in

out

in

out

inout

/111

1/1

:RC simple toCompare

/111

1/1

and /1 :Let

11

2

1

2

1

2

2212

1

2

+=

+=

+=

⎟⎟⎠

⎞⎜⎜⎝

⎛+

−=+−

=⎟⎟⎠

⎞⎜⎜⎝

⎛+

−=

=+=

−=

Vin

Vout/Vin

f

32

Sophisticated filters• You can easily get 6 db per octave with 1 op amp, 2 Rs

and 2 Cs, so don’t settle for 3 db per octave (previous slides).

• It is standard practice to copy the filter design from a book.

• There are “too many” filter designsButterworth, Bessel, Chebyshev, etc.Some designs are flatter near the cutoff.

• See textbooks for examples

f

17

33

Typical 6 db per octave filter4 Rs, 2 Cs

+

C

R

C

See H&H, Fig. 5-16.

R

R

R

34

Twin – T notch reject filterVin

Vout

90 degreephase advance at f0

90 degreephase delay at f0

At frequency f0, currents from the two sides of the circuit are 180 degrees out of phase and cancel at location Vout .

f0 f

2C R/2

R,R C,C

Vout/Vin

18

35

Non ideal op amps

• There is a nonzero input current (20 pA?)• Op amp can’t put out more volts than V+ or V-

• The output current is limited (usually it can’t drive a long 50 ohm cable) 5 V / 50 ΩΩ = 100 mA = too much

• The frequency response is limited(pay more $ above 1 MHz)

36

Input current is not zero

And it increases with temperature strongly!

LF156 family

19

37

Output impedance

Output impedance is higher at higher frequencies and higher gains Av.

Don’t ask for more than about 15 mA from this chip. This chip cannot put 1 V onto 50 ohms!

LF156 family

38

Op amp frequency response

)(1)(1)(

0

0

0

0

ffjG

jGG

+=

+=

ωωω

000 )( ωωωωω >>≅× GG

Open loop gain G(ω) is less at high frequencies.

f0 and ω0 are 3 db points of op amp.

Open loop gain-bandwidth product (~5 MHz) is a constant at the higher frequencies.

An expression for the gain G valid at all frequencies is:

)/(1)(

0

0

ωωω

jGG

+=

20

39

Using gain bandwidth product

Suppose the gain-bandwidth product G(ω)ω = 5 MHz.

Then I can have a gain of 5 at 1 MHz.

Or a gain of 1 at 5 MHz.

Or a gain of 50 at 100 kHz, etc.

This helps you SELECT the proper op amp for the job.

40

Op amp frequency response with feedback

If the feedback sets the gain at 30 db, then the frequency response of the circuit is flat to 100 kHz for this chip.

Open loop response

Closed (feedback) loop response for

30 db gain

21

41

The op amp has internal noise

Ordinary noise(independent of f)

1/f (one-over-f) noisebelow ~100 Hz (varies)

Noise is covered later in PHYS3330. Please wait a while to find out what √Hz is all about.