12.07.2015 Views

Designing Operational Amplifier Oscillator Circuits for ... - Microchip

Designing Operational Amplifier Oscillator Circuits for ... - Microchip

Designing Operational Amplifier Oscillator Circuits for ... - Microchip

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MAN866<strong>Designing</strong> <strong>Operational</strong> <strong>Amplifier</strong> <strong>Oscillator</strong> <strong>Circuits</strong>For Sensor ApplicationsAuthor:INTRODUCTIONJim Lepkowski<strong>Microchip</strong> Technology Inc.<strong>Operational</strong> amplifier (op amp) oscillators can be usedto accurately measure resistive and capacitive sensors.<strong>Oscillator</strong> design can be simplified by using theprocedure discussed in this application note. The derivationof the design equations provides a method toselect the passive components and determine the influenceof each component on the frequency of oscillation.The procedure will be demonstrated by analyzingtwo state-variable RC op-amp oscillator circuits.SENSOR APPLICATIONSState-variable oscillators are often used in sensor conditioningapplications because they have a reliablestart-up and a low sensitivity to stray capacitance. Theabsolute and ratio state-variable oscillators can beused to accurately detect both resistive and capacitivesensors. However, this application note will only analyzecapacitive applications. The state-variable's threeop-amp topology provides <strong>for</strong> a more dependable oscillationstart-up than a single op amp oscillator. The virtualground voltage at the inverting terminal of theamplifiers provides <strong>for</strong> immunity from stray capacitance,which is important in sensor applications,because the sensor capacitance is often only 10 to100 pF. In addition, the state-variable oscillator doesnot require matched capacitors or capacitors that havea terminal connected to ground.The absolute oscillator provides an output frequencythat is proportional to the square root of the product oftwo capacitors (i.e., freq. ∝ (C 1 x C 2 ) 1/2 ). Absolutequartz pressure sensors and humidity sensors areexamples of capacitive sensors that can use the absoluteoscillator. Also, this circuit can be used with resistivesensors, such as RTDs, to provide a temperatureto-frequencyconversion.The ratio oscillator provides an output frequency that isproportional to the square root of the ratio of two capacitors(i.e., freq. ∝ (C 4 / C 3 ) 1/2 ). The ratio oscillator canbe used to cancel the effect of a fluid-level sensor witha varying dielectric constant, such as an oil level sensor.An oil level sensor consists of two capacitancesthat are <strong>for</strong>med by tubes where the fluid serves as thedielectric media. The measurement capacitor (C MEAS )is partially covered by fluid and detects the level of theoil in the tank. In contrast, the compensation sensor(C COMP ) is completely buried in the fluid. When theratio C MEAS / C COMP is calculated, the dielectric constantof the oil is canceled. Air pressure and accelerationsensors can also use the ratio sensor to minimizethe error that occurs from the variance of the dielectricconstant over temperature.TRANSDUCER SYSTEMA block diagram of a typical sensor system is shown inFigure 1. The oscillation frequency can be found bycounting the number of clock pulses (i.e., MHz) in atime window that is <strong>for</strong>med by the square wave output(i.e., kHz) of a comparator circuit. The counter andcomparator circuits can be implemented with aPICmicro ® microcontroller.The PICmicro microcontroller can be used to providecurve-fit temperature correction <strong>for</strong> precision sensingapplications. Temperature correction can be accomplishedby implementing a curve-fitting routine withdata obtained by calibrating the sensor over the operatingrange. The temperature correction data can bestored in the E 2 memory of the PICmicro microcontroller.A silicon IC sensor can provide the temperature ofthe sensor.© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 1


AN866Step 2: Solve N(s) = 0The second step in the procedure determines thezeroes of N(s). Routh’s stability criterion, shown inAppendix B, provides a method that determines thezeroes of the characteristic equation without thenecessity of factoring the equation.First, the Routh test consists of <strong>for</strong>ming a coefficientarray from N(s). Next, the procedure substitutes s = jω ο<strong>for</strong> s, with the summation of the row set to zero. If therow equation produces a non-trivial solution <strong>for</strong> ω ο , theprocedure is complete and the frequency of oscillationis equal to ω ο . If the row equation does not yield anequation that can be solved <strong>for</strong> ω ο , the procedure continueswith the next row in the Routh array. Usually, it isnecessary only to complete the first two or three rowsof the Routh array to produce an equation that can besolved <strong>for</strong> ω ο .Step 3: Sub-Circuit Design EquationsThe third step in the design procedure analyzes thesub-circuits <strong>for</strong>med at each amplifier. The sub-circuitequations are <strong>for</strong>med by obtaining the gain equationand pole/zero locations <strong>for</strong> each amplifier.Step 4: Verify⏐LG⏐ ≥ 1The final step in the procedure verifies that the loopgainis equal to, or greater than, one after the R and Ccomponent values have been chosen. This step is alsorequired to verify that the amplifiers do not saturate,which will result in an error in the oscillation frequency.AMPLIFIER SELECTION CRITERIAThe appropriate op amp to use in a sensor oscillator isdetermined by the required accuracy and acceptabledistortion of the oscillation frequency. The design equationsassume that the amplifiers are ideal. However, opamps have a finite gain bandwidth product (GBW), alimited slew rate (SR) and full power bandwidth (f P ).The non-ideal characteristics of the amplifier will lowerthe oscillation frequency at high frequencies and mayalso result in a design with poor start-up characteristics.Note that the total harmonic distortion specificationof the amplifiers is critical <strong>for</strong> oscillators that are usedas sine wave references. However, the shape of thewave<strong>for</strong>m is not critical in most sensor applicationsbecause only the frequency of the output is measured.Several general design rules can be used to select anop amp <strong>for</strong> an oscillator circuit. First, the GBW shouldbe a factor of 10 to 100 higher than the maximum oscillationfrequency. Next, the full-power bandwidth,defined as f P = SR / (2πV P ), where V P is the voltageswing (V O(max) - V O(min) ) of the output signal, should beat least 2 times greater than the maximum oscillationfrequency. For example, the MCP6024 quad amplifierhas a GBW = 10 MHz (typ.), SR = 7 V/µs (typ.) and a f Pof 400 kHz, with V DD = 5V. An oscillator with amaximum frequency of 100 kHz can be implementedwith the MCP6024 with enough design margin that thenon-ideal characteristics of the amplifier can beneglected.ABSOLUTE STATE-VARIABLEOSCILLATORCircuit DescriptionThe schematic of the absolute circuit is shown inFigure 3. The state-variable oscillator consists of twointegrators and an inverter circuit. Each integrator providesa phase shift of 90°, while the inverter adds anadditional 180° phase shift. The total phase shift of360° of the feedback loop produced by the three amplifiersresults in the oscillation. The first integrator stageconsists of amplifier A 1 , resistor R 1 and sensor capacitanceC 1 . The second integrator consists of amplifierA 2 , resistor R 2 and sensor capacitance C 2 . The inverterstage consists of amplifier A 3 , resistors R 3 and R 4 andcapacitor C 4 . The addition of capacitor C 4 helps ensureoscillation start-up by providing an additional phaseshift.The absolute oscillator does not require a limit circuit ifrail-to-rail input/output (RRIO) amplifiers are used andthe gain of the inverter stage (A 3 ) is equal to one(i.e., R 3 = R 4 ). The sinewave output of the signal willswing within approximately 50 mV of the V DD and V DDpower rails as shown in Figure 5.A complementary output voltage comparator (A 4 ) isused to convert the oscillator’s sinewave output to asquare wave digital signal. The comparator functionsas a zero-crossing detector and the switching point isequal to the virtual ground voltage (i.e., V DD /2). ResistorR 9 is used to provide additional hysteresis (V HYS ) tothe comparator. Listed below is the hysteresisequation.EQUATION:RV = -------------------- 8× ( V – V )HYS R 8+ R Omax ( ) Omin ( )9R 8V HYS≅ -------------------- × VR 8+ R DD 9© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 3


AN866V DDR 6V DD /2R 7C 4V 0C 1C 2R 1A 1A 2R 4R 9V DD /2R 2R 3A 3R 8VA 41V DD /2 V 2V DD /2 V 3V DD /2FIGURE 3:Absolute <strong>Oscillator</strong> Schematic.⎛R A 4 ⎞------1A = 3⎜ ⎟⎛-------------------------⎞2= ----------------– 1sR C ⎝R 3 ⎠⎝sR 4C 4+ 1⎠2 2V 1 V 3V 2A– 11= ----------------sR 1C 1FIGURE 4:Absolute <strong>Oscillator</strong> Signal Flow Diagram.© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 4


AN866ABSOLUTE STATE-VARIABLEDesign EquationsSTEP 1: FIND LG AND ∆STs ( )A A= ---------------- = ----- =1 – LG ∆sA-----------Ns ( )-----------Ds ( )The loop-gain is found by breaking the loop in thesignal flow diagram of Figure 4, as shown below.A 1 A 2A 3V 1 V 2V 3The procedure continues by analyzing row s 2 to determinewhen the equation is equal to zero.Let s = jω οa 1 s 2 + a 3 = ( R 1 R 2 R 3 C 1 C 2 )( jω o ) 2 + R 4 = 020 = R 4 – R 1 R 2 R 3 C 1 C 2 ω oP2ω o = [ R 4 ⁄ ( R 1 R 2 R 3 C 1 C 2 )]ω o = [ R 4 ⁄ ( R 1 R 2 R 3 C 1 C 2 )] 1/2= 2π ⁄ ω o = 2π ⁄ [ R 4 ⁄ ( R 1 R 2 R 3 C 1 C 2 )] 1/2Note that C 4 does not appear in the oscillation equation.C 4 and R 4 <strong>for</strong>m a low-pass filter. The gain of amplifierA 3 will not be a function of C 4 if the oscillationfrequency is less than the cut-off frequency of the filter.A 1 = – 1 ⁄ ( sR 1 C 1 )A 2 = – 1 ⁄ ( sR 2 C 2 )A 3 = – Z 4 ⁄ Z 3= –( R 4|| C 4 ) ⁄ R 3= –[( R 4 ⁄ R 3 )( 1 ⁄ ( sR 4 C 4+ 1))]If:1. R 1 = R 2 = R2. C 1 = C 2 = C3. R 3 = R 4Then:P=2πRCLG = A × A × A 1 2 3= [–1 ⁄ ( sR C )][– 1 ⁄ ( sR C )][(–R ⁄ R )( 1 ⁄ ( sR C + 1))]1 1 2 2 4 3 4 4= – R ⁄ ⎛s 3 R R R R C C C C + s 2 R R R C C ⎞4 ⎝ 1 2 3 4 1 2 3 4 1 2 3 1 2 ⎠∆s= Ns ( ) ⁄ Ds ( ) = 1 – LG= 1 – [– R 4 ⁄ ( s 3 R 1 R 2 R 3 R 4 C 1 C 2 C 4 + s 2 R 1 R 2 R 3 C 1 C 2 )][ s 3 R 1 R 2 R 3 R 4 C 1 C 2 C 4 + s 2 R 1 R 2 R 3 C 1 C 2 + R 4 ]= -----------------------------------------------------------------------------------------------------------------[ s 3 R 1 R 2 R 3 R 4 C 1 C 2 C 4 + s 2 R 1 R 2 R 3 C 1 C 2 ]Ns ( ) = s 3 R 1 R 2 R 3 R 4 C 1 C 2 C 4 + s 2 R 1 R 2 R 3 C 1 C 2 + R 4STEP 3: SUB-CIRCUIT DESIGN EQUATIONSIntegrator A 1Gain A 1 = – 1 ⁄ ( 2πfR 1 C 1 )Pole f p1 = 1 ⁄ ( 2πR 1 C 1 )Integrator A 2Gain A 2 = – 1 ⁄ ( 2πfR 2 C 2 )Pole f p2 = 1 ⁄ ( 2πR 2 C 2 )Gain = –[( R 4 ⁄ R 3 )( 1 ⁄ ( sR 4 C 4 + 1))]Gain ≅ – R 4 ⁄ R 3Integrator A 3A 1 A 2 A 3STEP 2: SOLVE N(s) = 0The zeros of the characteristic equation are determinedby using the Routh stability test.Ns ( ) = a 0 s 3 + a 1 s 2 + a 2 s + a 3a 0 = R 1 R 2 R 3 R 4 C 1 C 2 C 4a 1 = R 1 R 2 R 3 C 1 C 2a 2 = 0a 3 = R 4Routh Stability Test Coefficient Arrayrow s 3 a 0 + a 2 = 0row s 2 a 1 + a 3 = 0Row s 3 produces a trivial solution (ω ο = 0):a 0 ( jω o ) 3 + 0 = 0STEP 4: VERIFY ⏐LG⏐ ≥ 1Assume:1. R 1 = R 2 = R2. C 1 = C 2 = C3. R 3 = R 4= = = 1LG = A 1 × A 2 × A 3 = 1V 1 = A 1 × V 3V 2 = A 2 × V 1V 3 = A 3 × V 2Note that a voltage limit circuit should be added if rail-torailinput/output operational amplifiers are not used, or ifthe gain of the inverter is not equal to one (i.e., R 3 ≠ R 4, ).A limit circuit is required to prevent the frequency errorthat will result from the saturation delay time of theamplifiers.© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 5


AN866ABSOLUTE STATE-VARIABLETest ResultsThe components used in the evaluation design arelisted below. Note that the capacitive sensor (i.e., C 1and C 2 ) was simulated with discrete capacitors.The measured and calculated oscillation frequency isshown in Table 1. Figure 5 shows the oscillation wave<strong>for</strong>mwhen C 1 = C 2 = 220 pF. The error in the measuredoscillation is attributed to the accuracy of the testequipment.R 1 = R 2 = R 6 = R 7 = 32.7 kΩR 3 = R 4 = 10 kΩR 8 = 1 kΩR 9 = 1 MΩC 1 = C 2 = see Table 1C 4 = 18 pFV DD = 5.0VA 1 , A 2 , A 3 ≡ MCP6024 (quad RRIO,GBW = 10 MHZ)A 4 ≡ MCP6541Push-Pull OutputComparatorTABLE 1:ABSOLUTE OSCILLATOR TEST RESULTSCapacitorValuesCalculated OscillationPeriod (Frequency)Measured OscillationPeriod (Frequency)C 1 = C 2 = 47 pF 9.66 µs (103.6 kHz) 10.0 µs (100.0 kHz)C 1 = C 2 = 56 pF 11.5 µs (86.9 kHz) 12.0 µs (83.3 kHz)C 1 = C 2 = 82 pF 16.9 µs (59.4 kHz) 16.6 µs (60.2 kHz)C 1 = C 2 = 100 pF 20.6 µs (48.7 kHz) 21.0 µs (47.6 kHz)C 1 = C 2 = 150 pF 30.8 µs (32.6 kHz) 30.0 µs (33.3 kHz)C 1 = C 2 = 220 pF 45.2 µs (22.1 kHz) 46.0 µs (21.7 kHz)Output of A 3 <strong>Amplifier</strong> (V 3 )Comparator Output (V O )FIGURE 5:Absolute <strong>Oscillator</strong> Test Results (C 1 = C 2 = 220 pF).© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 6


AN866RATIO STATE-VARIABLEOSCILLATORCircuit DescriptionThe schematic of the ratio circuit is shown in Figure 6.This circuit consists of two integrators and a differentiatorcircuit. The integrators <strong>for</strong>med by amplifiers A 1 andA 2 are identical to the integrators used in the absolutecircuit. The differentiator stage is <strong>for</strong>med by amplifierA 3 , resistors R 3 , R 4 and R 5 , and the sensor capacitorsC 3 and C 4 to provide a 180° phase shift. The comparator(A 4 ) used to convert the sinewave output to asquare wave digital signal is identical to the absoluteoscillator circuit.A Bode plot of the differentiator stage is provided inFigure 8. The values of resistors R 3 , R 4 and R 5 areselected to set the break frequencies of the differentiatorstage so that the gain of the stage is equal to -C 3 /C 4 at the oscillation frequency. Resistor R 5 is alsoused to provide a DC current path around capacitor C 3in order to initiate oscillation at power-up.V DD /2V DDQ1C 4C 1CC 32R 1 R 4A 1 R 2A 2R 5A 3V DD /2V 1V DD /2 V 2 V DD /2 V 3R 6V DD /2R 7R 9R 8R 3A 4V DD /2FIGURE 6:Ratio <strong>Oscillator</strong> Schematic.- R ( sR C + 1)– 1A 4 5 3A = ---------------------------------------------------------------------------------------2= ----------------sR C 3 ( sR 3C 5C 3+ R 3+ R 5)( sR 4C 4+ 1)2 2V 1 V 3V 2A 11=----------------–sR 1C 1FIGURE 7:Ratio <strong>Oscillator</strong> Signal Flow Diagram.© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 7


AN866Gain (dB)⎛C 3 ⎞20log 10⎜------⎟⎝C 4 ⎠F1z1= --------------------2πR 5C 3OscillationRangeAssumptions1. C 3 > C 42. R 3 < R 4 < R 53. R 3 < < R 5 and R 4 ≈ R 5-----100 Frequency (Hz)⎛ R20log 4 ⎞10⎜--------------------⎟⎝R 3+ R 5 ⎠1F p1= -------------------- F = --------------------1p22πR C 2πR 4 43C 3FIGURE 8:Bode Plot of Differentiator <strong>Amplifier</strong>.Voltage Limit CircuitThe ratio oscillator uses a limit circuit to accommodatethe varying gain requirement of the circuit. It may benecessary to add a voltage limit or clamp circuit to theoscillator to prevent the amplifiers from saturating andavoid slew rate limitations. The voltage limit circuit<strong>for</strong>med by PNP transistor Q 1 is used to create the maximumvoltage limit. The clamping voltage of the limitcircuit is provided below:EQUATION:V Max_Limit= V Q1_base+ V Q1_base-to-emitterV Max_Limit≅ V Q1_base+ 0.7VIn single-supply applications, it is not necessary to useboth maximum and minimum limit circuits. Only one ofthe limit circuits is required due to the symmetry of thesinewave that is centered around the virtual groundvoltage at the non-inverting terminal of the amplifiers(V DD /2). In the reference design of Figure 6, V DD isequal to 5V and V Q1-base is equal to 2.5V. Thus, theoscillation wave<strong>for</strong>m at V 2 will swing from 1.8V to 3.2Vor 2.5V ±0.7V.Note that the transistor adds a small capacitance (C Q1 )to the integrator capacitor of the circuit (C 2 ). If C 2 is relativelysmall, the effective capacitance of the limit circuit(C Limit ) can be reduced by connecting a diode inseries between the emitter junction and the output ofthe amplifier (i.e. 1/C Limit = 1/C Q1 + 1/C Diode ).© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 8


AN866The procedure continues by analyzing row s 3 to determinewhen the row equation is equal to zero.STEP 3: SUB-CIRCUIT DESIGN EQUATIONSIntegrator A 1Gain A 2 1a s 3 + a s = s ⎛ a s 2 + a ⎞=01 3 ⎝ 1 3 ⎠Let s = jω οjω oa 1ω o2Gain A 1 = – 1 ⁄ ( 2πfR 1 C 1 )Pole f = 1 ⁄ ( 2πR 1 C 1 )⎛– ⎝+ a ⎞3 ⎠= 02a 3ω o= -----a 1= – ⁄ ( 2πfR 2 C 2 )Pole f = 1 ⁄ ( 2πR 2 C 2 )Integrator A 2DC Gain R 4 R 3 R 5R R C 4 5 3= ---------------------------------------------------------------------------------------------------------------------( R 1R 2C 1C 2)( R 3R 5C 3+ R 3R 4C 4+ R 4R 5C 4)( Rω 4R 5C 3)o = ---------------------------------------------------------------------------------------------------( R 1R 2C 1C 2)( R 3R 5C 3+ R 3R 4C 4+ R 4R 5C 4)If:1. R 1 = R 2 = R2. C 1 = C 2 = CThen:If:1. R 5 >> R 32. R 4 >> R 3Then:P=2π-----ω oP 2πRC R 3 C 1/24C----------- 4R----- 3=+ + -----R 5C C 3 3R 4P 2πRC C 4≅ ----- 1/2C 31/2Differentiator A 3= – ⁄ ( + )Gain at Oscillation =C 3–-----C 4Pole f p1 = 1 ⁄ ( 2πR 4 C 4 )Pole f p2 = 1 ⁄ ( 2πR 3 C 3 )Zero f z = 1 ⁄ ( 2πR 5 C 3 )STEP 4: VERIFY ⏐LG⏐ ≥ 1Assume:1. R 5 >> R 3 and R 4 >> R 3 , then A 3 = - C 3 / C 42. V 2 = V Max_Limit (i.e. place limit circuit at A 2 )Next, calculate the voltages at the output of eachamplifier starting at V 2 .V 2=V Max_LimitV 3 = A 3 × V 2 =V 1 = A 1 × V 3 =Oscillation will be sustained if:A 2 × V 1 ≥ V Max_LimitC----- 3× VC Max_Limit4---------------------1× V2πfR 1 C 31⎛ 1--------------------- ⎞ × V⎝2πfR 2 C ⎠ 1 ≥ V Max_Limit2© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 10


AN866RATIO STATE-VARIABLETest ResultsR 1 = R 2 = R 6 = R 7 = 32.7 kΩC 1 = C 2 = 220 pFC 3 = C 4 = see Table 2R 3 = 5 kΩR 4 = 3.3 MΩR 5 = 10 MΩR 8 = 1 kΩR 9 = 1 MΩV DD = 5.0VA 1 , A 2 , A 3 ≡ MCP6024 (quad RRIO,GBW = 10 MHZ)A 4 ≡ MCP6541 Push-Pull OutputComparatorQ 1 ≡ 2N3906The measured and calculated oscillation frequency isshown in Table 2. Figure 9 shows the oscillation wave<strong>for</strong>mwhen C 3 = 100 pF and C 4 = 47 pF. Note that thevoltage limit circuit adds distortion to the wave<strong>for</strong>m ofamplifier A 2 . In most sensor applications, wave<strong>for</strong>mdistortion is inconsequential because the measurementis proportional to frequency and not the amplitudeof the oscillation.TABLE 2:RATIO OSCILLATOR TEST RESULTSCapacitorValuesCalculated OscillationPeriod (Frequency)Measured OscillationPeriod (Frequency)C 3 = 47 pF C 4 = 47 pF 45.2 µs (22.1 kHz) 47.0 µs (21.3 kHz)C 3 = 47 pF C 4 = 100 pF 65.9 µs (15.2 kHz) 68.0 µs (14.7 kHz)C 3 = 47 pF C 4 = 220 pF 97.8 µs (10.2 kHz) 98.4 µs (10.2 kHz)C 3 = 56 pF C 4 = 47 pF 41.4 µs (24.2 kHz) 43.0 µs (23.3 kHz)C 3 = 56 pF C 4 = 220 pF 89.6 µs (11.2 kHz) 92.0 µs (10.9 kHz)C 3 = 100 pF C 4 = 47 pF 31.0 µs (32.3 kHz) 33.0 µs (30.3 kHz)C 3 = 100 pF C 4 = 220 pF 67.0 µs (14.9 kHz) 70.0 µs (14.3 kHz)Output of A 2 <strong>Amplifier</strong> (V 2 )Output of A 3 <strong>Amplifier</strong> (V 3 )FIGURE 9:Ratio <strong>Oscillator</strong> Test Results (C 3 = 100 pF, C 4 = 47 pF).© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 11


AN866APPENDIX A: MASON’S REDUCTIONTHEOREMThe oscillation frequency is determined by finding thepoles of the denominator of the transfer equation T(s)or equivalently the zeroes of the numerator N(s) of thecharacteristic equation ∆(s). Mason’s theory is especiallyuseful <strong>for</strong> analyzing oscillators that have multiplefeedback loops.Mason’s theorem [5] states that the transfer functionfrom input X to output Y is:EQUATION:Ts ( )YΣ iP i∆s iΣ iP i∆s i= -- = ------------------ = ------------------X ∆s Ns ( )-----------Ds ( )Where:P i = the direct transmittance or path <strong>for</strong>m input X tooutput Y∆s i = the system determinant. (∆s i = 1 if P i touchesall of the loops)∆s = 1 - ΣL j + ΣL k L l - ΣL m L n L o +....ΣL j = the sum of all loops (i.e. loop gains)ΣL k L l = the sum of products of pairs of nontouchingloopsΣL m L n L o = the sum of products of gains of non–touching loops taken three at a time.APPENDIX B: ROUTH STABILITYTESTThe Routh Stability Test [5] can be used to test thecharacteristic equation to determine whether any of theroots lie on the imaginary axis. Routh’s test consists of<strong>for</strong>ming a coefficient array from N(s). Next, the proceduresubstitutes s = jω ο <strong>for</strong> s, and the summation of therow is set to zero. If the row equation produces a nontrivialsolution <strong>for</strong> ω ο , the procedure is complete and thefrequency of oscillation is equal to ω ο . If the row equationdoes not yield an equation that can be solved <strong>for</strong>ω o , the procedure continues with the next row in theRouth array. This technique arranges the numerator ofthe characteristic equation (i.e., denominator of thetransfer equation) into the array listed below.EQUATION:N(s) = a o s n + a 1 s n-1 + a 2 s n-2 + a 3 s n-3 +...+ a n-1 s + a nNote <strong>for</strong> simplicity, only the first three rows of the Routhcoefficient array are shown below.s n a 0 a 2 a 4 .... a ns n–1 a 1 a 3 a 5 .... a n–1s n–2 b 1 b 2 b 3 .... b. n–2where the coefficients b 1 , b 2 , b 3 , etc., are defined as:b 1 = (a 1 a 2 - a 0 a 3 ) / a 1b 2 = (a 1 a 4 - a 0 a 5 ) / a 1b 3 = (a 1 a 6 - a 0 a 7 ) / a 1The Routh stability criterion states:1. A necessary and sufficient condition <strong>for</strong> stabilityis that the first column of the array does not containsign changes.2. The number of sign changes in the entries of thefirst column of the array is equal to the numberof roots in the right half s–plane.3. If the first element in a row is zero, it is replacedby ε, and the sign changes when ε → 0 arecounted after completing the array.4. The poles are located in the right half plane oron the imaginary axis if all the elements in a roware zero.© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 12


AN866CONCLUSION<strong>Operational</strong> amplifier oscillators can be used to producea frequency that is proportional to resistive andcapacitive sensors. Design equations defining theoscillation frequency are readily available <strong>for</strong> severalcommon oscillators, such as Wein bridge and phaseshift oscillators. However, detailed design equationsthat show the relationship of the resistors and capacitorsare generally not available. Thus, there is a need<strong>for</strong> a design procedure that derives the equations inorder to select the resistor and capacitor componentsthat maximize the accuracy of the oscillation frequency.The design procedure was demonstrated by analyzingtwo state-variable oscillators <strong>for</strong> capacitive sensingapplications.BIBLIOGRAPHY1. Celma, C., Martinez, P., and Carlosens, A.,“Approach to the Synthesis of Canonic RC–Active <strong>Oscillator</strong>s Using CCII”, IEE Proc. <strong>Circuits</strong>,Devices and Systems, Vol. 141, No. 6,December 1994, pp. 493–497.2. Lepkowski, J. and Young, C, “AND8054 -<strong>Designing</strong> RC <strong>Oscillator</strong> <strong>Circuits</strong> with Low Voltage<strong>Operational</strong> <strong>Amplifier</strong>s and Comparators<strong>for</strong> Precision Sensor Applications”, ONSemiconductor, Phoenix, Arizona, 2002.3. Martinez, P., Aldea C. and Celma, S., “Approachto the Realization of State-Variable Based <strong>Oscillator</strong>s”,IEEE International Conference on Electronics<strong>Circuits</strong> and Systems, Vol. 3, 1998,p.139–142.4. Sidorowicz, R., “An Abundance of SinusoidalRC–<strong>Oscillator</strong>s”, Proc. IEE, Vol. 119, No. 3,March 1972, pp. 283–293.5. Truxal, J., “Introductory System Engineering”,McGraw–Hill, N.Y., 1972.6. Van Valkenburg, M., “Analog Filter Design”,Saunders College Publishing, Fort Worth, 1992.© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 13


AN866NOTES:© 2003 <strong>Microchip</strong> Technology Inc. DS00866A-page 14


Note the following details of the code protection feature on <strong>Microchip</strong> devices:• <strong>Microchip</strong> products meet the specification contained in their particular <strong>Microchip</strong> Data Sheet.• <strong>Microchip</strong> believes that its family of products is one of the most secure families of its kind on the market today, when used in theintended manner and under normal conditions.• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to ourknowledge, require using the <strong>Microchip</strong> products in a manner outside the operating specifications contained in <strong>Microchip</strong>'s DataSheets. Most likely, the person doing so is engaged in theft of intellectual property.• <strong>Microchip</strong> is willing to work with the customer who is concerned about the integrity of their code.• Neither <strong>Microchip</strong> nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does notmean that we are guaranteeing the product as “unbreakable.”Code protection is constantly evolving. We at <strong>Microchip</strong> are committed to continuously improving the code protection features of ourproducts. Attempts to break microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such actsallow unauthorized access to your software or other copyrighted work, you may have a right to sue <strong>for</strong> relief under that Act.In<strong>for</strong>mation contained in this publication regarding deviceapplications and the like is intended through suggestion onlyand may be superseded by updates. It is your responsibility toensure that your application meets with your specifications.No representation or warranty is given and no liability isassumed by <strong>Microchip</strong> Technology Incorporated with respectto the accuracy or use of such in<strong>for</strong>mation, or infringement ofpatents or other intellectual property rights arising from suchuse or otherwise. Use of <strong>Microchip</strong>’s products as criticalcomponents in life support systems is not authorized exceptwith express written approval by <strong>Microchip</strong>. No licenses areconveyed, implicitly or otherwise, under any intellectualproperty rights.TrademarksThe <strong>Microchip</strong> name and logo, the <strong>Microchip</strong> logo, dsPIC,KEELOQ, MPLAB, PIC, PICmicro, PICSTART, PRO MATE andPowerSmart are registered trademarks of <strong>Microchip</strong>Technology Incorporated in the U.S.A. and other countries.FilterLab, microID, MXDEV, MXLAB, PICMASTER, SEEVALand The Embedded Control Solutions Company areregistered trademarks of <strong>Microchip</strong> Technology Incorporatedin the U.S.A.Accuron, Application Maestro, dsPICDEM, dsPICDEM.net,ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, microPort,Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM,PICC, PICkit, PICDEM, PICDEM.net, PowerCal, PowerInfo,PowerMate, PowerTool, rfLAB, rfPIC, Select Mode,SmartSensor, SmartShunt, SmartTel and Total Endurance aretrademarks of <strong>Microchip</strong> Technology Incorporated in theU.S.A. and other countries.Serialized Quick Turn Programming (SQTP) is a service markof <strong>Microchip</strong> Technology Incorporated in the U.S.A.All other trademarks mentioned herein are property of theirrespective companies.© 2003, <strong>Microchip</strong> Technology Incorporated, Printed in theU.S.A., All Rights Reserved.Printed on recycled paper.<strong>Microchip</strong> received QS-9000 quality systemcertification <strong>for</strong> its worldwide headquarters,design and wafer fabrication facilities inChandler and Tempe, Arizona in July 1999and Mountain View, Cali<strong>for</strong>nia in March 2002.The Company’s quality system processes andprocedures are QS-9000 compliant <strong>for</strong> itsPICmicro ® 8-bit MCUs, KEELOQ ® code hoppingdevices, Serial EEPROMs, microperipherals,non-volatile memory and analog products. Inaddition, <strong>Microchip</strong>’s quality system <strong>for</strong> thedesign and manufacture of developmentsystems is ISO 9001 certified.DS00866A-page 15© 2003 <strong>Microchip</strong> Technology Inc.


MWORLDWIDE SALES AND SERVICEAMERICASCorporate Office2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 480-792-7200 Fax: 480-792-7277Technical Support: 480-792-7627Web Address: http://www.microchip.comAtlanta3780 Mansell Road, Suite 130Alpharetta, GA 30022Tel: 770-640-0034 Fax: 770-640-0307Boston2 Lan Drive, Suite 120West<strong>for</strong>d, MA 01886Tel: 978-692-3848 Fax: 978-692-3821Chicago333 Pierce Road, Suite 180Itasca, IL 60143Tel: 630-285-0071 Fax: 630-285-0075Dallas4570 Westgrove Drive, Suite 160Addison, TX 75001Tel: 972-818-7423 Fax: 972-818-2924DetroitTri-Atria Office Building32255 Northwestern Highway, Suite 190Farmington Hills, MI 48334Tel: 248-538-2250 Fax: 248-538-2260Kokomo2767 S. Albright RoadKokomo, IN 46902Tel: 765-864-8360 Fax: 765-864-8387Los Angeles18201 Von Karman, Suite 1090Irvine, CA 92612Tel: 949-263-1888 Fax: 949-263-1338Phoenix2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 480-792-7966 Fax: 480-792-4338San Jose<strong>Microchip</strong> Technology Inc.2107 North First Street, Suite 590San Jose, CA 95131Tel: 408-436-7950 Fax: 408-436-7955Toronto6285 Northam Drive, Suite 108Mississauga, Ontario L4V 1X5, CanadaTel: 905-673-0699 Fax: 905-673-6509ASIA/PACIFICAustralia<strong>Microchip</strong> Technology Australia Pty LtdMarketing Support DivisionSuite 22, 41 Rawson StreetEpping 2121, NSWAustraliaTel: 61-2-9868-6733 Fax: 61-2-9868-6755China - Beijing<strong>Microchip</strong> Technology Consulting (Shanghai)Co., Ltd., Beijing Liaison OfficeUnit 915Bei Hai Wan Tai Bldg.No. 6 Chaoyangmen BeidajieBeijing, 100027, No. ChinaTel: 86-10-85282100 Fax: 86-10-85282104China - Chengdu<strong>Microchip</strong> Technology Consulting (Shanghai)Co., Ltd., Chengdu Liaison OfficeRm. 2401-2402, 24th Floor,Ming Xing Financial TowerNo. 88 TIDU StreetChengdu 610016, ChinaTel: 86-28-86766200 Fax: 86-28-86766599China - Fuzhou<strong>Microchip</strong> Technology Consulting (Shanghai)Co., Ltd., Fuzhou Liaison OfficeUnit 28F, World Trade PlazaNo. 71 Wusi RoadFuzhou 350001, ChinaTel: 86-591-7503506 Fax: 86-591-7503521China - Hong Kong SAR<strong>Microchip</strong> Technology Hongkong Ltd.Unit 901-6, Tower 2, Metroplaza223 Hing Fong RoadKwai Fong, N.T., Hong KongTel: 852-2401-1200 Fax: 852-2401-3431China - Shanghai<strong>Microchip</strong> Technology Consulting (Shanghai)Co., Ltd.Room 701, Bldg. BFar East International PlazaNo. 317 Xian Xia RoadShanghai, 200051Tel: 86-21-6275-5700 Fax: 86-21-6275-5060China - Shenzhen<strong>Microchip</strong> Technology Consulting (Shanghai)Co., Ltd., Shenzhen Liaison OfficeRm. 1812, 18/F, Building A, United PlazaNo. 5022 Binhe Road, Futian DistrictShenzhen 518033, ChinaTel: 86-755-82901380 Fax: 86-755-8295-1393China - QingdaoRm. B505A, Fullhope Plaza,No. 12 Hong Kong Central Rd.Qingdao 266071, ChinaTel: 86-532-5027355 Fax: 86-532-5027205India<strong>Microchip</strong> Technology Inc.India Liaison OfficeMarketing Support DivisionDivyasree Chambers1 Floor, Wing A (A3/A4)No. 11, O’Shaugnessey RoadBangalore, 560 025, IndiaTel: 91-80-2290061 Fax: 91-80-2290062Japan<strong>Microchip</strong> Technology Japan K.K.Benex S-1 6F3-18-20, ShinyokohamaKohoku-Ku, Yokohama-shiKanagawa, 222-0033, JapanTel: 81-45-471- 6166 Fax: 81-45-471-6122Korea<strong>Microchip</strong> Technology Korea168-1, Youngbo Bldg. 3 FloorSamsung-Dong, Kangnam-KuSeoul, Korea 135-882Tel: 82-2-554-7200 Fax: 82-2-558-5934Singapore<strong>Microchip</strong> Technology Singapore Pte Ltd.200 Middle Road#07-02 Prime CentreSingapore, 188980Tel: 65-6334-8870 Fax: 65-6334-8850Taiwan<strong>Microchip</strong> Technology (Barbados) Inc.,Taiwan Branch11F-3, No. 207Tung Hua North RoadTaipei, 105, TaiwanTel: 886-2-2717-7175 Fax: 886-2-2545-0139EUROPEAustria<strong>Microchip</strong> Technology Austria GmbHDurisolstrasse 2A-4600 WelsAustriaTel: 43-7242-2244-399Fax: 43-7242-2244-393Denmark<strong>Microchip</strong> Technology Nordic ApSRegus Business CentreLautrup hoj 1-3Ballerup DK-2750 DenmarkTel: 45-4420-9895 Fax: 45-4420-9910France<strong>Microchip</strong> Technology SARLParc d’Activite du Moulin de Massy43 Rue du Saule TrapuBatiment A - ler Etage91300 Massy, FranceTel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79Germany<strong>Microchip</strong> Technology GmbHSteinheilstrasse 10D-85737 Ismaning, GermanyTel: 49-89-627-144-0Fax: 49-89-627-144-44Italy<strong>Microchip</strong> Technology SRLVia Quasimodo, 1220025 Legnano (MI)Milan, ItalyTel: 39-0331-742611 Fax: 39-0331-466781United Kingdom<strong>Microchip</strong> Ltd.505 Eskdale RoadWinnersh TriangleWokinghamBerkshire, England RG41 5TUTel: 44-118-921-5869 Fax: 44-118-921-582005/30/03DS00866A-page 16© 2003 <strong>Microchip</strong> Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!