CHAPTER 12 SIGNAL GENERATORS AND WAVEFORM-SHAPING CIRCUITS Chapter Outline 12.1 Basic Principles of Sinusoidal Oscillators 12.2 Op Amp-RC Oscillators 12.3 LC and Crystal Oscillators 12.4 Bistable Multivibrators 12.5 Generation of Square and Triangular Waveforms using Astable Multivibrators 12.6 Generation of a Standardized Pulse-The Monostable Multivibrators 12.7 Integrated-Circuit Timers 12.8 Nonlinear Waveform-Shaping Circuits 12.9 Precision Rectifier Circuits NTUEE Electronics – L. H. Lu 12-1 12.1 BASIC PRINCIPLES OF SINUSOIDAL OSCILLATORS Types of Oscillators Linear oscillator: Employs a positive feedback loop consisting of an amplifier and a frequency-selective network. Some form of nonlinearity has to be employed to provide control of the amplitude of the output. Nonlinear oscillator: Generates square, triangular, pulse waveforms. Employs multivibrators: bistable, astable and monostable. The Oscillator Feedback Loop and Oscillation Criterion Positive feedback loop analysis: Af (s) xo A( s) xi 1 A( s) ( s) loop gain : L( s) A( s) ( s) L( j0 ) A( j0 ) ( j0 ) 1 Barkhausen criterion: The phase of loop gain should be zero at 0 . The magnitude of the loop gain should be unity at 0 . The characteristic equation has roots at s = j0 . Stability of oscillation frequency: 0 is determined solely by the phase characteristics. A “steep” function () results in a more stable frequency. NTUEE Electronics – L. H. Lu 12-2 Nonlinear Amplitude Control Oscillation: loop gain A = 1 Growing output: loop gain A > 1 Decaying output: loop gain A < 1 Oscillation mechanism: Initiating oscillation: loop gain slightly larger than unity (poles in RHP). Gain control: nonlinear network reduces loop gain to unity (poles on j-axis). Limiter Circuits for Amplitude Control For small amplitude (D1 off, D2 off) incremental gain (slope) = Rf /R1 For large negative swing (D1 on, D2 off) incremental gain (slope) = (Rf ||R4) /R1 For large positive swing (D1 off, D2 on) incremental gain (slope) = (Rf ||R3) /R1 vA R2 R3 vO V R2 R3 R2 R3 vB R5 R4 vO V R4 R5 R4 R5 L R4 R R5 V 4 VD R5 R5 L R3 R R3 V 2 VD R2 R2 NTUEE Electronics – L. H. Lu 12-3 12.2 OP AMP-RC OSCILLATOR CIRCUITS Wien-Bridge Oscillator R Zp 1 R2 / R1 L( s ) 1 2 L( s) 3 sRC 1 / sRC R1 Z p Z s L( j ) 1 R2 / R1 3 j (RC 1 / RC ) For L = 1 → 0=1/RC and R2/R1 = 2. To initiate oscillation → R2/R1 = 2 + . Limiter is used for amplitude control. NTUEE Electronics – L. H. Lu 12-4 Phase-Shift Oscillator The circuit oscillates at the frequency for which the phase shift of the RC network is 180. Only at this frequency will the total phase shift around the loop be 0 or 360. The minimum number of RC sections is three. K should be equal to the inverse of the magnitude of the RC network at oscillation frequency. Slightly higher K is used to ensure that the oscillation starts. Limiter is used for amplitude control. NTUEE Electronics – L. H. Lu 12-5 Quadrature Oscillator Based on the two-integrator loop without damping. R1, R2, R3, R4, D1 and D2 are used as limiter. Loop gain: t vO 2 V 2 v 1 2v O1 dt o 2 C 0 2R Vo1 sRC t vO1 V 1 vX 1 dt o1 C0 R Vx sRC L( s ) Vo 2 1 2 2 2 Vx s RC Poles are initially located in RHP (decreasing Rf ) to ensure that oscillation starts. Too much positive feedback results in higher output distortion. vO2 is purer than vO1 because of the filtering action provided by the second integrator on the peak-limited output of the first integrator. NTUEE Electronics – L. H. Lu 12-6 Active-Filter Tuned Oscillator The circuit consists of a high-Q bandpass filter connected in a positive-feedback loop with a hard limiter. Any filter circuit with positive gain can be used to implement the bandpass filter. Can generate high-quality output sine waves. Have independent control of frequency, amplitude and distortion of the output sinusoid sinusoid. Final Remark Op amp-RF oscillators ~ 10 to 100kHz. Lower limit: passive components. Upper limit: frequency response and slew rate of op amp. NTUEE Electronics – L. H. Lu 12-7 12.3 LC AND CRYSTAL OSCILLATORS LC Tuned Oscillators Colpitts oscillator: capacitive divider. Hartley oscillator: inductive divider. Utilize a parallel LC circuit between base and collector. R models the overall losses. Analysis of Colpitts Oscillators 0 1 / L1 / C1 1 / C2 1 0 1 / ( L1 L2 )C sC2V g mV ( sC1 1 / R)(1 s 2 LC2 )V 0 s 3 LC1C2 s 2 LC2 / R s (C1 C2 ) ( g m 1 / R) 0 1 2 LC2 (gm ) j (C1 C2 ) 3 LC1C2 0 R R 0 1 / L1 / C1 1 / C2 1 g m R C2 / C1 LC-tuned oscillators utilize the nonlinear transistor I-V characteristics for amplitude control (self-limiting). Collector (drain) current waveforms are distorted due to the nonlinear characteristics. Output voltage is a sinusoid with high purity because of the filtering action of the LC tuned circuit. NTUEE Electronics – L. H. Lu 12-8 Complete Circuit for a Colpitts Oscillator DC Analysis RE AC Analysis NTUEE Electronics – L. H. Lu 12-9 Crystal Oscillators Crystal impedance: 1 Z ( s) 1 / sC p sL 1 / sCs s 2 1 / LCs 1 Z (s) sC p s 2 [(C p Cs ) / LC p Cs ] s 1 / LCs p 1 / L(1 / Cs 1 / C p ) 1 Z ( j ) j 1 C p 2 s2 2 2 p Crystal reactance is inductive over very narrow frequency ( s to p ). The frequency band is well defined for a given crystal. Use the crystal to replace the inductor of the Colpitts oscillators. Oscillation frequency is dominated by Cs (much smaller than other C’s). 0 1 / LCs s Crystals are available with resonance frequencies KHz ~ hundred MHz. The oscillation frequency is fixed (tuning is not possible). NTUEE Electronics – L. H. Lu 12-10 12.4 BISTABLE MULTIVIBRATORS Bistable Characteristics Positive feedback is used for bistable multivibrator. Stable states: (1) vO = L+ and v+ = L+R1/(R1+R2). (2) vO = L and v+ = LR1/(R1+R2). Metastable state: vO = 0 and v+ = 0. Transfer Characteristics of the Inverting Bistable Circuit Initially vO = L+ and v+ = L+R1/(R1+R2) → vO change stage to L when vI increases to a value of L+R1/(R1+R2). Initially vO = L and v+ = L R1/(R1+R2) → vO change stage to L+ when vI decreases to a value of L R1/(R1+R2). The circuit exhibits hysteresis with a width of (VTH VTL). Input vI is referred to as a trigger signal which merely initiates or triggers regeneration. NTUEE Electronics – L. H. Lu 12-11 Transfer Characteristics of the Noninverting Bistable Circuit Initially vO = L+ and v+ = vI R2/(R1+R2) + L+ R1/(R1+R2) > 0 → vO change stage to L when vI decreases to a value (VTL) that causes v+ = 0 → VTL = L+(R1/R2) Initially vO = L and v+ = vI R2/(R1+R2) + L R1/(R1+R2) < 0 → vO change stage to L+ when vI increases to a value (VTH) that causes v+ = 0 → VTL = L(R1/R2) Application of the Bistable Circuit as a Comparator NTUEE Electronics – L. H. Lu 12-12 Limiter Circuits for Precise Output Levels L VZ 1 VD L (VZ 1 VD ) L VZ VD1 VD 2 L (VZ VD 3 VD 4 ) NTUEE Electronics – L. H. Lu 12-13 12.5 GENERATION OF SQUARE AND TRIANGULAR WAVEFORMS USING ASTABLE MULTIVIBRATORS Operation of the Astable Multivibrator F For vO = L+ andd v+ = vO R1/(R1+R2) > 0 → v is charged toward L+ through RC → vO change stage to L when v = v+ For vO = L and v+ = vOR1/(R1+R2) < 0 → v is discharged toward L through RC → vO change stage to L+ when v = v+ 1 ( L / L ) 1 1 ( L / L ) T1 ln 1 v L ( L L )e t / RC L ( L L )e t / T1 ln v L ( L L )e t / RC L ( L L )e t / T 2 ln 1 1 NTUEE Electronics – L. H. Lu 12-14 Generation of Triangular Waveforms Triangular can be obtained by replacing the low-pass RC circuit with an integrator. The bistable circuit required is of the noninverting type. VTH VTL L V VTL T1 RC TH T1 RC L VTH VTL L V VTL T2 RC TH T2 RC L NTUEE Electronics – L. H. Lu 12-15 12.6 GENERATION OF A STANDARDIZED PULSE – THE MONOSTABLE MULTIVIBRATORS Op-Amp Monostable Multivibrators Circuit components: Trigger: C2 , R4 and D2 Clamping diode: D1 R4 >> R1 → iD4 0 The circuit has one stable state: vO = L+ vB = VD1 0 D1 and D2 on Operation of monostable multivibrator Negative step as the trigger input D2 conducts heavily vC is pulled below vB vO changes state to L and vC becomes negative D1 and D2 off and C1 is discharged toward L vO changes state to L as vB = vC Stays in the stable state Positive trigger step turns off D2 (invalid trigger) vB (t ) L ( L VD1 )e t / R3C1 vB (T ) L ( L VD1 )e T / R3C1 L V L 1 T C1 R3 ln D1 C1 R3 ln L L 1 NTUEE Electronics – L. H. Lu 12-16 12.7 INTEGRATED-CIRCUIT TIMERS Monostable Multivibrator using 555 Timer Circuit S R Stable state: S = R = 0 and Q = 0 Q1 on and vC = 0 Trigger (vtrigger < VTL): S = 1 and Q = 1 Q1 off and vC is charged toward VCC Trigger pulse removal (vtrigger > VTL): S = R = 0 and Q = 1 Q1 off and vC is charged toward VCC End of recovery period (vC = VTH): R = 1 and Q = 0 Q1 on and vC is discharged toward GND Stable state: vC drops to 0 and S = R = 0 and Q = 0 NTUEE Electronics – L. H. Lu 0 0 1 0 0 0 00 10 vC (t ) VCC (1 e t / RC ) T RC ln 3 1.1RC 12-17 Astable Multivibrator using 555 Timer Circuit vC (t ) VCC (VCC VTL )e t / C ( RA RB ) TH C ( RA RB ) ln 2 0.69C ( RA RB ) vC VTH e t / CRB TL CRB ln 3 0.69CRB T TH TL 0.69CRB Duty cycle TH R RB A TH TL RA 2 RB Operation of astable multivibrator Initially vC = 0: S/R = 1/0 and Q = 1 Q1 off and vC is charged toward VCC thru RA and RB vC reaches VTH: S/R = 0/1 and Q = 0 Q1 on and vC is discharged toward GND thru RB vC reaches VTL: S/R = 1/0 and Q = 1 Q1 off and vC is charged toward VCC thru RA and RB NTUEE Electronics – L. H. Lu 12-18 12.8 NONLINEAR WAVEFORM-SHAPING CIRCUITS Nonlinear Amplification Method Use amplifiers with nonlinear transfer characteristics to convert triangular wave to sine wave. Differential pair with an emitter degeneration resistance can be used as sine-wave shaper. Breakpoint Method R4 , R5 >> R1 , R2 and R3 to avoid loading effect. –V1 < vIN < V1 : vO = vIN –V2 < vIN < –V1 or V1 < vIN < V2 vO = V1 + (vIN – V1) R5 / (R4 + R5) vIN < –V2 or V2 < vIN vO = V2 NTUEE Electronics – L. H. Lu 12-19 12.9 PRECISION RECTIFIER CIRCUITS Precision Half-Wave Rectifier (Superdiode) Operation of super diode: vO = vI for vI > 0 vO = 0 for vI < 0 The offset voltage (~0.5V) can be eliminated. Nonideal characteristics are masked by the loop gain. Disadvantages: Reverse bias may damage the input terminals. Op saturation (open loop) degrades the speed. Improved Precision Half-Wave Rectifier Rectifier operation: vI > 0 : D1 off, D2 on vO = 0 vI < 0 : D1 on, D2 off vO = (R2 / R1) vI The feedback loop remains closed at all times. The op amp remains in its linear operation region. Can prevent the delay due to saturated op amp. NTUEE Electronics – L. H. Lu 12-20 AC Voltage Measurement The circuit consists of a half-wave rectifier and a first-order low-pass filter. Dc component of v1 is (Vp/)(R2/R1). The LPF corner frequency should be much smaller than the input sine wave to reduce error by the harmonics. Precision Full-Wave Rectifier Full-wave rectifier is implemented by combining two rectifiers with a common load. Diode A is replaced by a superdiode. Diode B is replaced by the inverting precision half-wave rectifier. NTUEE Electronics – L. H. Lu 12-21 Precision Peak Rectifiers Buffered Precision Peak Detector Precision Clamping Circuit NTUEE Electronics – L. H. Lu 12-22