I have designed a relaxation oscillator with an opamp. It is supposed to oscillated at 50Hz, but it doesn't. I haven't built a physical circuit, I'm trying to simulate it in CircuitLab.

I calculated the oscillation frequency with the circuit element values in the schematic as

$$ f = \left( T_c + T_d \right)^{-1} = 50.17Hz. $$

Where, \$T_c\$ and \$T_d\$ are charging and discharging times of the capacitor respectively;

$$ T_c = RC \ln \left( \dfrac{(+12V) - \dfrac{R_2}{R_1 + R_2} (-12V)}{(+12V) - \dfrac{R_2}{R_1 + R_2} (+12V)} \right) = 9.97ms, \\ T_d = RC \ln \left( \dfrac{\dfrac{R_2}{R_1 + R_2} (+12V) - (-12V)}{\dfrac{R_2}{R_1 + R_2} (-12V) - (-12V)} \right) = 9.97ms. $$

What am I doing wrong here?


simulate this circuit – Schematic created using CircuitLab

Without the \$R_i\$ resistor:
enter image description here

With the \$R_i\$ resistor:
enter image description here


Simulated oscillators usually don't start on their own, try setting an initial condition to break the feedback loop during the bias point calculation. I can do this with the Pulsonix (SIMetrix) SPICE simulator by adding an initial condition with a value of zero, you should be able to do something similar with the simulator you are using - see the documentation.

|improve this answer|||||
  • \$\begingroup\$ Of course! The oscillators start with the ambient noise. I forgot that. Adding the \$R_i\$ resistor initiated the oscillations. Thanks. \$\endgroup\$ – hkBattousai Aug 6 '14 at 13:19
  • 3
    \$\begingroup\$ In this case, it isn't necessarily noise, but any tiny imbalance in the circuit. With ideal components, there's a metastable state in which the input and the output of the opamp equal exactly zero. The simulator can find this state, but it can't occur in a real circuit. \$\endgroup\$ – Dave Tweed Aug 6 '14 at 13:28
  • \$\begingroup\$ One can even show that it is NEVER noise which starts oscillation. This also applies to linear (harmonic) oscillators. Noise would be the cause of oscillation start only in case there is no power switch-on transient. However, in real circuits (and in simulation with power-on switching at t=0) there will be always such a "starting aid". \$\endgroup\$ – LvW Aug 6 '14 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.