I've been trying to design a relaxation oscillator using a TL074 op-amp:


simulate this circuit – Schematic created using CircuitLab

For an ideal op-amp this should produce a square wave with frequency

$$ f = \frac{1}{2\ln(3)100\cdot 10^{-12}\cdot 200000} \approx 22.7kHz $$

When I run this on LTspice using TI's spice model I get a square wave with a 20.5kHz frequency.

My question is, how do I approach picking the correct capacitor/resistor values when taking into account the real world characteristics of TL074 such that the circuit achieves a 22kHz frequency?

  • \$\begingroup\$ How accurate are your resistor and capacitor values, by the way? \$\endgroup\$
    – Ian Bland
    Commented Nov 8, 2016 at 22:41
  • \$\begingroup\$ I don't know if LTspice has a correct model of the TL074. If it doesn't, look at the maximum voltage swing that the chip can produce. \$\endgroup\$ Commented Nov 8, 2016 at 22:44
  • \$\begingroup\$ I guess the lower frequency is caused by non-symmetry of the output voltage. This problem can be avoided by connecting R2 to ground via some large cap (gut feeling: 10μF) \$\endgroup\$ Commented Nov 8, 2016 at 22:44
  • \$\begingroup\$ @MichaelKarcher This is interesting. What is the reason behind the asymmetry of the output voltage and how does the capacitor help in balancing it? \$\endgroup\$
    – Veritas
    Commented Nov 9, 2016 at 23:55
  • \$\begingroup\$ The TL074 datasheet shows a symmetric buffer stage, but the precising amplifier stage is asymmetric. This can cause the max positive output voltage to be different in magnitude from the max negative output voltage. The timing formula you gave is only exact if R2 is connected to the avg output voltage. A capacitor would slowly charge to that average voltage. But I vastly overestimated the effect of the potential asymmetry, see my comments on the answer. \$\endgroup\$ Commented Nov 10, 2016 at 8:00

1 Answer 1


An ideal opamp swings the output in zero time, the TL074 takes a finite time to slew, and this extra time is added to the period, resulting in a lower output frequency.

Unfortunately the amplifier doesn't specify an exact slew rate, only a typical, so any correction for this effect will not be exact. But a nominal correction will be better than nothing.

You could improve the slew rate a bit by increasing the input overdrive by putting a small capacitor in parallel with R3, that 100k resistor will charge up the input terminal quite slowly, wasting another fraction of a uS. You would want a time constant of only a few uS with 100k, only 10pF or so, as it should have settled by the end of the half cycle so the DC level is correct for triggering the other half cycle.

An ideal opamp also swings rail to rail, where the TL074 does not. This does not matter, as the output voltage drives both the RC time constant and the R2/R3 comparison voltage, so the exact output voltage cancels out.

  • \$\begingroup\$ Of course! I forgot to take the slew rate into account! Thanks for the insight. \$\endgroup\$
    – Veritas
    Commented Nov 8, 2016 at 23:30
  • \$\begingroup\$ Cancellation of the limited swing only works if the negative and the positive output have the same magnitude. Take the extreme case of +3V/0V as exaggregated example. The discharge would never complete. \$\endgroup\$ Commented Nov 8, 2016 at 23:38
  • \$\begingroup\$ @MichaelKarcher I'm inclined to treat your contribution seriously, as this site is filled with noobs trying to run 741s at 5v rail, which will have their outputs doing just what you say. However, I think we can agree that a tl074 with a 12v rail that doesn't get above mid rail is a broken or shorted tl074. \$\endgroup\$
    – Neil_UK
    Commented Nov 9, 2016 at 1:24
  • \$\begingroup\$ @Neil_UK of course a TL074 at +/-6V is able to get below 0V. That's why I said the example is exaggregated. The effect that one half of the cycle is slowed down and thr other half is sped up, with the slow-down being greater in magnitude than the speed up already happens at lower asymmetries, like +4.5/-4.0 V. The positive cycle from -2 to +2.25 at 4.5 V takes \$ln(2.889)RC$, the negative cycle takes $ln(3.125)RC$. The effect is in fact an increase of the period, but I overestimated the effect: These values just cause a \$0.1%\$ slow-down. \$\endgroup\$ Commented Nov 9, 2016 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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