WWW Learningaboutelectronics Com Articles Function Generator
WWW Learningaboutelectronics Com Articles Function Generator
Search
In this circuit, we will show how to build a function generator circuit using an LM324 operational amplifier chip.
A function generator is a electronic device that can produce a variety of different waveforms. The one we will build can output square
triangle, or sine waveforms. Like standard function generators, the circuit allows for frequency adjustment; we get ours through a
potentiometer. The circuit can also easily allow for amplitude adjustment.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The circuit works on the principle of just using op amps.
In this circuit, the first op amp produces a square wave. After that, the circuit uses 2 integrator circuits to convert the square wave into
triangle and sine wave signals.
Components
The LM324 is a quad operational amplifier IC that we use to build this integrator op amp circuit.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The LM324 is an 14-pin chip.
The datasheet for the LM324 chip can be found at the following link: LM324 Datasheet.
In order to know how to build this circuit, you must know the pinout of an LM324, in order to connect the pins properly. Below is the
pinout of the LM324 op amp chip.
Pin 4 is the positive voltage power supply, VCC. To this pin, we connect the positive voltage. This establishes the positive DC voltage
rail for the circuit.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Pin 11, labeled GND, is the negative voltage power supply. To this pin, we connect the negative voltage. This establishes the negative
DC voltage rail for the circuit.
Through these 2 pins, we establish the positive and negative DC rails from the AC signal can swing.
All of the other 12 pins of the LM324 are the inputs or output of each of the operational amplifiers.
There are 4 operational amplifiers within the chip. Each op amp has 2 inputs and 1 output.
The 2 inputs for each op amp are labeled IN- or IN+. The IN- pin refers to the inverting terminal of the op amp. The IN+ pin refers to
the noninverting terminal of the op amp. The OUT terminal refers to the output of the op ap.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The breadboard circuit of the above circuit is shown below.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
So above is the function generator chip we will build.
As explained above, the LM324 is powered by DC voltage through pins 4 and 11.
We feed anywhere from 5 to 15V into pin 4, VCC, and we feed anywhere from -5V to -15V to pin 11, GND.
So we have our first op amp. This op amp produces a square waveform. The 100KΩ potentiometer allows us to vary the frequency to
the circuit. And it's the way of adjusting the frequency of the output signal.
So after the first op amp, we have a square waveform. What follows next is an integrator circuit. When you feed a square waveform
into an integrator circuit, the output is a triangle waveform.
So after the second op amp, we now have a triangle waveform, as our second waveform.
We then feed this triangle waveform into another integrator circuit. When you feed a triangle waveform into an integrator circuit, the
output is a sine waveform.
So after the third op amp, we have a sine waveform. This is our third waveform.
So this circuit is pretty basic. The first op amp produces a square wave. We feed this square wave into an integrator circuit, which
outputs a triangle wave. We then feed this triangle wave into a second integrator circuit, which outputs a sine wave.
The 100KΩ potentiometer allows for a pretty good wide range of frequencies so that the circuit offers good frequency adjustment, as
a standard function generator would.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
The circuit also can easily allow for amplitude adjustment. If you're using a DC power supply to power this circuit, then all you have to
do is adjust the voltage on the DC power supply to change the amplitude of the signal. If you're powering the circuit through batteries
then you'll need add the number of batteries you would need to get the maximum voltage you want and then you add a small-valued
potentiometer, such as 200Ω-500Ω, to allow for voltage adjustment.
And this is how a function generator circuit can be built with an LM324 op amp chip.
The function generator is pretty solid for all basic purposes, such as home use. The signals produced can be of very high quality.
To see how this circuit operates in real life, see the video below.
Related Resources
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
How to Build a Voltage Gain Op Amp Circuit
Comments
Name
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
I tried this circuit in Ltspice and the waveform i was getting from the second op-amp's output was was practically a square. the edges were sloped
ever so slightly but i certainly would not call it a triangle. I assumed that the integrator capacitor labelled at 33nF above the 2nd op-amp should in
fact be 33uF (perhaps a minor typo in the diagram). so I changed it and now i'm getting a perfect triangle.
Thank you very much for you help by the way... other than that small typo this article has been very helpful.
Much appreciated
Like · Flag
3
Greyess · June 9, 2021
What is the frequency rate?
Like · Flag
1
Anonymous · Dec 26, 2020
i did the circuit on proteus but i can not put Vcc .....can you tell me how to do it ?
Like · Flag
3
Muhammad Hannan Khan · Dec 7, 2020
what changes we need to make if we want to make it variable frequency generator
Like · Flag
Like · Flag
1
Anonymous · Nov 13, 2020
is it possible to change the pulse width?
Like · Flag
1
Anonymous · Sept 18, 2020
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Using batteries, potential dividers of two equal resistors must be applied to provide a reference voltage equal to half the supply voltage to provide
the mid-point signal reference that would be the 'ground' equivalent in the bench power supply case. With the triangle and sine generators, the
resistors connected between the '+' input to ground I will remove, and then connect each '+' input to the mid-point of the appropriate potential
divider. Each individual divider resistor I have calculated to be equal to twice the parallel resistance combination of those resistors connected to the
respective '-' inputs for bias balancing (twice because two resistors in divider chain). As for the square wave section, what divider resistor values did
you come up with?
Like · Flag
1
Pvc · June 22, 2020
Can you use lm324n or just lm324?
Like · Flag
Like · Flag
2
me · Mar 21, 2020
I don't understand why the outputs only have one wire? Do they need to be connected to ground?
Like · Flag
Showing 1 to 10
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Home | Articles | Projects | Programming | Calculators | Contact
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD