Help with old function generator

Discussion in 'The Projects Forum' started by Narrin, May 27, 2012.

  1. Narrin

    Thread Starter Member

    Oct 2, 2011
    47
    0
    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.
     
  2. scotty625

    New Member

    May 7, 2012
    1
    0
    Are R3 and R9 Log or Lin?
     
  3. Narrin

    Thread Starter Member

    Oct 2, 2011
    47
    0
    They are linear pots, I tried using Log pots instead but the effect was worse.
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    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
     
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    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.
     
  6. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    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.
     
  7. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    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: May 28, 2012
  8. Narrin

    Thread Starter Member

    Oct 2, 2011
    47
    0
    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.
     
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Duty cycle error is due mostly to op amp input bias current and input offset voltage.
     
  10. Narrin

    Thread Starter Member

    Oct 2, 2011
    47
    0
    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.
     
Loading...