Post Go back to editing

KCC's Quizzes AQQ280 about a relaxation oscillator with a double wipers potentiometer

1. Quote of the week: "Whatever you do, always give 100%. Unless you're donating blood" - Bill Murray

 

2. New quiz AQQ280:

The circuit here below is a relaxation oscillator using a double wipers potentiometer.

The opamp is considered ideal (i.e. infinite open loop gain, infinite input impedances, zero output impedance).

 Questions:

  1. What’s the frequency at Vout for a = 1/3 and b=2/3?
  2. Same question as above but for a=10% and b=90%
  3. What happens (i.e. Vout) if the 2 inputs of the MUX are swapped (i.e. a selected when S=1 and b selected when S=0) ?

Good luck and try to be among the first ones!

If you know friends or colleagues who should participate to the quiz, please let them know ((3) Add Discussion - Quizzes - Logic Lounge - EngineerZone) !



source: https://commons.wikimedia.org/wiki/File:Blood_Donation_at_Hospital.jpg
[edited by: ambugua at 7:15 PM (GMT -5) on 21 Feb 2025]
Please share your answer to view other submitted answers
  • 1.    721.3Hz
    2.    227.6Hz
    3.    Vout is settling at 4V (for case 1) or 1.2V (for case 2).
           Depending on the Vih/Vil characteristics of the MUX it might also oscillate at very high frequency.
       
    You can easily build the function of case 1 with a '555 timer:
        
        It provides 1/3 and 2/3 Ecc thresholds by its integrated voltage divider

  • First, be V(a)=a*Ecc and V(b)=b*Ecc. Suppose Vout=0 with C in discharging phase. In this condition, V+=V(a) and when Vc (voltage across the capacitor) gets to a value just below V+=V(a), Vout goes high at Ecc level (because V+>V-). Now V+=V(b) and C starts charging trying to reach the Ecc voltage level. However, as soon as Vc gets equal to the threshold V+=V(b), Vout gets back to 0. The cycle is then repeated. So we have a square wave generator with the capacitor charging and discharging between V(a) and V(b).

    Let's calculate the time Tc needed by capacitor to charge from V(a) to V(b) and the time Td the capacitor takes to discharge from V(b) to V(a). That will enable the frequency calculation. The equation is:

    Vc= V(a) + Ecc * (1- e-t/RC ), so:  V(b)=V(a)+Ecc*(1- e-Tc/RC )

    a bit of algebra leads to: 

    Tc= -0.001 * ln (1-b+a)

    Similarly, we can calculate the time Td needed by capacitor to discharge from V(b) to V(a):

    Vc=V(b)* e-t/RC  , so: V(a)=V(b) * e-Td/RC 

    Td=-0.001*ln(a/b)

    T=Tc+Td= -0.001(ln(1-b+a) + ln(a/b))

    Now we can answer to question 1 by putting a=1/3 and b=2/3 in the equation and to question 2 by putting a=1/10 and b=9/10. You get:

    Answer 1. f=1/T=910Hz

    Answer 2. f=321Hz

    Answer 3. If you swap the MUX inputs the circuit doesn't oscillate anymore. 

  • (1)
    Va=4, Vb=8
    Vout exponentially cycles from 4 volts to 8 volts
    Increasing to 8: Vout = 4+8[1-e^(-t/RC)] = tr = 693uS
    Decreasing to 4: Vout = 8e^(-t/RC) = tf = 693uS
    freq = 1/(tr+tf) = 721.5Hz

    (2)
    Va=1.2, Vb=10.8
    Vout exponentially cycles from 1.2 volts to 10.8 volts
    Increasing to 10.8: Vout = 1.2+10.8[1-e^(-t/RC)] = tr = 2.197mS
    Decreasing to 1.2: Vout = 10.8e^(-t/RC) = tf = 2.197mS
    freq = 1/(tr+tf) = 227.6Hz

    (3)
    S doesn't equal 1. It cycles from 12 to 0. The assumption is that when S is high (>=1), input b is selected by the mux and when S is 0, input a is selected. If this is reversed the circuit will not function as expected. It may oscillate at high frequency or latch-up.

    The circuit below was used to verify the above equations.

  • 1. 1233 Hz

    2. 4746 Hz

    3. 455 Hz

    I first calculated the voltages for a and b:

    I then calculated the time for a given charge and discharge voltage,

    I then summed the two half cycle times to get the period and took the reciprocal to get the frequency

  • I made a mistake in the first equation ("charging" equation) by using Ecc instead of V(b). Correct equation is V(b)= V(a)+V(b)*(1- e-Tc/RC ) (of course the capacitor cannot charge to [V(a)+Ecc] as the incorrect equation implied)

    In this way you get to the general equation for the oscillation period: T=Tc+Td=2*RC*ln(b/a)=0.002*ln(b/a). And then you get the correct frequency values:

    1. f= 721.3Hz

    2. f= 227.6Hz

  • 1) Starting from when Vout flips from high to low, the RC has charged up to 2/3 of Ecc, then follows exponential discharge, Vfb = 2/3 * e^(-t/rc). Solving for t as a function of Vfb,  t = r*c*ln(2/(3*Vfb))

    t=r\times c\times\text{ln}\lparen\frac{2}{3\times\text{Vfb}})

    Then plugging in 1/3 for Vfb, 10Kohm for r, and 100nF for c gives 0.693ms for t, which is 1/2 cycle. By symmetry, it takes same amount of time for Vfb to charge back up to 2/3, final frequency is about 1/(2*0.693ms) = 721 Hz.

    To see how close I could get to ideal, I put together this in LTSpice, and it ran at 713 Hz, only about 1.1% off from the ideal. Not too bad.

  • Let's call the two voltages Va and Vb. Let's start from the condition where the capacitor is at Va (the lower voltage) and S = 1, so Vb on the opamp positive terminal. In this case, the opamp is in positive saturation and Vout = Ecc. The capacitor will charge with the classical law of resistive charging at a fixed voltage, i. e. V(t) = Vstop - (Vstart - Vstop) exp(-t/RC), where Vstart = Ecc/3 and Vstop = Ecc; this goes on until Tswitch1 such that V(Tswitch1) = Vb = 2Ecc/3; therefore Vstop - (Vstart - Vstop) exp(-Tswitch1/RC) = 2Ecc/3; Ecc/3 exp(-Tswitch1/RC) = 2Ecc/3; exp(Tswitch1/RC) = 2; Tswitch1 = RC log 2; for the opposite cycle the situation is symmetric, therefore the period T is 2 RC log 2; RC = 1 ms and T = 2 log 2 ms. In the second case, Vstop - (Vstart - Vstop) exp (-Tswitch2/RC) = 9Ecc/10; 9Ecc/10 exp (-Tswitch2/RC) = 9Ecc/10; the period is the same.

    Inverting the sense of S the circuit becomes unstable and switches at a frequency determined by the propagation delay.

  • My mistake, in the second case: Ecc/10 exp(-Tswitch2/RC) = 9Ecc/10; exp(-Tswitch2/RC) = 9; Tswitch2 = RC log 9 and T = 2 log 9 ms.

  • 720hz, 220hz, settle at b or frequency goes to infinity

  • 1) 721,35 Hz

    2) 227,56 Hz

    3) After switching on one pulse appears at the output. Afterwards, the output remains at 0 V.

    ----

    Charging mode: Vb - Va = (Ecc - Va) * ( 1 - e^(- t / R / C ) )

      >>> tc = - R * C * ln( (Ecc - Vb ) / ( Ecc - Va ) )

    Va is the minimum voltage over C (C will never discharge to zero). The voltage over C oscillates between Va and Vb.

    Discharging mode: Va = Vb * e^( - t / R / C )

      >>> td = - R * C * ln( Va / Vb )

    T = tc + td = - R * C * ( ln( (Ecc - Vb ) / ( Ecc - Va ) ) + ln( Va / Vb ) )

    f = 1 / T

    1) T = - R * C * ( ln( 1 / 2 ) + ln( 1 / 2 ) )

      >>> 1,38629 * 10^-3 s => 721,35 Hz

    2) T = - R * C * ( ln( 0,1 / 0,9 ) + ln( 0,1 / 0,9 ) )

      >>> 4,394449 * 10^-3 s => 227,56 Hz