E40M Op Amps M. Horowitz, J. Plummer, R. Howe 1
Reading A&L: Chapter 15, pp. 863-866. Reader, Chapter 8 Noninverting Amp http://www.electronics-tutorials.ws/opamp/opamp_3.html Inverting Amp http://www.electronics-tutorials.ws/opamp/opamp_2.html Summing Amp http://www.electronics-tutorials.ws/opamp/opamp_4.html M. Horowitz, J. Plummer, R. Howe 2
How to Measure Small Voltages? Arduino input has full-scale around 5V It produces a 10 bit answer (1024) This means a LSB (least significant bit) is 5mV Need to make the signal bigger before input to Arduino So, we will use an amplifier Many ways to build amplifiers One often uses a standard building block for amplifiers Called an Operational Amplifier, or Op-Amp A circuit with very high gain at low frequencies (< 10 khz) M. Horowitz, J. Plummer, R. Howe 3
Electrical Picture Signal amplitude 1 mv Noise level will be significant will need to amplify and filter We ll use filtering ideas from the last two lectures M. Horowitz, J. Plummer, R. Howe 4
OP AMPS M. Horowitz, J. Plummer, R. Howe 5
Op Amp Is a common building block It is a high-gain amplifier Output voltage is A (V+ V-) Gain, A, is 10 K to 1 M LM741 Output voltage can be + or Often can swing between +Vdd and -Vdd supplies Huh? M. Horowitz, J. Plummer, R. Howe 6
Op-Amp Power Supply Up to now we had one supply voltage, Vdd All voltages were between Vdd and Gnd Generally measured relative to Gnd So all voltages were positive. A sinewave goes positive and negative And most input signals do that too It is convenient to have a reference where The output can be positive and negative Can do that by changing what we call the reference M. Horowitz, J. Plummer, R. Howe 7
Moving the Reference V dd = 5 V V dd = 2.5 V + - + v out - + - + - + - v out 2.5 V - The voltages are all the same, only the reference voltage has moved M. Horowitz, J. Plummer, R. Howe 8
What You Will Actually Do Use the USB supply Just change the reference voltage 5 V + - R R + - M. Horowitz, J. Plummer, R. Howe 9
Op Amp Behavior Relationship between output voltage and input voltage: v o = A( v + v ) = A( v p v ) n A is the op-amp gain (or open-loop gain), and is huge 10K-1M The input currents are very, very small so i p 0 and i n 0. M. Horowitz, J. Plummer, R. Howe 10
Since the Output Swing is Limited The high gain only exists for a small range of input voltages If the input difference is too large, the output saturates Goes to the max positive or negative value possible Close to supply voltages M. Horowitz, J. Plummer, R. Howe 11
What Does This Do? V cc = 5 V v out + 5 4 v in + - - + v out 3 + - 2.5 V 2 1-1 2 3 4 5 M. Horowitz, J. Plummer, R. Howe 12
Same Circuit Different Reference V dd = 2.5 V v out + 2 v in + - - + v out 1 0 + - 2.5 V - -1-2 -2-1 0 1 2 M. Horowitz, J. Plummer, R. Howe 13
How To Get A Useful Amplifier The gain of the op amp is too high to make a useful amplifier We need to do something to make it useful We will use analog feedback to fix this problem Feedback makes the input the error between the value of the output, and the value you want the output to have. Let s see how to do this M. Horowitz, J. Plummer, R. Howe 14
Connect V out to V in- v out = A(V + V ) = A(v in v out ) + V cc = 5 V v in + + - - -V cc = -5 V v out ( A +1)v out = Av in v out = A ( A +1) v in v in - M. Horowitz, J. Plummer, R. Howe 15
What Is Going On We solved the equation to find the answer But how does the op-amp get this answer? Think about what happens when the input increases in voltage From 0 V to 0.1 V Initially the output can t change There is capacitance at every node The op-amp thinks it needs to create a huge output voltage So it drives current into the output Which charges the capacitor Causing the output to increase This then decreases the input difference M. Horowitz, J. Plummer, R. Howe 16
Feedback in an Op-amp Circuit As the output rises The input difference decreases So A* DV in also decreases The system is stable when A* DV in is exactly equal to V out If A is large (10 6 ) for any V out Say in the range of ± 10V Dv in will be very, very small Can approximate that by saying Dv in will be driven to 0 Output will be set so v in+ v in M. Horowitz, J. Plummer, R. Howe 17
BUT This is only true if you connect the output feedback To the negative terminal of the amplifier What happens if you connect it to the positive terminal? M. Horowitz, J. Plummer, R. Howe 18
Ideal Op Amps The Two Golden Rules for circuits with ideal op-amps* 1. 2. No voltage difference between op-amp input terminals No current into op-amp inputs * when used in negative feedback amplifiers M. Horowitz, J. Plummer, R. Howe 19
USEFUL OP AMPS CIRCUITS M. Horowitz, J. Plummer, R. Howe 20
Approach To Solve All Op-amp Circuits First check to make sure the feedback is negative If not, STOP! Find the output voltage that makes the input difference 0 Assume V + = V - Find V out such that KCL holds We ll do some examples M. Horowitz, J. Plummer, R. Howe 21 E40M Lecture 19
Non-inverting Amplifier i p = 0 so v p = v s V + = V - so v n = v p = v s i 1 i 1 = i 2 so v o v s R 1 = v s R 2 i 2 v o 1 = v R s + 1 1 R 1 R 2 R v o = v 1 +R 2 s R 2 M. Horowitz, J. Plummer, R. Howe 22
Inverting Amplifier At node v n v n v s R s + v n v o R f + i n = 0 But v n =v p = 0 and i n = 0, so v s R s v o R f = 0 or v o = v s R f R s M. Horowitz, J. Plummer, R. Howe 23
Current-to-Voltage Converter i 2 i p = i n = 0 i 1 v n = v p = 0 i R So i R = 0 as well KCL at the v n node: i 1 = i s = i 2 = v o R f so v o = i s R f M. Horowitz, J. Plummer, R. Howe 24
OP AMP FILTERS M. Horowitz, J. Plummer, R. Howe 25
Adding Capacitors Sinusoidal voltage v o = v s Z f Z s = C f Suppose we add a capacitor in the feedback 1 1 + j 2πFC R f f R s We can treat this exactly as we did the earlier circuits by using impedances. Our earlier analysis showed vo = v s R f R s 1 Z s = R Z s f = 1 + j 2πFC R f f R = v f 1 s R s 1+ j 2πFR f C f M. Horowitz, J. Plummer, R. Howe 26
Sketching the Bode Plot 20 log 10 V o /V s 60 v o R f 1 = v s R V s 1+ j 2πFR f C s f V o 40 20 0 0.1 1 10 100 10 3 10 4 10 5 F [Hz] -20 R s = 1 kω, R f = 100 kω, C f = 160 nf F c = 1/(2pR f C f ) = 10 Hz M. Horowitz, J. Plummer, R. Howe 27
Learning Objectives Understand how living things use electricity Understand what an op amp is: The inputs take no current The output is 10 6 times larger than the difference in input voltages The two Golden Rules of op amps in negative feedback Input currents are 0; V in- = V in+ Be able to use feedback to control the gain of the op amp For inverting and non-inverting amplifiers Understand op amp filters and differential amplifiers M. Horowitz, J. Plummer, R. Howe 28
More Examples M. Horowitz, J. Plummer, R. Howe 29
Summing Amplifier i 1 i 2 i 3 i p = i n = 0 v n = v p = 0 KCL at the summing point (or summing node): v i 1 + i 2 = i 3 so 1 + v 2 = v o R 1 R 2 R Output voltage is a scaled sum of the input voltages: v o = R f v R 1 + R f v 1 R 2 2 M. Horowitz, J. Plummer, R. Howe 30
A Subtracting (Difference) Amplifier? Take an inverting amplifier and put a 2 nd voltage on the other input? i 1 + i 2 = 0 so v n v 1 R s + v n v o R f = 0 v 1 v2 v n = v 2 so v 2 v 1 R s = v o v 2 R f v o R f = v 2 v 1 R s + v 2 R f v o = v 1 R f R s + v 2 R f +R s R s Not quite what we wanted. We d like v o a (v 1 v 2 ). M. Horowitz, J. Plummer, R. Howe 31
Differential Amplifier 1.0 v 1 v n R 1 = v n v o R 2 v 1 v 2 R 4 R 3 +R 4 R 1 = v 2 R 4 R 3 +R 4 v o R 2 v o = v 1 + v 2 R 4 + R 1 R 4 R 2 R 1 R 1 R 3 +R 4 R 2 R 3 +R 4 But if R 3 = R 1 and R 4 = R 2 v o = v 2 v 1 ( ) R 2 R 1 M. Horowitz, J. Plummer, R. Howe 32