Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 10 down vote accepted

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.

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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