Op Amps Reading: Nilsson & Riedel Chapter 5 Sedra & Smith Chapter 2/5 Signal Amplification • Signal • a time-varying quantity • Carries information • Extract info by signal processing, with help of transducer • Amplification • Linearity • Saturation • Gain in db Amplifier Gain If the power delivered to the load is greater than the power drawn from the source, where does the additional power come from? Transfer Function Express gain in dB • Use absolute figures. -20dB means attenuation, but 20db is amplification • Eg Vin= 1V, Vout= 0.1V → attenuation, -20dB Power gain voltage gain in decibels = power gain only if the impedances at input and output are equal. Op Amp • Terminals • +, -, out V+ V• Offset pin used to compensate for degradation in performance • Voltages & currents @ terminals • All Currents into the terminals TI A741 op amp data sheet • Top row, left to right: • 14-pin plastic dual in-line package (DIP), • 8-pin plastic DIP (“mini-DIP”). • Middle row: • 14-pin thin-shrink small-outline package (TSSOP), • 8-pin small-outline package (SO- 8), • 8-pin TSSOP (where height matters) • Bottom row: Src: Art of electronics • 5-pin small-outline transistor package (SOT23), • 6-ball chip-scale package (CSP – top and bottom views), • 5-pin SC-70 LM741 LF412 LF347 Voltage transfer characteristics • Constraints for linear operation • Linear operation if input voltage difference is small • Amp saturates → non linear operation • In linear region, Vo= gain A * diff bt Vp and Vn • Typically A>10K Model for voltage amplifier. Check Sedra&Smith Fig 1.17 Ideal OpAmp At the input, the op amp does not load the circuit it is connected to. Its input terminal draws little to no power. • infinite A, infinite input impedance, zero output impedance The voltage between output terminal and ground always equal to 𝐴(𝑣2 − 𝑣1 ), independent of current drawn from output terminal into a load impedance Notes – for linear, ideal operation • Ideal OpAmp: infinite A, infinite input R, zero output R • Input Voltage constraint • Typically, Vcc<20V. Thus if A= 104 ,then |(Vp-Vn)| < 20/104 = 2mV • But usual input voltages >> 2mV. Voltage difference less than 2mV → the two voltages essentially equal • Linear region only if input voltages essentially equal (called virtual short condition) • Input Constraint Vp=Vn • Input Current constraint • Large input resistance > 1MΩ • ip = in =0 • In linear operation, Vo < +Vcc or > -Vcc Notes on op amp operation 1. Output current is generally not known (it is provided by external power supplies) 2. KCL at input nodes is generally a good starting point in op amp circuit analysis 3. (vp-vn) is multiplied by a large number to get Vout 1. Vout is limited by the external power supplies Eg 1a – LINEAR OPERATION • Calculate Vo if Va is 1V and Vb is 0V Eg 1a – LINEAR OPERATION • Calculate Vo if Va is 1V and Vb is 0V • Write node voltage eqn at inverting input. in=0 • (Va-Vn)/25 +(Vo-Vn)/100 = 0 • Vn = Vb • → 1 / 2 5 + Vo/100 =0 (less than 10V, linear region of operation) • → Vo = -4V • Note: -ve feedback, inverted output • Note: avoid writing node voltage eqn at output, Vo Avoid doing KCL at output terminal! It is possible to specify values of va and vb in the circuit below such that vo = −12 V A. B. True False It is possible to specify values of va and vb in the circuit below such that vo = −12 V A. B. True False Try: Eg 1b • Find Vo if Va=1V, Vb=2V in=0 Try: Eg 1b • Find Vo if Va=1V, Vb=2V (Va-Vn)/25 +(Vo-Vn)/100 = 0 -1/25+(Vo-2)/100=0 V=6V (linear) in=0 Eg • If Va= 1.5 V, what Vb avoids saturation? Eg • If Va= 1.5, what Vb avoids saturation? • Solve for -10 ≤Vo ≤ 10V • Upper limit: • (1.5-Vb)/25k +(10-Vb)/100k = 0 • Lower Limit • (1.5-Vb)/25k +(-10-Vb)/100k = 0 • Or Vb= 1/5(6+Vo) • Ans: -0.8 V ≤ Vb ≤ 3.2 V Chapter 5 – Op Amps Example (a) Find vo for vs = 0.4 V, 2.0 V, 3.5 V, −0.6 V, −1.6 V, and −2.4 V. Assume the op amp is ideal. (b) Find the range of input voltage vs for which the op amp operates in its linear region. 𝑣𝑝 = 0 ⇒ 𝑣𝑛 = 𝑣𝑝 = 0 Chapter 5 – Op Amps Example Find vo for vs = 0.4 V, 2.0 V, 3.5 V, −0.6 V, −1.6 V, and −2.4 V. Assume the op amp is ideal. 𝑣𝑝 = 0 ⇒ 𝑣𝑛 = 𝑣𝑝 = 0 0 − 𝑣𝑠 0 − 𝑣𝑜 KCL at 𝑣𝑛 : + +0=0 16,000 80,000 80,000 ∴ 𝑣𝑜 = − 𝑣 = −5𝑣𝑠 16,000 𝑠 vs [V] vo = −5vs [V] OK? 0.4 -2.0 Yes 2.0 -10.0 Yes 3.5 -17.5 NO – saturate at -15 V -0.6 3.0 Yes -1.6 8.0 Yes -2.4 12.0 NO – saturate at 10 V Chapter 5 – Op Amps Example, continued Find the range of input voltage vs for which the op amp operates in its linear region. Chapter 5 – Op Amps Example, continued Find the range of input voltage vs for which the op amp operates in its linear region. −15 ≤ 𝑣𝑜 ≤ 10 −15 ≤ −5𝑣𝑠 ≤ 10 3 ≥ 𝑣𝑜 ≥ −2 −2 𝑉 ≤ 𝑣𝑜 ≤ 3 𝑉 vo = −5vs = 10 vs = −2 V vo = −5vs = −15 vs = 3 V − 2 V vs 3 V Inverting Amp Circuit • (Vs-0)/Rs + (Vo-0)/Rf =0 • True even though infinite open loop gain A • and infinite input impedance for ideal op amp • Determine closed loop gain • But now gain is fixed at = -Rf/Rs • Using feedback resistor • Assuming pwr rails are ±Vcc , to avoid saturation, Vo< Vcc Assume ideal opamp, linear region • Choice of resistors for design should factor this in Can bypass very high open-loop gain, A, of op amp to get finite, predictable and stable closed-loop gain. Standard resistor values (Appendix H) Characteristics of inverting opamp: • Input impedance • Rs • Output impedance • Zero (directly connected to OpAmp) • Gain: -Rf/Rs Design Inverting Amp • Design inverting op amp with gain of 12, with ±15V power supplies. • Vo= -Rf/Rs X Vin. • Can use 12k and 1k, (also 18k, 1.5k) • What range of input voltages results in operation in linear region? • Vo=-12k/1k X Vs; |Vo| ≤ 15V • → Vs = -1/12 X Vo • → -1.25 V ≤ Vs ≤ 1.25 V Summing Amp (weighted summer) in=0 Applications: Audio Mixer What do to if sums should include a difference Non Inverting Amp Potential divider at inverting input No voltage drop across Rg, negligible current. Vn= Vg Rg Change of subject of equation For operation in linear region, Vo< Vcc, Input impedance high (infinity), output zero or Vg*gain < Vcc Eg Design Non –Inverting Amp • Design non inverting amp with gain of 6 • What minimum power supply values can be used such that Eg Design Non –Inverting Amp • Design non inverting amp with gain of 6 • What minimum power supply values can be used such that • Solve Vo= 6Vg, where Vg is ±1.5V, giving ±9V • Add a limiting input resistor to + input What if 𝑅𝑓 = 0 and 𝑅𝑠 = ∞ ? • Buffer (Remember this…) • Voltage follower: (gain is 1) • Infinite (High) input impedance • Zero (Low) output impedance • Primary use: impedance matching • Used to connect a source with a high impedance to a low impedance load When opamp not ideal • Gain is not infinite • Input impedance is not infinite. • Output impedance is not zero NB: as R o → 0 and R i → ∞, A → ∞ we get eqn for ideal Similar analysis if RL exists at output Realistic model of op amp. Effect of finite open loop gain …II Can express Vin(difference) in terms of Vo • When using node voltage method, cannot assume Vn is 0 anymore. Vn = -Vo/A (Assuming A is finite, therefore Vp not equal to Vn. ) KVL The inverting configuration suffers from a low input resistance To try: • Find an expression for gain (Vo/Vi) for the circuit shown, if opamp is ideal. • Eg 5.2. SS p521 Check SS p523 Hint: Write node voltage eqns at inverting input and node x. Substitute for vx. Solve. The Difference Amplifier The difference amp Cannot use op-amp by itself as a difference amp bc Gain will be unstable, infinite • At inverting input: (in=0) • At non inverting input • Together: Steps: Node voltage analysis at -ve Express Vn in terms of Vb Equate ratios of scaling factors Express in terms of Ra and Rb (-ve) Use superposition to prove. The difference amp Cannot use op-amp by itself as a difference amp bc Gain will be unstable, infinite • At inverting input: (in=0) • At non inverting input Steps: Node voltage analysis at -ve Express Vn in terms of Vb Equate ratios of scaling factors Express in terms of Ra and Rb (-ve) • Together: • Make scaling factors equal Redo with Rb/Ra= Rd/Rc (PTO) Use superposition to prove. → Notes: • **redo with Rd/Rc=Rb/Ra • In general: the output voltage is proportional to the difference between a scaled replica of Va and a scaled replica of Vb • By making the output is a scaled replica of the difference Eg – Designing a difference amp • A) Design an ideal op amp with gain 8 and power supplies ±8V • Using standard values of resistors, choose equal scaling factors • B) If Va=1V, what range of values for Vb will result in linear operation? Eg – Designing a difference amp • A) Design an ideal op amp with gain 8 and power supplies ±8V • Using standard values of resistors: • Choose Ra=1.5k, Rb=12k, same choices for Rc, Rd • B) If Va=1V, what range of values for Vb Result in linear operation? Uses of Difference Amp • Useful in amplifying desired signal in the presence of noise. • Useful signal is in the difference • Noise affects both inputs equally, but the difference is amplified. • Eg ecg signal from heart weaker than noise from external sources (eg fluorescent lamp), but latter is rejected/not amplified. • An ideal difference amp • amplifies only the difference mode portion of the input • eliminates the common mode portion (proof: SS $5.4.1 p532) 50/60 Hz common-mode signal between electrodes and local power-system ground. Small differential signal is important and strong interfering common-mode signal is present Another point of view Differential and Common-Mode Signals • Difference mode: Vdm= Vb-Va • Common mode input: (avg of the inputs): Vcm= ½(Va+Vb) • Expressing Va and Vb in terms of Vdm and Vcm components: • and Determine output if only Vcm applied (and Rb/Ra= Rd/Rc) → zero Common Mode Rejection Ratio (CMRR) Ideally, 𝑣𝑜 = 𝐴𝑑𝑚 𝑣𝑑𝑚 . But not for practical circuits. → 𝑐𝑜𝑚𝑚𝑜𝑛 𝑚𝑜𝑑𝑒 𝑐𝑜𝑚𝑝𝑙𝑒𝑡𝑒𝑙𝑦 𝑟𝑒𝑗𝑒𝑐𝑡𝑒𝑑. • 𝑣𝑜 = 𝐴𝑐𝑚 𝑣𝑐𝑚 + 𝐴𝑑𝑚 𝑣𝑑𝑚 • 𝐴𝑐𝑚 − common mode gain • 𝐴𝑑𝑚 − differential mode gain • CMRR is a measure of quality/nearness to ideal of an opamp • For ideal opamp and matched components, Acm is zero, leading to infinite CMRR. • The larger the CMRR the better • With resistance mismatch or non-ideal (internal components of) opamp, CMRR is large, but finite. Downside: Differential Input resistance Rid • What if the amplifier is required to have a large differential gain, R2/R1? Any implications? What can be done? Circuit model for voltage amplifier Voltage amplifier with input signal source and load. At input, amplifier forms a voltage divider with source. Downside: Differential Input resistance Rid • Differential gain is R2/R1, so R1 will be small Not desirable to have low input resistance Add buffers before R1 → high input impedance, gain=1 Do better: get some voltage gain in stage 1 as well. Instrumentation amplifier overcomes drawback The Instrumentation Amplifier • Has higher input impedance • Stage 1 → amplification, Stage 2 → differencing function • Stage 1: non-inverting configuration gain G1= (1+R2/R1) • Stage 2: difference configuration A1, A2 are buffers with gain. Flaws: • Common mode signals are amplified by first stage (as well as differential); • Common mode signals are larger, can cause saturation of amp. • Stage 2 thus deals with larger CM signals • Two amps in stage 1 must be perfectly matched • Any differences will be magnified in stage 2 • To change the gain of stage 1, modify both sets of R1 resistors equally Better design • Ground at R1 removed • Gain is still • (next slide) • Common mode signals create same voltage after A1, A2 Hence no current through 2𝑅1 and 𝑅2 resistors • CM signal not amplified. • Difference signal amplified • Gain varied by varying 2R1 only • Even if 𝑅2 ′𝑠 not matched doesn’t affect operation → Improved circuit 3: Sum the I x R from Vo2 till Vo1 (three terms) *Differential voltage Vld appears across 2R1 bc of virtual short cct. *Determine current through 2R1 *Determine voltage appearing at A3. 2 0 1 3 Wrt common mode signal: equal voltage across 2R1 → no current → voltage directly passed via R2 to Vo1&Vo2 A3 does not deal with amplified CM signal Integrators • Inverting integrator (Miller integrator ) 𝑑𝑣 (𝑡) •𝑖=𝐶 𝑐 𝑑𝑡 • 𝑉𝑐 − initial voltage on C at t=0 Derivation Output is inverted scaled replica of integral of the input voltage. (only within linear range) Differentiators Applications of opAmps • Useful especially in instrumentation circuits • Voltage controlled voltage source • Vo= (-Rf/Ri)Vin = kVin • [SS, Fig 5.21] • Voltage controlled current source • [SS, fig 5.23] current flows through Rf (which is the load) • Io= Vin/Ri → io=k Vin • Current Controlled Voltage Source • Current Controlled Current Source Frequency dependence of open loop gain (nonideal property) • Open loop gain is finite, and decreases with frequency Open loop gain variation with frequency Gain x bandwidth = constant (for closed loop) Trade-off between gain and bandwidth Large Signal Operation of OpAmps • Output voltage saturation can occur • Clips peaks of output waveform. • Keep input signal small • Output current limits • Eg 741 has 20mA output current limit (includes both load and feedback currents) • Output voltage will saturate at the level in spec corresponding to max output current • Slew Rate → max rate of voltage change at output • Causes non linear distortion In V/𝝁s Op Amp application circuits • Voltage follower • Impedance matching • Comparator • Schmitt trigger, comparators with hysteresis • Oscillator • Window comparator PE4E p710, 714 (Pract Elect 4 Eng Bk) • Level comparator • Sample & hold AoE p254 (Art of Electronics bk) • Peak detector Problems to try: • Nilsson & Riedel • Q 5.5, 5.11, 5.13, 5.17, 5.20, 5.27, 5.30, 5.34, 5.44, AP5.6 • Sedra & Smith • Q5.2, 5.8, 5.20, 5.38