I am trying to make my own function generator.

I will make it with adjustable frequency and peak voltage but for test reasons I'm simulating a constant frequency one.

My output has distortion which I believe is due to UA741's poor slew rate.

How can I fix that and get a more precise output?

I'm using +12/-12 Volts power supplies. I'm using a Wien bridge oscillator (WBO) to generate the sine wave. There's a filter to get the square and filter it twice to get the triangle wave.

I know using a 555 timer to create square-triangle-sine waves would be easier but as far as I know Wien bridge oscillator creates a very clean sine wave.

Also I want to go with the WBO for educational purposes. The output of WBO is about 750mV/-750mV peak so I used another amp to amplify the sine wave.

The output of the first amp is the yellow trace, the second is blue, the third is pink, and node after R8 is green.

Distortions are clearly visible in third picture, although I think my sine wave is pretty clean.

I want to change the op-amp but can't find a good substitute which also works in simulation. Are there any other improvements you can suggest?

Can I get a sine wave with bigger peak voltage wihtout using the second amplifier?

I don't have a scope so I adjust the frequency about 15 Hz and connect an LED to output to see if there a oscillation or not.

Circuitscope graphClose up scope graph

  • 3
    \$\begingroup\$ I am sure somebody will have the time to stop by and write a proper answer, but please do not use UA741 unless you plan on mass production, and you already have a stock for some reasons. It was very popular, decades ago. Nowadays you have much, much better option for a very small price. \$\endgroup\$ Commented Apr 23, 2021 at 11:31
  • \$\begingroup\$ which distortions are you talking about ? The waveforms look quite clean, I guess ? \$\endgroup\$
    – tobalt
    Commented Apr 23, 2021 at 11:35
  • \$\begingroup\$ @VladimirCravero Im actually looking for a replacement, any suggestions? \$\endgroup\$
    – Tombeki
    Commented Apr 23, 2021 at 12:28
  • \$\begingroup\$ @tobalt there is a slope at the square wave \$\endgroup\$
    – Tombeki
    Commented Apr 23, 2021 at 12:28
  • \$\begingroup\$ OP, we normally do not suggest any specific part number here, as those kind of suggestions can get pretty old & irrelevant, pretty quickly. On this board you can get help as how to fix your circuit, and what specs to consider when picking an opamp. \$\endgroup\$ Commented Apr 23, 2021 at 14:48

1 Answer 1


I suppose you are talking about the following distortions:

  1. The visible slope in the rectangular waveform
  2. the plateau in the triangular waveforms (this is a result of 1.)

As you provide no voltage scale to you plots, it is hard to say if the slew rate of the 741 is the problem.


  • You can remove C3 from the circuit. That way you will force U3 to use its maximum slewrate.
  • If that is not enough use another Opamp with a larger slewrate.
  • \$\begingroup\$ I could not find any way to provide voltage scale in my plot, Im quite new at this. Do you have any replacement suggestions for OpAmp? \$\endgroup\$
    – Tombeki
    Commented Apr 23, 2021 at 12:26
  • \$\begingroup\$ My general purpose opamp is the OPA1678 nowadays unless for extremely cost sensitive stuff. It's still sub 1€. And has a slewrate of 9V/us. The 741 or LM358 have 0.5V/us \$\endgroup\$
    – tobalt
    Commented Apr 23, 2021 at 13:03
  • \$\begingroup\$ what about TL071? \$\endgroup\$
    – Tombeki
    Commented Apr 23, 2021 at 13:05
  • \$\begingroup\$ Yep, much better. Anything is much better than the 741 ;-) \$\endgroup\$
    – tobalt
    Commented Apr 23, 2021 at 13:06
  • \$\begingroup\$ ok thanks. TL071 fixed the slope at square wave but the plateau is still there. \$\endgroup\$
    – Tombeki
    Commented Apr 23, 2021 at 13:07

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.