Function generator circuit

Probably in some electronic circuits you need a function generator circuit that can produce a square , sinus or triangle wave . In this case you will need a specialized function generator circuit that will generate all needed wave forms , or you can use this simple function generator circuit that use common operational amplifiers to generate various wave forms .
This simple function generator uses four operational amplifiers (opamps) to deliver these waveforms ( sinus , triangle and square ) in the 6 Hz to 7000 Hz range.
Square, sine and triangle waves are produced using an LM348 and passive components. The LM348 is a quad operational amplifier IC package; that contains four separate opamps all in the one package. They are marked A, B, C & D in the schematic diagram.

To provide square wave at output one operational amplifier (LM348:D) is used. The voltage level to pin 13 is set by the resistor divider pair R1 and R2. The input to pin 12 depends on two things; firstly the potential of pin 14, and secondly, the voltage output of opamp C at pin 8. When the input at pin 13 is higher than the input at pin 12 the output goes low. If it is lower then the output goes high. Switching back and forth between the two states causes a square wave to be produced. The time constant (R4+R5)C2 determines the frequency.
To provide triangle wave opamp C is set up as an integrator. It performs the mathematical operation of integration with respect to time. For a constant input the output is a constant multiplied by the elapsed time, that is, the output is a ramp. Since the input signal goes to the inverting input, a high input will produce a ramp down and a low input will produce a ramp up. The input signal is a square wave symmetrical about the midpoint potential. The current this potential produces through R4 and R5 is constant so the up and down ramps are of equal gradient and the resultant triangular wave is symmetrical. Any increase in the trimpot R5 reduces the current and the integration constant which lowers the gradient of the ramp.

The switching levels have not changed so the frequency reduces while the amplitude remains constant. In a similar way the current depends on the value of integration capacitor. Accordingly the integration constant and hence the frequency vary with the value of the capacitor.
The output triangle wave does not require amplification but it does require buffering so that that loading does not affect the waveform generator circuit. It is buffered here with opamp A connected as a unity gain buffer. Unity gain is achieved by directly coupling back the output to the inverting input.
Sine wave is produced by a wave shaping circuit. Two diodes have been joined together as a series pair in order to provide a higher amplitude than would be obtained using only a single diode.

The shape of the pseudo sine wave could be improved at any particular frequency by filtering, but filtering will cause distortion at lower frequencies and loss of amplitude at higher frequencies. You can have perfect sine waves at particular frequencies by switching in appropriate filters at those frequencies.
The sine wave is sensitive to loading and must be buffered. It is also low in amplitude and needs amplification. R9 & R10 set the gain of opamp B by forming a voltage divider between the source and the output.
If can not find this type of operational amplifier you can use a similar type .
function generator circuit diagram