Help with old function generator

Thread Starter

Narrin

Joined Oct 2, 2011
47
This is a function generator that you guys helped me with in 2011. It was Bill's design that I tweaked with.
I have started back trying get rid of some of the problems as well as optimize the design.


Final model.png
In the design above I use R3 to vary the frequency and R9 to vary the amplitude of the waveforms. I find that the frequency and amplitude changes are not linear at all. Is there any other way or by addition of circuitry I can achieve frequency and amplitude variation?

Also I have no been able to reduce the "tits" in the waveforms.
Tri at 2kHz.jpg

I have tried changing the RC constant of U2A by increasing the input resistor and lowering the capacitor but that didn't help either.
 

bertus

Joined Apr 5, 2008
22,270
Hello,

Are C2 and C3 the only decoupling capacitors?
If so where are they located at the circuit physicaly?
You will need a 10 μF and a 0.1 μF close the powerpins of each 555.
Also a 0.1 μF capacitor at the powerpins of the 324 shoeld be needed.

See this thread for more info about decoupling capacitors:
Decoupling or Bypass Capacitors, Why?

Bertus
 

Ron H

Joined Apr 14, 2005
7,063
The tits are caused by blowby through the integrating capacitor. The op amp has relatively low bandwidth (causing slow response to fast edges), so when the fast current edges go through the cap, they encounter the open loop output impedance of the op amp, resulting in a tit. This could be reduced ( factor of 5) by changing the pot to 1Meg, R4 to 5k, and C1 to 20nF. This might, however, make your duty cycle even worse.
I suspect your duty cycle is bad because you are using bipolar 555s. It is important to use CMOS 555s (at least for U2), because their outputs swing rail-to-rail. The bipolar 555 output swings from GND to ≈1.4V below vcc.
You said that the pot setting vs frequency nonlinearity got even worse when you used a log pot. Try connecting R4 to the other end of the pot. It should make a big difference.
I can show you how to change the circuit to get (theoretically) linear frequency vs pot rotation, but I'm not sure you will like the results.
 

crutschow

Joined Mar 14, 2008
34,285
.......................
You said that the pot setting vs frequency nonlinearity got even worse when you used a log pot. Try connecting R4 to the other end of the pot. It should make a big difference.
.........................
Won't that make the parameter decrease with CW rotation rather than increase? :confused:

To convert a linear pot into a quasi-log (non-linear) pot you can connect a fixed resistor from one end of the pot to the wiper. The relative value of the resistor compared to the pot resistance determines the amount of non-linearity induced. You can experiment with values to see if that gives a better relationship between pot movement versus frequency.
 

Ron H

Joined Apr 14, 2005
7,063
Won't that make the parameter decrease with CW rotation rather than increase? :confused:
Hmmm... I guess you would need a reversing gear.
My bad.:(
To get linear frequency vs pot rotation, you can use a pot set up as a voltage attenuator at the output of the 555. The other end of the pot goes to virtual ground, probably with a low-value resistor in series to set the minimum frequency. R4 connects to the wiper. I would also change R4 to 33k and C1 to 1nF. This reduces the tits on the triangle, and minimizes linearity effects of pot resistance (if you use a low value, like 10k or less).
Resistor pulldowns are also needed on each op amp to eliminate the crossover distortion that LM324 is notorious for. Or, he could use something like MC34071.
I've been working on a schematic that also does what he wants with amplitude control. I guess I should finish it and post it.
 
Last edited:

Thread Starter

Narrin

Joined Oct 2, 2011
47
I am using CMOS 555's but somehow the duty cycle is not purely 50%. Changing R4 and C1 has reduced the "tits" on the triangular wave significantly though. Thanks.
I have to go source a MC34071 and see if it helps. I will try it in multisim for the while and see what it gives me.
 

Thread Starter

Narrin

Joined Oct 2, 2011
47
you can use a pot set up as a voltage attenuator at the output of the 555. The other end of the pot goes to virtual ground, probably with a low-value resistor in series to set the minimum frequency. R4 connects to the wiper.
It seems that connecting the pot this way didn't linearize the frequency vs pot rotation.
At lower amplitudes the tits stem from the square wave. Since the traingluar and sinusoidal waves are shaped from the square wave I'm guessing if the tits are removed from the square wave there shouldn't be a problem with the other two waves.
 
Top