Correction in Function Generator Simulation/Circuit

Thread Starter

em_cardc

Joined Apr 5, 2016
43
Good monring pals,

I worked (from scratch) on this function generator circuit to produce square, sine, and triangular waves.... For some strange reason, the only waves that I see are being properly produced is the sine wave. Can someone please guide me through what I can fix so that my simulations come out properly. Different frequencies were used in order to compare the waves but once I start increasing, the waves lose their properites. This is an example of such output. Attached are the circuit design and the simulation at 15.Sketch (7).png sim.jpg
 

Alec_t

Joined Sep 17, 2013
14,327
The main problem is use of the archaic 741. It has a low gain-bandwidth product so can't handle high frequencies. That leads to non-sharp edges. Also, the filter based on U3 has a fixed centre frequency (~54kHz), so works well over a limited frequency range only.
 

RichardO

Joined May 4, 2013
2,270
Expanding some on what Alec t said:

I will assume that for starters you want an audio frequency signal. That would be a top frequency of, say, 20 KHz.

To do this you need an op-amp that has gain at many times the highest frequency you want to generate. For instance, the integrator must have high gain at several times 20 KHz. I would guess that an op-amp with a gain-bandwidth product of 10 MHz is barely good enough. (A 741 only has a GBW of 1 MHz.).

An op-amp makes a poor voltage comparator. When the output stage saturates it can take a very long time to recover and come out of saturation. Voltage comparator IC's do not have this problem. Also, the comparator has to be much faster than the integrator otherwise you end up integrating the rise and fall times of the comparator output which rounds the peaks of the triangle wave.

You can not make a function generator that uses filtering at the output unless the filter tracks the frequency of the triangle wave. This is difficult to do. The sine wave is normally done by using a non-linear diode clipping circuit to convert the triangle into a sine wave.

When R8 is changed in value the amplitude of the triangle will also change. I don't think this is what you want. Better would be to put a fixed reistance at the input of the comparator and move the pot to the input of the integrator.

Note that you want a resistor in series with the pot to limit its adjustment range. If the pot setting ever goes to zero ohms in a real circuit funny things will happen.
 
Top