mywbut.com CHAPTER3:OSCILLATORSANDWAVEFORM-SHAPING CIRCUITS Inthedesignofelectronicsystems,theneed frequentlyarises forsignals havingprescribed standardwaveforms(e.g.,sinusoidal, square,triangle,pulse,etc).Thesewaveformsarecommonly usedincomputers,controlsystems,communicationsystemsandtestmeasurementsystems. Therearetwocommonwaysforgeneratingsinusoids: 1. Positiveloopwithnon-lineargainlimiting 2. Appropriatelyshapingotherwaveformssuchasatrianglewaves. Circuitsthatdirectlygeneratesquare,triangleandpulsewaveformsgenerallyemploycircuit blocksknownasmultivibrators.Threebasictypesarebistable,astableandmonostable. I.SINUSOIDALOSCILLATORS: Commonly referred to as linear sine-wave oscillators although some forms of non-linearity havetobeemployedtolimittheoutputamplitude.Analysisofthecircuitsismoredifficultass-plane analysis cannot be directly applied to the non-linear part of the circuit. The basic structure of a sinusoidal oscillator consists of an and a frequency selective network connected in a positivefeedbackloop. AmplifierA xS + Σ xO + xf Freq.Selective networkβ Figure1:Basicstructureofasinusoidaloscillator. Apositive-feedbackloopisformedbyanamplifierandafrequency-selectivenetwork.Inan actualoscillatorcircuit,noinputsignalwillbepresent;hereaninputsignalxsisemployedtohelp explaintheprincipleofoperation.NotethatthefeedbacksignalXFissummedwithapositivesign: )s(A )s(A = f β− )s()s(A1 Theloopgainis: )s(L A β= )s()s( Andthecharacteristicequationcanbewrittenas: 1-L(s)=0 If at a specific frequency f0, the loop gain Aβ is equal to unity, it follows that Af will be infinite.Suchacircuitisbydefinitionanoscillator. 1 mywbut.com Thusforthesinusoidaloscillatoratω0: 0 ⋅ω=ω β 00 =ω 1)j()j(A)j(L ThisconditioniscalledBarkhausenCriteriaforoscillation,inwhich: “UNITYGAIN,ZEROPHASESHIFT” It should be noted that the frequency of oscillation ω0 is determined by the phase characteristics of the feedback loop. The loop oscillates at the frequency for which the phase is ZERO.Thesteeperthephaseshiftasafunctionoffrequencyφ(ω),themorestablethefrequencyof oscillation.

NON-LINEARAMPLITUDECONTROL: Generally, it is difficult to design circuits with Aβ=1 as circuit parameters vary with temperature,time,andcomponentvalues. If Aβ<1 oscillatorceases, If Aβ>1 oscillationgrowsuntilcircuitsaturates. ItisrequiredtohaveamechanismtoforceAβ=1.Thisisaccomplishedbyemployinganon- linearcircuitforgaincontrol: -DesigncircuitwithAβ>1asvoltageofoscillationincreases,gaincontrolmechanismkicks inandreducesgainto1. -Design circuit with right half plane poles. The gain control pulls the poles back to the imaginaryaxis. Twoapproaches:

2 mywbut.com 1. The first approach uses a limiter circuit, oscillations are allowed to grow until the level reaches the limiter set value. Once the limiter comes intooperation, the amplitude remains constant.Thelimitershouldbedesignedtominimizenon-lineardistortion. 2. The second method uses a resistive element in the feedback loop whose resistance can be controlled bythesinusoidaloutputamplitude.orJFETs(operating intrioderegion) arecommonlyused. Apopularlimitercircuitforamplitudecontrolcanbeseenbelow:

3 mywbut.com II.OPAMP-RCOSCILLATORS: 1.WIEN-BRIDGEOSCILLATOR

The loop gain can be found by multiplying the transfer function of the feedback path, Va(s)/V0(s),bytheamplifiergain. R Z 1[)s(L += 2 ] P R1 + ZZ SP

R 1+ 1 R )j(L =ω 2 1 RC(j3 −ω+ ) ωRC Theloopgainwillbearealnumber(i.e.,thephasewillbezero)atonefrequency ω0given by: 1 0RC =ω ω0RC 1 =ω 0 RC Toobtain sustained oscillation at this frequency, the magnitude of the loop gain should be unitywhichcanbeachievedbysetting: R 2 = 2 R1 Toensurethatoscillationstarts,onechoosesR2/R1slightlygreaterthan2.

4 mywbut.com Theamplitudeoftheoscillationcanbecontrolledusinganon-linearlimiterasseenbelow.

2.PHASESHIFTOSCILLATOR Figure 12.7 shows the basic structureof the phase shift oscillator. It consists of a negative gainamplifier(-K)withathree-section(3rdorder)RCladdernetworkinthefeedback.

ThecircuitwilloscillateatthefrequencyforwhichthephaseshiftoftheRCnetworkis180O. Onlyatthisfrequencywillthephaseshiftaroundtheloopbe0O(360O).ThreeRCsectionsare requiredtoproducea180Ophaseshiftatafinitefrequency. ThevalueofK ischosentobeslightly higherthanthe inverseofthe magnitudeoftheRC networktransferfunctionatthefrequencyofoscillation.

5 mywbut.com

3.ACTIVEFILTERTUNEDOSCILLATOR In this type of filter, Figure 12-10, a filter is used to select a particular frequency in the spectrumofasquarewave(usuallythefundamentalfrequency).Outputofthefilterisasinewaveand istakenastheoutputoftheoscillator.Theoutputisfedbacktoalimiterwhichisusedtoconverta sinewavetoasquarewave.Thesquarewavesignalthenbecomestheinputofthefilter. The actual circuit is shown in Figure 10.11, the limiter is a pair of diodes to have a squarewave at v2. This filter is an active filter (we will study this filter later) to select the fundamentalfrequencyandprovidestheoutputatv1. Theop-ampRCoscillatorcircuitsareuseful foroperation inthe10Hz-1MHzrangedueto limitations inpassive componentsize(low frequency)andop-amp slewrate(high frequency).For higher frequencies, circuits that employ together with LC tuned circuits or crystals are commonlyused.

6 mywbut.com

III.LCANDCRYSTALOSCILLATORS: OscillatorsutilizingtransistorsandLCtunedcircuitsorcrystalsareusefulforoperationinthe rangefrom100KHzto500MHz.TheyexhibithigherQthanRCtypes(morestable).However,LC oscillatorsaredifficulttotuneoverwiderangeoffrequencyandcrystaloscillatoroperatesatasingle frequency. The extremely stable response of the crystal oscillators has made them very popular, particularlyfordigitaltimingsignals. LCTUNEDOSCILLATOR Two common used configurations are the Colpitts and the Hartley oscillators. The basic circuitstructureswithoutbiasingcanbeseenbelow.

7 mywbut.com

BothcircuitsutilizeaparallelLCcircuitconnectedbetweenthecollectorandthebasewitha fraction of the tuned circuit voltage fed tothe emitter of the . The R models the lossesoftheinductor,theloadresistanceoftheoscillatorandtheoutputresistanceofthetransistor. If the frequency of operation is sufficiently low, we can neglect the transistor parasitic capacitances. The frequency of oscillation is determined by the resonant frequency of the parallel tunedcircuit(alsoknownasatankcircuit).FortheColpittsoscillator: 1 0 =ω CC (L 21 ) + CC 21 FortheHartleyoscillator 1 0 =ω + 21 )LL(C The ratio L1/L2 or C1/C2 determines the feedback factor and thus must be adjusted in conjunctionwiththetransistorgaintoensurethatoscillationswillstart. To determine the oscillation condition for the Colpitts oscillator, we replace the transistor with its equivalent circuit. To simplify the analysis, we neglect the transistor capacitances except capacitanceCBEisapartofC2.

8 mywbut.com Anodeequationatthetransistorcollector(C)yields: 1 (VgVsC ++++ 2 = 0V)LCs1)(sC m2 ππ R 1 2 π SinceVπ≠0(oscillationshavestarted),itcanbeeliminated(i.e.,theothertermsarezero). C 1 3 + 2 L(sCLCs 2 g()CC(s) =++++ 0) 21 R m21 R 2 1 ω LC2 3 g( m −+ 21 ω−+ω+ 21 = 0]CLC)CC([j) R R Foroscillationstostart,boththerealandimaginarypartsmustbezero. Settingtheimaginaryparttozerogives 1 0 =ω CC 2 (L 1 ) + CC 21 whichistheresonantfrequencyofthetankcircuit. Settingtherealparttozeroyields C2 = mRg C1 Forsustainedoscillation,themagnitudeofthegainfromthebasetocollector(gmR)mustbe equaltotheinverseofthevoltageratioprovidedbythecapacitivedivider: v C be = 1 vce C2 Foroscillationtostart,theloopgainmustbegreaterthanunitywhichisequivalentto C2 mRg > C1 Asoscillationgrows inamplitude,thetransistorsnon-linearcharacteristicsreducethe loop gain to unity, thus sustaining oscillations. An example of a complete Colpitts oscillator is shown below

9 mywbut.com

Theradiofrequencychoke(RFC)inthisoscillatorprovidesahighreactanceatω0butalow DCresistance.Unliketheop-amposcillatorsthatincorporatespecialamplitudecontrolcircuitry,LC tunedoscillatorsutilizethenon-linearic-vbecharacteristicsoftheBJT(oridversusvgsforFET)for amplitudecontrol.Astheoscillationsgrow,theeffectivegainofthetransistorisreducedbelowits smallsignalvalue.TheLCtunedoscillatorsareknownasself-limitingoscillators. Relianceonthenon-linearcharacteristicsoftheBJT(ortheFET)impliesthatthecollector (drain) current waveform will be nonlinearity distorted. Nevertheless, sinusoidal of high purity becauseofthefilteringactionoftheLCtunedcircuit. CRYSTALOSCILLATORS A piezoelectric crystal, such as quartz, exhibits electro-mechanical resonant characteristics thatareverystable(withtimeandtemperature)andhighselectivity(havingveryhighQfactor).The circuitsymbolofacrystalisshownbelow. The resonant properties are characterized by a large inductance L (as high as hundreds of Henrys),averysmallseriescapacitanceCs(assmallas0.0005pF),aseriesresistancerrepresentinga Qfactor(Q=ω0L/rthatcanbeashighasfewhundredthousand)andaparallelcapacitanceCp(afew picoFarad).

10 mywbut.com

CapacitanceCprepresentstheelectrostaticcapacitancebetweenthetwoparallelplatesofthe crystal(Cp>>Cs).SincetheQfactorissohigh,wecanneglecttheresistancerandexpressthecrystal impedanceas: 1 )s(Z = 1 sCp + + sC/1sL s whichcanbemanipulatedtotheform 1 s2 + 1 LC )s(Z = s sC +CC sp p s2 + sp )CC(L weseethatthecrystalhastworesonantfrequencies: 1 1 s =ω and p =ω LCs CC ps L + CC ps theyareseriesresonanceandparallelresonance. Fors=jω 1 2 ω−ω 2 −=ω j)j(Z s )( 2 2 ωCp ω−ω p It can be seen that ωp>ωs, however, since Cp>>Cs, the two resonant frequencies are very close.

11 mywbut.com FromFigure12.15,weobservethatthecrystalreactanceisinductiveoveranarrowfrequency bandbetweenωpandωs.WemayusethecrystaltoreplacetheinductorinaColpittsoscillator.The resultingcircuitwilloscillateattheresonant frequencyofthecrystal inductance Lwiththeseries equivalentofCsand CC 21 . C( p + ) + CC 21 SinceCsismuchsmallerthantheothercapacitances,itwilldominateand 1 0 ω==ω s LCs ApopularconfigurationoftheColpittsoscillatorcalledPierceoscillatorisshownbelow.

ResistorRfdeterminestheDCoperatingpointinthehighgainregionoftheCMOSinverter. ResistorR1togetherwithC1providesaLPFthatdiscouragesthecircuitfromoscillatingat higherharmonicofthecrystalfrequency. CommontopurchasecrystalmoduleswithTTL,CMOSorECLoutputswith14pindipor surfacemount.Crystalsareavailableinstandardfrequenciesandcanbecustomorderedforrelatively lowcost.Theoscillatorscanbetunedasmallamountwiththeuseofvariablecapacitor(varactor)to createVoltageControlCrystalOscillator(VCXO).CrystalsarealsobeusedinhighQfilterssuchas crystalfiltersorSAWfilters. 12 mywbut.com VOLTAGECONTROLLEDOSCILLATORS(VCO) ThereareICoscillatorswithoutputratevariableoversomerangeoffrequencyaccordingto aninputcontrolvoltage.Somehavefrequencyrangefrom1000:1.Anexampleis74LS624,theIC generates digital logic levels up to 20MHz using external RC to set. Faster VCO available in the 200MHz-1GHzrange.ManyVCOuseexternalcrystalsforaccuracy.Commonlyvaractorisusedto controlfrequencyofoscillation.

Vcontrol IV.MULTIVIBRATORS: 1. BistableMultivibrator: This multivibrator has two stable states. The circuit can remain in either stable state indefinitelyandmovestotheotherstablestateonlywhentriggered.canbeobtainedby connectinganamplifierinapositivefeedbackloophavingloopgaingreaterthanunity.

Thiscircuithas2stablestates,onewiththeop-ampinpositivesaturationandtheotherwith theop-ampinnegativesaturation.

13 mywbut.com

Triggeringthebistablecircuit: If the circuit is in the positive saturation (L+) state, it can be switched to the negative saturation(L-)statebyapplyinganinputvIofvaluegreaterthanvTH=βL+ vIinitiatesortriggersregeneration.ThuswecanremovevIwithnoeffectontheregeneration process,vIcansimplybeapulsewhichiscommonlyreferredtoasatriggersignal.Thecircuitis knownastheSchmitttrigger. Asimplechangeintheinputconvertsthecircuitintoanon-invertingbistablecircuit.

14 mywbut.com The output levels of the bistable circuit adjusted by cascading the op-amp with a limiter circuit.

2. AstableMultivibrator: A square waveform can be generated by making a bistable multivibrator state periodically. This can be done by connecting the bistable mutivibrator with an RC circuit in the feedbackloop.

Thiscircuithasnostablestateandiscalledanastablemultivibrator.

15 mywbut.com

Thevoltageattheop-ampinvertingterminalduringchargingcycleis: t − τ β−−= −++− e)LL(Lv where =τ RC Substitutingv-=βL+att=T1gives L 1 β− − L+ 1 τ= ln(T ) 1 β− Similarlyforthedischargecycle,itcanbeshown L 1 β− + L− 2 τ= ln(T ) 1 β− IfL+=L-andT=T1+T2then 1+ β τ= ln2T 1 β− • ThesquarewavegeneratorcanbemadetohavevariablefrequencybyadjustingCand/orR. • The waveform across C can be made almost triangular by using a small value for the parameterβ.

16 mywbut.com Generationoftrianglewaveforms: Theexponentialwaveformgenerated intheastablecircuitcan bechangedtotriangular by replacing the low pass RC circuit with an integrator. The integrator causes linear charging and discharging of the capacitor. Because the integrator is inverting, it is necessary to use the non- invertingbistablecircuit.

− VV TLTH L+ − VV TLTH = 1 = CRT T1 CR L+ − VV TLTH − L− − VV TLTH = 2 = CRT T1 CR − L−

IFL+=L-thensymmetricalwaveformsareobtained 3. MonostableMultivibrator: In some applications, the need arises for a pulse of known height and width generated in responsetoatriggersignal.Becausethewidthofthepulseispredictable,itstrailingedgecanbeused fortimingpurposes.Suchapulsecanbegeneratedbyamonostablemultivibrator. Themonostablemultivibratorhasonestablestateinwhichitcanremainindefinitely.Italso hasaquasi-stablestateinwhichitremainsforapredeterminedintervalequaltothedesiredwidthof theoutputpulse.Oncethe intervalexpires,themonostablereturnstothestablestateandremains thereawaitinganothertriggeringsignal.Thecircuitiscommonlycalledaoneshot. Themonostablecircuitshownbelowisanaugmentedformoftheastablecircuit. 17 mywbut.com

ThedurationToftheoutputpulseisdeterminedbytheexponentialwaveformatvB. t − RC 31 B −− −−= 1D e)VL(L)t(v BysubstitutingvB(T)=βL-, T − −−=β e)VL(LL RC 31 −−− 1D

1D − LV − = 31 ln(RCT ) −β LL −− ForVD1<<|L-|,thisequationcanbeapproximatedby 1 ≈ 31 ln(RCT ) 1 β− Note:themonostableshouldnotbere-triggeredagainuntilC1hasbeenrechargedtoVD1(recovery period)

18 mywbut.com INTEGRATEDCIRCUITTIMERS Commerciallyavailableintegratedcircuitpackagescontainabulkofthecircuitryneededto implementmonostableandastablemultivibratorshavingprecisecharacteristics.Themostpopularof suchIC’sisthe555timer.

19 mywbut.com Monostablecircuitusing555timer

t − 2 −= RC Vv)e1(Vv == = Ω ≈= CR1.1)3ln(CRTTtV CCC THC 3 CC

20 mywbut.com Astablecircuitusing555timer:

21 mywbut.com TheriseinvCisgivenby: t − + BA )RR(C CCC −−= TLCC e)VV(Vv

2 1 Vv == = Ω VTtV = V THC 3 CC H TL 3 CC

H += BA ≈ + BA )RR(C69.0)2ln()RR(CT ThefallinvCisgivenby: t − CR B = THC eVv

1 2 Vv == V = Ω VTt = V TLC 3 CC L TH 3 CC

L = B ≈ CR69.0)2ln(CRT B Thetotalperiodis: H L =+= A + B )R2R(C69.0TTT

22