opamp supplementary

11
Opamp supplementary Author(s): Fred-Johan Pettersen Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx Page 1 of 11 Opamp supplementary Fred-Johan Pettersen 1,2 1 Oslo University Hospital HF, Department of Clinical and Biomedical Engineering, Norway 2 University of Oslo, Department of Physics, Norway Abstract A very brief supplementary to the official syllabus-defining literature. This supplementary is describing operational amplifiers very briefly along with some nice circuits. Keywords: opamp, circuits, FYS4250, FYS9250, FYS3240, FYS4240 1 Introduction 1.1 Why this supplementary? A demand for a brief supplementary to other sources of knowledge about operational amplifiers (opamps) has been voiced, and this is an attempt to make such a supplementary. It is only introductory, and is by any mean not aiming to be a reference document. There are literally tons of books that cover opamps better, more thoroughly, more elegant, and so on; so go ahead and study the subject more if you like. If you only want one book on electronics, and one that covers a practical approach, you should consider The Art of Electronics, third edition, by Paul Horowitz and Winfield Hill (https://artofelectronics.net). If you just want to look at some cool opamp applications, try this: https://en.wikipedia.org/wiki/Operational_amplifier_applications. 1.2 Why opamps? Most physiological quantities we want to have a look at start as a physical quantity - utterly useless and inaccessible for the physician. But don't despair - there are ways of transforming the physical quantities to something that can be displayed on a screen. The way it typically happens is like this: 1. Physical quantity. 2. Transducer convert physical quantity to analogue electrical quantity => Current, voltage, charge, etc. 3. Processing of electric quantity: a. Transformation between electrical representations (current, voltage, charge, etc.). b. Amplification. c. Summation. d. Filtering. e. Other mathematical stuff. 4. Conversion form analogue representation to digital representation. 5. Processing by computer. 6. Display of result. It is in the processing of the analogue signals opamps play an important role since opamps with a few external connections and components can perform most required mathematical operations on the signals.

Upload: others

Post on 18-Dec-2021

13 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 1 of 11

OpampsupplementaryFred-JohanPettersen1,21OsloUniversityHospitalHF,DepartmentofClinicalandBiomedicalEngineering,Norway2UniversityofOslo,DepartmentofPhysics,Norway

AbstractAverybriefsupplementarytotheofficialsyllabus-definingliterature.Thissupplementaryisdescribingoperationalamplifiersverybrieflyalongwithsomenicecircuits.

Keywords:opamp,circuits,FYS4250,FYS9250,FYS3240,FYS4240

1 Introduction

1.1 Whythissupplementary?Ademandforabriefsupplementarytoothersourcesofknowledgeaboutoperationalamplifiers(opamps)hasbeenvoiced,andthisisanattempttomakesuchasupplementary.Itisonlyintroductory,andisbyanymeannotaimingtobeareferencedocument.Thereareliterallytonsofbooksthatcoveropampsbetter,morethoroughly,moreelegant,andsoon;sogoaheadandstudythesubjectmoreifyoulike.Ifyouonlywantonebookonelectronics,andonethatcoversapracticalapproach,youshouldconsiderTheArtofElectronics,thirdedition,byPaulHorowitzandWinfieldHill(https://artofelectronics.net).Ifyoujustwanttolookatsomecoolopampapplications,trythis: https://en.wikipedia.org/wiki/Operational_amplifier_applications.

1.2 Whyopamps?Mostphysiologicalquantitieswewanttohavealookatstartasaphysicalquantity-utterlyuselessandinaccessibleforthephysician.Butdon'tdespair-therearewaysoftransformingthephysicalquantitiestosomethingthatcanbedisplayedonascreen.Thewayittypicallyhappensislikethis:

1. Physicalquantity.2. Transducerconvertphysicalquantitytoanalogueelectricalquantity=>Current,voltage,

charge,etc.3. Processingofelectricquantity:

a. Transformationbetweenelectricalrepresentations(current,voltage,charge,etc.).b. Amplification.c. Summation.d. Filtering.e. Othermathematicalstuff.

4. Conversionformanaloguerepresentationtodigitalrepresentation.5. Processingbycomputer.6. Displayofresult.

Itisintheprocessingoftheanaloguesignalsopampsplayanimportantrolesinceopampswithafewexternalconnectionsandcomponentscanperformmostrequiredmathematicaloperationsonthesignals.

Page 2: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 2 of 11

2 LawsandverybasicintroductorystuffInmuchthesamewayaswehavetoobeylaws,electronshavetoobeylawstoo.Themostimportantonesarepresentedhere.

2.1 Ohm'slaw ๐‘ˆ = ๐‘…๐ผ (1)Anyresistorwillbehaveaccordingtothislaw.Thepositivesideis,bydefinition,wherethecurrententers.Theimpedance(ZR)ofaresistorisalwaysthesameasit'sresistance,R.

2.2 Kirchhoff'sfirstlawThesumofallcurrentsintoanodeiszero.

Thissimplymeansthatchargeisconserved,andthatanelectricnodecannotstorechargeinanyway.

2.3 Murphy'slawWhatcangowrong,will.

Justforfun.Butthereisatouchofexperienceheresayingthatitisimportanttokeepcircuitsassmallandsimpleaspossible.

2.4 ThecapacitorIfyouknowanythingaboutcapacitors,pleasedon'treadthissinceitisaveeeeerysimplifiedviewofhowwecanuseacapacitor.OK,soyoudon'tknowmuchaboutcapacitors.That'sfine.Hereistheinformationyouneedtoenableyoutoreadthistext.Someusefulformulaswhenlookingatthecapacitorinthetimedomain: ๐‘ˆ = !

" โˆซ ๐ผ๐‘‘๐‘ก (2)

๐ผ = ๐ถ #$#% (3)

Equations2and3arereallythesameequationsaftersomefiddling.Thereshouldofcoursebeaconstantinequation2,butit'sleftoutforsimplicity.TheequationsshowthattherelationbetweenUandIissomewhatdifferentfromtherelationforresistorsasdescribedbyOhm'slaw.Asforresistors,thepositivesideofthevoltageacrossthecapacitorisonthesidethecurrententers.Ifweconsideracapacitorinthefrequencydomain,ithassomefunnyproperties.Itturnsoutthatthecapacitorcanbeseenasadevicewithfrequencydependentimpedance.Impedanceisanexpansionoftheresistanceconcept,andanimpedancevalueisactuallyavectorintheimaginaryplane.Weareonlygoingtoconsiderthevectorlength,orimpedancemagnitudehere.Thefrequencydependenceofthecapacitorimpedanceisgivenby

Page 3: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 3 of 11

|๐‘"| =

!&'("

. (4)Theessenceofequation4isthatthecapacitorishavinghighimpedanceatlowfrequenciesandlowimpedanceathighfrequencies.Thisissummarizedintable1alongwiththeimpedanceoftheresistor.

Device DC(f=0Hz) Lowfrequency Highfrequency Infinitefrequency|๐‘๐‘…| R R R R|๐‘๐ถ| โˆž High Low 0

Table1:Impedanceforresistorsandcapacitorforsomefrequencies.

3 Theopamp

3.1 TheidealopampTheopampisadevicemadeofanumberofothercomponentsliketransistors,resistors,andcapacitorsneatlypackagedintoasmallpackage.Fourourconvenience,suppliersofopampsmaketheminavarietyofsizesandwithavarietyofcapabilities.Thebasicopampisathree-pindeviceasshowninfigure1a),whileinrealityithasatleastfivepinsasshowninfigure1b).Wewillusethethree-pinsymbolforsimplicity.

a)Opamp,threepinsymbol. b)Opamp,fivepinsymbol.

Figure1:Opampsymbols.Thebasicfunctionisdescribedbyequation5 ๐‘ˆ)$* = ๐ด+(๐‘ˆ,-. โˆ’ ๐‘ˆ,-/) (5)whereUOUTistheoutputvoltage,UIN+isthevoltageatUIN+,UIN-isthevoltageattheUIN-,andADisthedifferentialgain.ADistypicallyverylarge,solargethatitispointlesstousetheopampwithoutanyformoffeedback.ADcaeasilybeintherange1000to1000000,andiscommonlyexpressedindecibels1.

3.2 CMRRandPSRRSinceopampsarenotideal,wehavetolookatsomemorefeatures.Fromequation5,wecanbeledtobelievethatopampsareignoringcommonmodevoltages.Well,theyusuallydoaprettygoodjobatit,buttheyarenotperfect.Acommonmodevoltageasavoltagethatispresentonbothinputs.Asaresult,wehavetoexpandequation6abit,andget:

1Decibelisalogarithmicscale,andforsignalvalues(notpowervalues),itisdefinedas๐ด#0 = 20๐‘™๐‘œ๐‘”!1(๐ด).

Page 4: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 4 of 11

๐‘ˆ)$* = ๐ด+(๐‘ˆ,-. โˆ’ ๐‘ˆ,-/)+๐ด"2 6$#$%.$#$&

&7 (6)

whereACMisthecommonmodegain.ACMisusuallyverylow,andcaneasilybelessthan0.01.Sinceweareinterestedinknowinghowmuchthecommonmodevoltageisrejected,weareusuallytalkingabouttheCommonModeRejectionRate(CMRR)whichusuallyisexpressedindecibels,andgivenby ๐ถ๐‘€๐‘…๐‘… = 3'

|3()|= 20๐‘™๐‘œ๐‘”!1 6

3'|3()|

7 ๐‘‘๐ต. (7)Asignalonthepowersupplies2mayalsobetransferredtotheoutput.Onceagain,wehavetoexpandtheequationdescribingtheopamp,andget ๐‘ˆ)$* = ๐ด+(๐‘ˆ,-. โˆ’ ๐‘ˆ,-/)+๐ด"2 6

$#$%.$#$&&

7 + ๐ด56๐‘ˆ56 (8)whereAPSisthegainofasignalonthepowersupplyandUPSistheunwantedsignalthatliesontopofthepowersupplyvoltage.Theratioofrejectionisofinterest,andsimilarlytoCMRR,PowerSupplyRejectionRate(PSRR)isgivenby ๐‘ƒ๐‘†๐‘…๐‘… = 3'

|3*+|= 20๐‘™๐‘œ๐‘”!1 6

3'|3*+|

7 ๐‘‘๐ต. (9)

3.3 SomeotherpropertiesSomepropertiesoftheopamparepresentedinthetablebelow.

Property Idealopamp Real-worldopampInputimpedance Infinite. Veryhigh.

Outputimpedance(outputisseenasavoltagesource) Zero. From1Wto100W.Differentialgain Infinite. Veryhigh.

Commonmodegain Zero. Verylow.Powersupplygain Zero. Verylow.

Bandwidth Infinite. Finite.Noise Zero. Yes.

Table2:Opamppropertiesforidealandreal-worldopamps.

4 Somecoolopampcircuits

4.1 AnalysisAnalysisiflefttothereaders3.Tosimplifyanalysisofasensibledesignedopampcircuit,therearetworulesofthumbthatwillmakeiteasy:

โ€ข Thevoltagesonbothinputsareidenticalifsomesortoffeedbackisused.โ€ข Therewillnotflowanycurrentintotheinputs.

Theserulesofthumbapplyforallcircuitshere.Thetwomostcommonwaytodescribehowacircuitisprocessingasignalareanoutputfunctionorbyatransferfunction.Anoutputfunctionsimplystateswhattheoutputis,anda

2ThesignalistypicallynoiseorinterferenceaddedtothepureandsomewhatidealDCvoltageonthepowersupply.3Lecturersandauthorsjustlovethissentence.Firstofall,it'sfun,andthenit'saquetotheseriousreaderthatthisissmartifshe/he/itwanttolearnthestuff.

Page 5: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 5 of 11

transferfunctionmustbemultipliedbyaninputsignal.Forexample,equation10isanoutputfunction,andequation11isantransferfunctionofthesamecircuit. ๐‘ˆ)$* = ๐‘ˆ,- 61 +

7,7-7 (10)

๐ป = $./0

$#$= 1 + 7,

7- (11)

4.2 Non-invertingamplifier

Figure2:Non-invertingamplifier.

Parameter Value/Description

Transferfunction ๐‘ˆ123๐‘ˆ45

= 1 +๐‘…6๐‘…7

Inputimpedance Veryhigh.Outputimpedance Verylow.

Pros Notinverting.Cons Gainunder1impossible.

Table3:Opampcircuitpropertiesfornon-invertingamplifier.

4.3 Unitygainbuffer

Figure3:Unity-gainbuffer.

Parameter Value/Description

Transferfunction ๐‘ˆ123๐‘ˆ45

= 1 +0โˆž = 1

Inputimpedance Veryhigh.Outputimpedance Verylow.

Pros Buffer.Cons Mayaddnoise.

Table4:Opampcircuitpropertiesforunity-gainbufferamplifier.

4.4 Invertingamplifier

Page 6: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 6 of 11

Figure4:Invertingamplifier.

Parameter Value/Description

Transferfunction ๐‘ˆ123๐‘ˆ45

= โˆ’๐‘…7๐‘…6

Inputimpedance =R1Outputimpedance Verylow.

Pros Largerangeofgainpossible,evenbelow1.Lowoutputimpedance.

Cons Inverting.Lowinputimpedance.

Table5:Opampcircuitpropertiesforinvertingamplifier.

4.5 Integrator/low-passfilter

Figure5:Integrator/lowpassfilter.

Parameter Value/Description

Outputfunction ๐‘ˆ123 = โˆ’1๐ถ6+๐ผ45 ๐‘‘๐‘ก = โˆ’

1๐ถ6+๐‘ˆ45๐‘…6

๐‘‘๐‘ก = โˆ’1

๐‘…6๐ถ6+๐‘ˆ45 ๐‘‘๐‘ก

Inputimpedance =R1Outputimpedance Verylow.

Pros Largerangeofgainpossible.Lowoutputimpedance.

Cons Inverting.Lowinputimpedance.

NeedR2orsomeotherformofdischargingofC1topreventbuild-upofcharge.Table6:Opampcircuitpropertiesforanintegrator/low-passfilter.

Asanexercise,lookatthetransferfunctionfortheinvertingamplifier,andthinkofthecapacitorasanimpedancewithvaluesthatvariesaccordingtotable1.Whichfrequenciesareletthrough,andwhicharestopped?

4.6 Derivator/high-passfilter

Page 7: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 7 of 11

Figure6:Derivator/high-passfilter.

Parameter Value/Description

Outputfunction ๐‘ˆ123 = โˆ’๐‘…6๐ผ45 = โˆ’๐‘…6๐ถ6๐‘‘๐‘ˆ๐‘‘๐‘ก

Inputimpedance Capacitive.Outputimpedance Verylow.

Pros Largerangeofgainpossible.Lowoutputimpedance.

Cons Inverting.Capacitive/lowinputimpedance.

Table7:Opampcircuitpropertiesforaderivator/high-passfilter.Asanexercise,lookatthetransferfunctionfortheinvertingamplifier,andthinkofthecapacitorasanimpedancewithvaluesthatvariesaccordingtotable1.Whichfrequenciesareletthrough,andwhicharestopped?

4.7 Logarithmicandexponentialamplifier

Figure7:Exponentialandlogarithmicamplifiers.

Parameter Value/Description

Outputfunction ๐‘ˆ123 = โˆ’๐‘…6๐พ exp(๐‘ˆ45)

๐‘ˆ123 = โˆ’๐พ ln7๐‘ˆ45๐‘…68

Inputimpedance Low=R1

Outputimpedance Verylow.Pros Coolcircuits.

Lowoutputimpedance.Non-lineareffectsmaybeuseful.

Cons Inverting.Inaccurateandtemperaturedependent.

Lowinputimpedance.Table8:Opampcircuitpropertiesfortworelatednon-linearcircuits.

Sinceitmaybethatareaderdoesnotknoweverythingthereistoknowaboutdiodes,equation12describingthevoltage-currentrelationofadiode:

๐ผ+ = ๐ผ6 >๐‘’/'890 โˆ’ 1@. (12)

Page 8: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 8 of 11

Ifwesimplify,andacceptthattheconstantsarejustoffsetsandannoyingnumbers,wecanreduceequation12tosomethingmoreuseful,asshowninequations13andequation14. ๐ผ+ = ๐พ๐‘’$' (13) ๐‘ˆ+ = ๐พ๐‘™๐‘›(๐ผ+) (14)Thismeansthatwecanimplementthefunctionsln ๐‘‹and๐‘’8 .Andsincewecandoaddition(sesummingamplifierbelow),wecanimplementmultiplicationsince๐‘’9: 3.9:0 = ๐ด๐ต.Howcoolisthat?

4.8 Summingamplifier

Figure8:Summingamplifier.

Parameter Value/Description

Outputfunction ๐‘ˆ123 = โˆ’๐‘…:9๐‘ˆ;๐‘…;

Inputimpedance =RnOutputimpedance Verylow.

Pros Largerangeofgainpossible.Lowoutputimpedance.

Cons Inverting.Lowinputimpedance.

Table9:Opampcircuitpropertiesforsummingamplifier.Itispossibletoadjustgainofeachinputbychangingthevalueofthecorrespondinginputresistor.

4.9 Differentialamplifier

Figure9:Differentialamplifier.

Page 9: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 9 of 11

Parameter Value/DescriptionOutputfunction ๐‘ˆ123 =

๐‘…7/=๐‘…6/>

(๐‘ˆ? โˆ’๐‘ˆ@)

Inputimpedance = ๐‘…6/> + ๐‘…7/=Outputimpedance Verylow.

Pros Lowoutputimpedance.Accurateifgainislow.

Cons Lowinputimpedance.Largeerrorifgainishigh.

PoorCMRR,especiallyifgainishigh.Table10:Opampcircuitpropertiesfordifferentialamplifier.

4.10 Instrumentationamplifier

Figure10:Aninstrumentationamplifier.

Thisisabeauty,soitwillbeexplainedinabitmoredetail.Thecircuithastwostages,andtheinputstageisprovidingdifferentialgainandhighinputimpedance.Ourruleofthumbsaysthatthevoltagesontheopampinputsareidentical,whichmeansthatU+andU-arethevoltagesoneachsideofRG.I1cannowbecalculated ๐ผ! =

$&/$%7A

(15)Sincenocurrentsareflowingintothe-inputsofthetwoopamps,weknowthatI1ispassingthroughtheresistorchain,andwecanuseOhm'slawtocalculatethevoltageacrosstheresistorchain ๐‘ˆ/& โˆ’ ๐‘ˆ.& = ๐ผ!(2๐‘…3 + ๐‘…;) =

$&/$%7A

(2๐‘…3 + ๐‘…;) (16)SincethevoltageacrosstheresistorchainisthesameastheoutputofstageI,wecandosomefiddlingonequation16,andweseethatthedifferentialgainofstageIisgivenby ๐ด+(6%=>?,) = 1 + &7B

7A (17)

SincethecommonmodevoltageontheoutputofstageIisthesameastheinput,thestageIcommonmodegainis1.NowthatwehaveanicelyamplifiedinputsignalavailableafterstageI,wewanttogetridofthecommonmodevoltage.ThisisdoneinstageIIbyusingadifferentialamplifierwheregainissetto1(orcloseto1inordertoreducenoiseanderrorandsuch).Notethatthereisapincalled

Page 10: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 10 of 11

UREF.Thisistypicallyplacedatsomereferencelevellikeground,butitcanbeanyreferencelevelyouchoose.ThepointisthattheoutputvoltageUOUTisrelativetothis.Theoutputfunctionisthen ๐‘ˆ)$* = (๐‘ˆ. โˆ’ ๐‘ˆ/) 61 +

&7B7A7 (18)

relativetothepotentialonUREF.Bothstagescombinedwillthen:

โ€ข haveverylowinputimpedance.โ€ข haveadifferentialgainwhichcanbesetbychangingRG.โ€ข haveaverylowcommonmodegain.โ€ข beadifferentialamplifieronsteroids.

Luckyforus,therearealoadofthesecommerciallyavailable.

4.11 Activefilterexamples(Sallen&Key)

Figure11:SallenandKeyfilters.Thetopcircuitsalow-passfilterandthebottomcircuitisahigh-passfilter.

Asanexampleoffiltersusingopamps,theSallen&Keyfiltersarenice.Thesearesecondorderfilterswithanopampamplifier.Theycanbebothlow-passandhigh-pass.Itisverycommontousethesamevalueonbothresistorsandbothcapacitors.Moreinformationhere:https://en.wikipedia.org/wiki/Sallenโ€“Key_topology.

5 AmoreaccurateanalysisoftheinvertingopampcircuitTherulesofthumbcanbeabitfrustratingforsomeofyou,sohereisamorethoroughanalysisforonecircuitjusttoshowhowitcanbedone.Similaranalysescanbedoneforallcircuits.Theequationsthatdescribethecircuitare ๐‘ˆ8 = ๐‘ˆ)$* + ๐ผ,B๐‘…& = ๐‘ˆ)$* +

$#$/$.CD7,.7-

๐‘…& (19)and ๐‘ˆ)$* = โˆ’๐‘ˆ8๐ด+ . (20)Byinserting20into19,weget

Page 11: Opamp supplementary

Opamp supplementary Author(s): Fred-Johan Pettersen

Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx

Page 11 of 11

โˆ’ $./0

3'= ๐‘ˆ)$* + ๐‘ˆ,-

7-7,.7-

โˆ’ ๐‘ˆ)$*7-

7,.7- (21)

whichcanbemanipulatedinto $./0

$#$= โˆ’ 3'7-

3'7,.7,.7-. (22)

IfweassumethatADisverylarge,sayโˆž,thisreducestothefamiliarform $./0

$#$= โˆ’ 7-

7,. (23)

IfweassumethatADisverylarge,andthattheoutputiswithinreasonablelimits,equation5tellusthattheinputsmustbeveryclosetoeachother,andifADapproachesโˆž,thepotentialdiferencebetweenUIN+andUIN-approaches0.