Introduction: THE SIMPLEST FUNCTION GENERATOR BUILT ON a BREADBOARD

A function generator is one among the necessary gadgets of an electronic hobbyist. It is very useful in producing  audio signals and even in inverter circuits. Since it is not affordable for hobbyists, I decided to make one myself with easily available and cheaper components.
I chose LM324 to generate various waveforms. It is a quad operational amplifier IC. It just needs a bunch of resistors and capacitors to build the entire circuit. It could be assembled in just 15 minutes in a bread board. I was able to produce square, triangle and sine wave with this.

Step 1: Step 1: Parts List

1. Bread Board --1x
2. LM324 --1x
3. 100K POT --1x
4. 10K (1/4 W) --7x
5. 100K(1/4W) --3x
6. 0.1uF – 2x
7. 0.01uF –1x
8. Battery --1x
9. Wires.

Step 2: Step 2: Schematic

LM324 consists of 4 operational amplifiers. All the four op-amps are used to generate square, triangular and sine wave.

First op-amp is used to produce a square wave and it shaped into triangle wave by integrating it with second op-amp. The second op-amp is an integrator circuit.

The third and fourth op-amps are the wave shaping circuits which are used to remove the sharp edges of the triangle wave and shape it to a sine wave.

Step 3: Step 3: STAGE 1:

Stage 1 is a simple op-amp square wave generator wired as astable multivibrator. It is used just as a comparator. A fraction of output is fed back to the non-inverting(+) terminal as reference voltage. The capacitor C can charge through the trim pot R.

When the output is high, the capacitor C starts charging and once if the voltage across the capacitor reaches the reference voltage, the output is driven to negative region.

The capacitor now charges with negative polarity and once it reaches reference voltage, the output is driven to positive region.

This cycle continues and a square wave is obtained as output.

The frequency of this oscillation is given by    F= 1/(2RC).

Therefore, by varying the trim pot R the frequency can be changed.

Step 4: Step 4: STAGE 2:

The stage 2 comprises of an integrator made of op-amp.
When a square wave is provided to an integrator, the square wave is converted into a triangular wave with no change in frequency.

Therefore a triangle wave is obtained as output at the end of second stage.

We have to make sure that R5 is at least ten times higher than R3.

Step 5: Step 5: STAGE 3

The stage 3 is a wave shaper stage consisting of two op-amps.
This stage is used to remove the sharp edges in the triangle wave and to make it a sine wave.
Thus the output of entire circuit is a sine wave.
The frequency of all the three waves are identical and can be varied by varying the trim pot R.

Step 6: Step 6: Breadboard Assembly

Assemble each component in the breadboard as per the circuit diagram.
If you decide to use this circuit for future use, it is better to assemble in a dot board or in a PCB.
The output may not be a pure waveform. It might have some disturbances but it is not bad when comparing the cost of buying a new one.

I hope you find it easy to understand and useful. Since the entire setup costs less than 1$(excluding bread board and battery), it is worth to give a try.

Good luck....

Comments

author
AndreaD20 (author)2017-06-15

Hi, thanks your your instructable. Could you please include the gnd and power supply to the shematic? I don't know where these go

author
M-core (author)2017-06-14

Hi, can I replace LM324 with LT1079CN? What should I take into account? Thx!

author
UchennaN (author)2016-10-11

Please Help. How do I make the connecting interface to connect the board to an oscilloscope?

author
mbmast (author)2016-07-09

This link https://www.efxkits.us/square-wave-generator-circuit-using-op-amp/ describes a nearly identical project and contains a more detailed schematic. I've included that schematic here, in case the link goes bad in the future. It refers to the LM1458 op amp, but I suspect than the LM324 can also be used. The LM324 is getting on in years now and there are better ones, but one of the advantages of the LM324 is that it's cheap and can be powered by a single source. I've been using the MC34074AP as a plug-in replacement for the LM324 and have been very happy with it.

6[1].jpg
author
JesseM74 (author)2016-05-11

From the LM324 Datasheet, Page 17, Figure 27:
TI shows a square wave oscillator without the pot. In their schematic they show a resistor to the + pin (3,5,10,12 on LM324) from a v+ source. As soon as I connected v+ in this way stage 1 worked like a champ!
The reference resistors from TI schematic are 100k.

I've only got stage 1 working right now, but going to make the other stages next.

author
VendettaNL (author)2016-05-03

Can i also run this from a 24Vdc power supply ?

author
handymandavebritain (author)2016-04-22

Builders can use a small Radio loudspeaker or Earphone to hear the Signals, if you want to view them obviously you need to look for an Oscilloscope or an i pad App and adapter.

author
Abed417 (author)2016-04-19

Can you please show me the setup of stage 1 alone. The other sections are working, but stage 1 isn't.

author
Abed417 (author)Abed4172016-04-19

One more thing, how do u connect the battery??

author
y_aji (author)2016-02-25

What's the purpose of R6 on step 5: stage 3?

author
rahul540 (author)2015-11-25

I cant understand how to connect your circuit . This step 1 is what??

author
pawan g (author)2015-10-28

Thanks skpVignesh...I used your explanation to understand each block..

author
muneera1 (author)2015-09-18

thanks

author
ketaniyengar (author)2015-08-31

i have made the function generator!!!. its working, but the problem is how shall i check the waveform i dont have a cro or dso at home. please suggest something as i am only able to view the value of quantities varying in my dmm how do i know whether its a sine wave or triangular or square ????

author
NikolaiK2 (author)2015-08-17

I too couldn't make the first stage to work. The first schematic of an LM324-based astable multivibrator from this article worked, though: http://www.learnabout-electronics.org/Oscillators/osc42.php

author
pdavis19 (author)2015-05-22

Doesn't work per the schematic. Can't even get the Stage 1 working. Tried a bunch of changes. Tried rebuilding it from scratch. Tried basing it on the photo of protoboard later in the steps (which is clearly different from the schematic), but couldn't be sure about some of those connections. One thing definitely missing is the ground connection. It appears, based on the photo that pins 3, 5 and 10 are connected to ground via the 10K resistors, pin 12 is direct to ground. But based on the photo it doesn't look like pin 2 goes to ground via the cap, but based on the schematic, if those other 4 go to ground, so should pin 2, via the cap. So something's not right.

author
iLjaco1355 (author)2015-01-09

hey could you tell me what is the range of frequency it works? Actually I don't know if I'm right, according to the equation it should be from 500Hz to aprox 5MHz.

author
holgerm.murk (author)2015-01-09

The last opamp lookslike an unity gain buffer, or has it some other function that the 2nd integrator is not doing? I am going to build one with a 555 and 2x741. Maybe a third one as output buffer/amplifier.

author
imoree (author)2014-04-21

Hello; i have one question. Is this two power supply's or just single as it is not on the schematic.

thanks

author
skpvignesh (author)imoree2014-04-27

Hi., The LM324 is capable of operating on Single supply (3V to 32V) as well as dual supplies (±1.5V to ±16V). So don't worry about the power supply.

And sorry for the late reply..

author
imoree (author)skpvignesh2014-04-29

thanks for that, but this circuit doesnt work for me. I have tried various ways, but no luck. could just be me..

author
skpvignesh (author)imoree2014-05-03

I have practically tested this circuit and it worked for me. First check the stage1. If it works, then the rest of the circuit will work..

author
imoree (author)skpvignesh2014-05-07

Well after much research; here is what i came up with to get this working.

C1 - Goes to positive rail

C2 - for me i had to use a 30uF tantalum to work and get a nicer triangle waveform

Cnxs:R2, R4, R7 and pin12 are on a voltage divider network consisting of
R1 & R2 ;
plug in one side of 10k to positive rail and another to negative rail then where these two ends of resistor meets gives us v/2 ; eg. 9v /2 = 4.5v which is then
then connect the feedback circuits to pins 3,5,10 and 12.

after all that was done; works beautifully; of course after studying opamps and general feedback oscillation for about three days; i was able to figure this out

author
lindonboy.oculam (author)imoree2014-10-31

what software or simulator did you used when doing the simulation?. Is it ok to use multisim?

author
zeeshank (author)2014-10-16

i made this circuit 2 weeks ago in my lab

author
bartgrefte (author)2014-09-20

I just made this circuit in Multisim, but can't get it to work, not even stage 1 of the circuit will function...

author
Eisad (author)2014-03-03

i must say great function gen

author
skpvignesh (author)Eisad2014-03-03

thank you..

About This Instructable

127,206views

109favorites

License:

More by skpvignesh:THE SIMPLEST FUNCTION GENERATOR BUILT ON A BREADBOARD
Add instructable to: