function generator (varying frequency)

Wendy

Joined Mar 24, 2008
23,415
OK, R1 and C1 are the main frequency controlling components. After that you are using integrators, which is cool, but they will not be the same amplitude for all frequencies. As frequency goes up amplitude will go down, dramatically. When I have more time I'll show you how I would do it.

For the record, the front stage (op amp 1) is a hysteresis oscillator, similar to my 555 Hysteretic Oscillator.
 

Thread Starter

endaya_walatch

Joined Sep 13, 2009
33
OK, R1 and C1 are the main frequency controlling components. After that you are using integrators, which is cool, but they will not be the same amplitude for all frequencies. As frequency goes up amplitude will go down, dramatically. When I have more time I'll show you how I would do it.

For the record, the front stage (op amp 1) is a hysteresis oscillator, similar to my 555 Hysteretic Oscillator.
thanks for the reply... can i change my first op-amp with the 555 Hysteretic Oscillator that you used?? can i change the R1 with a potentiometer??
 

Wendy

Joined Mar 24, 2008
23,415
You can change R1 with a pot. If you put a 10KΩ in series with the 100KΩ you will cover a decade, and if you change the capacitor you can vary the range.

Intigrators are basically low pass filters, there are good reasons you don't want to use them.

A 555 can replace the inverting Schmitt Trigger you made for op amp 1, but there is a better way.

Pay very close attention to the original 555 Function Generator thread, and you can see how my design evolved. Basically I put ideas up, and people knocked them down (for which I was grateful). I learned from it.

This works, it can be optimized, but it works.



If you were to replace the 47KΩ resistor with a pot and a resistor 1/10 the value it would vary a full decade, replace the capacitor by multiples of 10 and you have range. I used a diode shaping circuit to appoximate a sine wave later on.



Try the 1st schematic, and use the diode shaper from the second. You might get what you want.
 

Wendy

Joined Mar 24, 2008
23,415
I'm thinking of redrawing it to simplify a bit, so stay tuned. I may even post it on this thread first.


***********

This is what I was thinking about.



F ≈ 0.7 (R3+R4) C1

R6 adjusts the sine wave waveform. It can be very good, but will never be perfect.

If the 9V is floating, and with a battery there is no reason it shouldn't be floating, the output will appear to be true AC.

The square wave will be better with a CMOS 555, though the frequency won't be quite as predictable (but it will be stable).

I'm using the 555 output because it is the fastest component in this circuit, and the edges will be much crisper.
 
Last edited:

Thread Starter

endaya_walatch

Joined Sep 13, 2009
33
I try the 2nd schematic that you gave me but i always have an output of a dc?? also,, i'm a little bit confused with the separate Vcc and the dc voltage parallel with a capacitor??

what are the values of the 2 diodes that you used for diode shaping?? thanks..
 

bountyhunter

Joined Sep 7, 2009
2,512
hi.. this is the schematic that i used.. i don't know how and where to add the components for varying frequency....
please help me..
thanks...
If you want an easy way to build a variable frequency function generator, the Exar chip XR-2206 will do it easily. My benchtop generator uses that and generates sine and triangle waves from about 20 Hz up to about 100kHz. Easy to vary both the amplitude and frequency with a turn pot.

http://pdf1.alldatasheet.com/datasheet-pdf/view/80496/EXAR/XR2206.html
 
Last edited:

Wendy

Joined Mar 24, 2008
23,415
The second schematic is flawed, I pulled it from archive to show the diode shaper. If you had read what I said I mentioned building the 1st circuit, and adding the diode shaper. But then, that is also why I reposted a revised schematic.

The heart of this schematic is a hysteresis oscillator, formed by U1, U2a, and U2b. U2d makes a split power supply from the 9V battery, and U2C is the diode shaper.
 

Thread Starter

endaya_walatch

Joined Sep 13, 2009
33
The second schematic is flawed, I pulled it from archive to show the diode shaper. If you had read what I said I mentioned building the 1st circuit, and adding the diode shaper. But then, that is also why I reposted a revised schematic.

The heart of this schematic is a hysteresis oscillator, formed by U1, U2a, and U2b. U2d makes a split power supply from the 9V battery, and U2C is the diode shaper.
the IC that you used for U2a,U2b,U2c and U2d is LM324 right??

how about the diode shaper?? what diode is that?? thanks again..

i owe you a lot..
 

Thread Starter

endaya_walatch

Joined Sep 13, 2009
33

Wendy

Joined Mar 24, 2008
23,415
Any general purpose diode will work, such as a 1N4454 or a 1N914, or whatever you have handy as long as their similar to each other.

If you look at the oscope pictures you'll note a little crossover distortion with a LM324. Still, the op amp is common and cheap, a good one to start with. I'm looking for a better IC long term, though I'll probably use the LM324 in a article when I write this schematic up.
 

Audioguru

Joined Dec 20, 2007
11,248
The LM324 quad opamp has poor high frequency response (to only 2kHz) in addition to its crossover distortion.

Why not use a real opamp that has a response to 100kHz and no crossover distortion? They cost almost the same.
 
Last edited by a moderator:

Wendy

Joined Mar 24, 2008
23,415
But are they available locally? I notice you didn't recommend a number. Remember, a lot of our folks are overseas. I don't know where the OP is from.
 

Audioguru

Joined Dec 20, 2007
11,248
Don't use a LM324 quad opamp. It is noisy, has crossover distortion and has trouble above only 2kHz.
A TL071 single, TL072 dual and TL074 quad are low noise, have very low distortion and work well up to 100kHz. They are also inexpensive.
 
Last edited by a moderator:
Top