function generator (varying frequency)

Discussion in 'The Projects Forum' started by endaya_walatch, Sep 16, 2009.

  1. endaya_walatch

    Thread Starter Member

    Sep 13, 2009
    33
    0
    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...
     
  2. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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.
     
  3. endaya_walatch

    Thread Starter Member

    Sep 13, 2009
    33
    0
    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??
     
  4. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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.

    [​IMG]

    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.

    [​IMG]

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

    Thread Starter Member

    Sep 13, 2009
    33
    0
    a big thanks for the schematic.. i'll try it..
     
  6. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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.

    [​IMG]

    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: Sep 18, 2009
  7. endaya_walatch

    Thread Starter Member

    Sep 13, 2009
    33
    0
    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..
     
  8. bountyhunter

    Well-Known Member

    Sep 7, 2009
    2,498
    507
    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: Sep 19, 2009
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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.
     
  10. endaya_walatch

    Thread Starter Member

    Sep 13, 2009
    33
    0
    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..
     
  11. endaya_walatch

    Thread Starter Member

    Sep 13, 2009
    33
    0
    i already seen the XR2206 but my concern is for function generator based op-amp only..
     
  12. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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.
     
  13. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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: Oct 25, 2009
  14. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    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.
     
  15. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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: Oct 25, 2009
Loading...