# Why doesn't my opamp relaxation oscillator oscillate?

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:

With the $R_i$ resistor:

-

## 1 Answer

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.

-
Of course! The oscillators start with the ambient noise. I forgot that. Adding the $R_i$ resistor initiated the oscillations. Thanks. – hkBattousai Aug 6 '14 at 13:19
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. – Dave Tweed Aug 6 '14 at 13:28
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". – LvW Aug 6 '14 at 14:03