University of Nottingham Electromechanical devices MM2EMD Lecture 5 Using Operational Amplifiers (opamps) in the real world Dr. roderick.mackenzie@nottingham.ac.uk Summer 2015 @rcimackenzie Released under
Outline of the lecture Recap of last lecture Mini Quiz Books and resources Opamps used in the real world Measuring acceleration Measuring stress and strain. Summary 2
Recap: Race times All gates have a 'turn on' and 'turn off' time. This is in effect a time it takes the gate to react to an input. A A 1 A 0 A 0 3
Recap: Race times A A B A O B 1 0 1 0 A O 0 1 0 time 4
Recap: digital v.s. analog signals Digital signal can only have two values on and off. A 1 0 Analog signals can take any value. You find analog signals in the real world, think of sound or vibration signals. 5
Recap: Modern analog systems an mp3 recorder. Analog electronics (amplifier filters) Voltage V 0.1 mv Voltage Voltage Many modern digital systems have analog electronic preprocessing of data. Analog to Digital converter mp3 6
Recap: The opamp (Bob Widlar) Operational amplifier An amplifier i.e. And 'operation', think of a mathematical something that makes a signal bigger. 7 operation.
Daniel Braun Recap: What's inside... ahhh.. 8
Recap: opamp equivalent circuit Vin Inverting input () output Vout. time Vin Vout time Noninverting input () Vin A=Vout 9
Recap: It contains two resistors Rin Ro Rin = an input resistance very high we can assume this is infinite. Ro = output resistance very low we can assume this is zero (i.e. a short circuit) So let's further simplify our circuit taking into account the high Rin and the low Ro. 10
Recap: A simple opamp circuit Vin Vout 11
Gain (A) Recap: Problems with the opamp.. 106 Non linear gain 105 104 103 102 10 7 5 6 3 4 10 102 10 10 10 10 10 frequency 0.01 V A Output clipping 5V Vin*A=Vout 12
Recap: Opamps give a lot of nonlinear gain. if A open loop gain 106 Gain 105 104 10 i1 Vinput 103 102 Rin V=0V 102 103 104 frequency V A*V Vout 0 Volts G closed loop gain 10 i 105 106 107 We can make the gain linear by adding a feedback resistor. 13
Recap: Inverting amplifier and adding amplifier if Ri i1 n Vinput R3 R2 i V3 V V=0V Vout A*V 0 Volts V0 R f A = V i [ R r ( A1)R f ] V0 Rf G= = Vi R1 R1 V2 V1 i3 i2 i1 Rf if V i A*V Vout 0 Volts V out = [V 1 V 2 V 3 ] 14
Outline of the lecture Recap of last lecture Mini Quiz Books and resources Opamps used in the real world Measuring acceleration Measuring stress and strain. Summary 15
Quiz Q1: Q: What can we assume the input resistance of an opamp is? Rin 16
Quiz A1: Q: What can we assume the input resistance of an opamp is? Infinite Rin In fact it's so big we can assume it's not there! 17
Quiz Q2: Q: What can we assume the output resistance of an opamp is? Ro 18
Quiz A2: Q: What can we assume the output resistance of an opamp is? zero Ro In fact it's so small we can assume it's not there! 19
Quiz Q3: Q: Why do we need to use a feedback resistor in an opamp circuit? if Rin i1 Vinput V=0V i V A*V Vout 0 Volts 20
Quiz A3: Q: Why do we need a feedback resistor to use an opamp? Gain A1) The gain is too high to be useful A2) The gain is nonlinear. A open loop gain 106 105 104 103 102 10 G closed loop gain 10 102 103 104 105 106 107 frequency 21
Outline of the lecture Recap of last lecture Mini Quiz Books and resources Opamps used in the real world Measuring acceleration Measuring stress and strain. Summary 22
Recommended reading: A general text book If you feel you need a text book and only want to buy one get this one: An introduction to Mechanical Engineering, Part 1 pp. 365371 42 23
Recommended reading: Useful for later in industry or now if you are interested A little more in depth on digital electronics: 29 42 Lots of in depth stuff on analog circuits classic text book. 30 60 24
Recommended reading: Useful for later in industry or now if you are interested This is the classical practical electronics book. Every electronic engineer has this on his shelf. 2860 25
Outline of the lecture Recap of last lecture Mini Quiz Books and resources Opamps used in the real world Measuring acceleration Measuring stress and strain. Summary 26
Let's think about measuring acceleration Often we need to measure acceleration Because acceleration can tell us a lot about our environment acceleration dt=velocity velocity dt= position 27
Now let's think about the crystal quartz AlaskaMining Quartz 28
The pizoelectric effect in quartz Normally quartz has a regular arrangement of positive and negative ions: JJ Harrison quartz 29
The pizoelectric effect in quartz Force But what has this got to do with measuring acceleration? 30
Detecting acceleration with quartz crystal Let's put a mass on top of the quartz crystal Mass Solid base 31
Detecting acceleration with quartz crystal Acceleration a produces force (F=ma) F=ma Force Force Mass Solid base The movement causes the output charge from the piezoelectric crystal to change producing a current. 32
This is how you make an accelerometer acceleration F=ma Force i A Mass Force Solid base A accelerometer The current changes when the sensor experiences acceleration Let's have a look at this effect in more detail... 33
We have two problems... F=ma Force i A Mass Force Solid base Problem 1: i is very small.. too small to be used... how might we fix that?? Problem 2: i is not proportional to the acceleration, it's actually a bit more complex.. let's have have a look at this first...
Simplification of accelerometer Solid base A A Mass i i Force Force
You can think of a piezoelectric crystal as a capacitor Q Q Force A dq i= dt i Force Q Force 36
We can therefore we can write... dq i= dt Q Force Q A i Force Q Force d Force i dt Force=ma da i m dt Current from accelerometer is proportional to change of charge with time 37
How would you solve this equation for 'a'? Force Force Mass Solid base mounted on car, boat, rocket... i A da i m dt 38
To solve this equation we need to integrate... Force Force Mass i A To calculate the acceleration we need to integrate the current. To do this we need an integrator circuit... da i m dt 1 i dt a m 39
An opamp based integrator circuit i dt V out C i Notice the capacitor in the feedback loop V Vout This will integrate current i, and Vout will be proportional to 40 the sum of the integration.
An integrator circuit C i1 dt V out a Vc accelerometer i1 V V out a 41
Question How many people think understanding the accelerometer/integrator circuit is: Boring and pointless Important to my future career Very important to my future career C Possibly the most important i dt V a 1 out thing I will learn at university!! accelerometer
An example of an accelerometer and integrator circuit in action. Pavel Kolotilov An example is in this Russian proton M rocket. GLONASS satellite (Russian GPS) On the 1st July 2013 it was put on top of a Proton M rocket combined cost costs 4.4 billion rubles.
An engineer coupled the accelerometer the wrong way around to the opamp. Rin Ro V V0 A* V accelerometer Rin Ro V A* V V0 Youtube link
So.. Opamps in general are very important to know about and get correct. It's too important to just leave everything up to the electronic engineer. With this in mind we are going to spend a little time deriving the equation describing this circuit and linking acceleration to Vout.
An integrator circuit Input current from the accelerometer is: C dq i1 = dt Vc Force Q Force Q Q i1 V Vout Force 46
Examine the current node at the inverting input The amplifier has infinite input resistance so... i=0, therefore: C i f = i1 But we already know.. if dq i1 = dt 1 dq if = dt i1 Therefore, i Vc V A*V Vout 0 Volts 47
Examine the capacitor... From your notes on capacitance: dv c i f =C dt 2 C if Q i1 Vc Vout 0 Volts 48
Examine the capacitor... From your notes on capacitance: dv c i f =C dt But we already know 1 dq i f = dt C if Vc Equate equations 1 and 2 dvc 1 dq = dt C dt Q dv c dq = C dt dt 2 i1 Vout 0 Volts 49
Integrate both sides C dv c 1 dq = dt C dt if Q dv c 1 dq dt dt = C dt dt 1 V c = Q C i1 Vc i V Vout A*V 0 Volts 50
Integrate both sides C 1 V c = Q C if Q i1 We also know that V c V =V out and V out = AV Vc i V Vout A*V 0 Volts V out 1 Q =V out C A 51
The final step... V out V= 0 A V out 1 Q =V out C A However, A is very large so we can write C Therefore, if 1 V out = Q C Q F a V out = C C C Amplifier output voltage Q i1 Vc i V A*V Vout 0 Volts 52
Question: If you wanted to make your circuit more sensitive to small changes in acceleration (or Q) what would you change? C Q F a V out = C C C if Q i1 Vc i V A*V Vout 0 Volts 53
We can cascade these integrator elements Q F a V 0= C C C V 0 velocity V 0 distance 54
Outline of the lecture Recap of last lecture Mini Quiz Books and resources Opamps used in the real world Measuring acceleration Measuring stress and strain. Summary 55
A strain gauge SG2 SG1 Vs Vbridge SG3 V SG4 The voltage Vbridge is very small... so we need to amplify it.. And what do we use to amplify it????? 56
Application of opamps to strain gauges.. Force Beam Support opamp Support Vstrain Practical applications could be measuring strain on an aeroplane wing. Video of lab... 57
Using an opamp to amplify the output of a strain gauge Rf R1 SG2 SG1 Vs V Vbridge R2 SG3 SG4 V2 Rg We need to derive an expression relating Vbridge to Vout. Vo 58
Relate the inputs to the outputs The general idea is to write expressions relating the input terminals to the inputs of the opamp. Then to write an expression relating the input terminals of the opamp to the output of the opamp. Let's have a go..
Let's just start off by looking at the opamp. Rf R1 V R2 V1 V2 Rg Vo Write on all current and voltage arrows. 60
Annotate the diagram with arrows, currents and voltages Rf i1 i2 V1 V2 R1 if i1r1 R2 i 2 R2 igrg V V ig Rg i f Rf A*V VT Vo 61
First write an expression relating V1 of the circuit to the inverting input of the opamp. V =V 0 i f R f V =V 1 i1 R 1 V 1 V i1= R1 1 V 0 V if = Rf 2 Equating equation 1 and 2 i f = i1 V 1 V V 1 V 0 = R1 Rf 62
Rearrange the equations to get the voltage V V 1 V V 1 V 0 = R1 Rf V 1 R f V R f =V 1 R 1 V 0 R 1 V 1 R f V 0 R 1=V 1 [ R 1 R f ] V 1 R f V 0 R 1 V = R1 R f 63
Then write an expression relating input V2 to the noninverting input of the opamp. As the input resistance of the opamp Rin=infinity i g =i2 And R2 and Rg from a potential divider Rg V = V2 R2 R g 64
Now write an expression relating the inputs of the opamp to the output of the circuit We know that, V 0=VA We also know, V =V V 4 Therefore 5 V0 =V V A We now have an expression relating the inputs of the opamp to the output and we have expressions relating the input terminals to the inputs of the opamp. 65
Recap and rearranging our equations... V0 =V V A V 1 RV 0 R 1 V = R 1 R f Rg V = V2 R 2 R g Substituting 3,4 and 6 in 5 we get [ ] [ ] [ V0 Rg V 1 R f V 0 R 1 = V 2 A R2 Rg R 1 R f [ ] ] [ R1 Rf 1 Rg V0 =V 2 V 1 A R 1 R f R 2 R g R1 Rf ] 7 66
Let's make a few assumptions.. [ ] [ ] [ R1 Rf 1 Rg V0 =V 2 V 1 A R 1 R f R 2 R g R1 Rf ] If A>> 0, R2=R1 and Rg=Rf Which is generally true for difference amplifiers [ ] [ ] [ R1 Rf Rg V0 =V 2 V 1 R 1 R f R 2 R g R 1 R f ] V 0 [ R 1 ] =V 2 [ R f ] V 1 [ R f ] Rf V 0=[V 2 V 1 ] R1 67
Questions Rf R1 SG2 SG1 Vs V Vbridge R1 SG3 SG4 Rf V 0=[V 2 V 1 ] R1 V2 Rf Vo 68
Typical exam question: a) Explain why you would need to use an operational amplifier when using a strain gauge? b) Your strain gauge is attached to an operational amplifier with R 1=R 2=10 k Ω and R g=r f =1 M Ω calculate the output voltage when the wheatstone bridge produces 0.1 V across it. Rf V 0=[V 2 V 1 ] R1 69
Typical values a) Strain gauges produces very small voltages which need to be amplified. b) R 1=R 2=10 k Ω R 1=R 2=1 M Ω Therefore 6 1 x 10 V 0=[V 2 V 1 ] 4 1 x 10 V 0=100 [V 2 V 1 ] 70
Summary We can now analyse the circuit for strain gauges and accelerometers acceleration Support Vstrain Strain gauge Force Mass Beam Support F=ma Force Force Output charge Solid base Accelerometer 71