Function(signal) generator. Help!

Discussion in 'General Electronics Chat' started by Tavi89, Dec 29, 2012.

  1. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    I recently discovered a low cost op amp function generator kit.Details
    I want to build this function generator but I want to know if is possible to change the op amp and to have a greater frequency than 7000 Hz and if is it, what op amp should I use and what modifications should I make to the schematics? (i would like to be around 10 MHz)

    Thank you!
     
  2. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The LM348 quad opamp is/was horrible and is old.
    A TL074 quad opamp has the same pins and is MUCH better up to about 100kHz.
    They cost nearly the same.
     
    Tavi89 likes this.
  3. #12

    Expert

    Nov 30, 2010
    16,329
    6,818
    I tend to discourage trying to convert a design like that because the technology is so different at 10 MHz. You have to think differently at those frequencies, and the original circuit board wasn't designed to operate like that. Congrats to AG for 9000 posts, and he is right about stoppping at about 100 KHz with an audio frequency design. I say you need to completely reconsider how to get the other 99% of your desired frequency range.
     
    Tavi89 likes this.
  4. gootee

    Senior Member

    Apr 24, 2007
    447
    50
    There are commonly-available op amps that will go much, much higher in frequency, at least to a few hundred MHz. Do some searches at linear.com, for example. And discrete transistors could very-easily do what you want, too.

    But as #12 mentioned, much of the design and implementation would need to drastically change, in ways that you would need to learn about. There is a PDF about RF prototyping at the link in the last post of the thread at the following link:

    http://forum.allaboutcircuits.com/showthread.php?t=45583

    You should be able to accomplish what you want, if you use a blank PCB as a ground plane and mount the components dead-bug-style on the copper, with very short point-to-point wiring, and a shielded enclosure, and observe most of the rules for RF layout and construction, and, either solder a coax output cable's shield directly to the PCB or install a proper launching block.

    Here is a great document, by Jim Williams, about high-speed circuit techniques:

    http://cds.linear.com/docs/Application Note/an47fa.pdf

    And here is another one by Jim Williams, with good tidbits of high-speed knowledge:

    http://cds.linear.com/docs/Application Note/an13f.pdf

    Here is another document with tips for RF board layouts and component selection:

    http://cds.linear.com/docs/Design Note/dn50f.pdf

    Those are from linear.com. But you should do some searches at national.com (ti.com), and several other chip manufacturers' websites, and on google itself, for things like "high speed board layout". Also try adding the word "tutorial", when on google. If you get really ambitious, search for articles by Henry W. Ott, Bruce R. Archambeault, Howard Johnson, and Eric Bogatin, among many others.

    NOTE: If you DO decide to try it (And why not?), try to select an op amp that is only as fast as you need, but not much faster. Using a part that is capable of 500 MHz when you only need 10 MHz is just asking for trouble. (Of course, for a 10 MHz function generator, you would probably need to be able to accurately process frequencies up to at least 100-200 MHz, to be able to get fairly-decent waveform shapes and rise times, etc, for anything other than a sinusoid.)

    #12 is basically correct and this might be like the proverbial "opening a can of worms", but I encourage you to try to learn. You could even do it in stages of increasing frequency. e.g. You could first try making a better audio-frequency version, using something like the 200-kHz-capable OP275 or similar "audio frequency range" op amp, with repetition rates up to maybe 20 kHz or so. Then you could try getting to a 100 kHz or 1 MHz repetition rate. Then try for 10 MHz. At each stage, the required frequency response will be much higher than your fundamental repetition rate, unless you are making only sine waves.

    Even at only a 200 kHz repetition rate, the harmonics required to make waveforms other than sinusoids will extend to much higher frequencies than your fundamental repetition rate. So even for a mere 200 kHz rate, you will need to design and implement the circuit so that it will work well at frequencies that are roughly at least ten to twenty times higher, or maybe more, depending on how precise you want your output waveform shapes to be.

    You can also think of that in terms of rise time, where the frequencies necessary to produce a rise time of trise would include up to about f = 1 / (Pi x trise). [Some people use 1 / (3.5 x trise), but Henry W. Ott says Pi instead of 3.5 so that's what I use. I guess I should try deriving it myself.]

    Obviously, you will need an oscilloscope that can work well, up to much higher frequencies than your target output fundamental frequency. Your scope (and probes) should probably be able to go to at least 200 Mhz, for a 10 MHz rep rate, although 100 MHz might be "usable", in a pinch (but I would not recommend it). You will also want to be able to see things like parasitic oscillations, which could be at very much higher frequencies, depending on the parts you select. So use a scope that goes way above 200 MHz, if you possibly can. [And actually, the probes should be able to go quite a bit higher than the scope, if you want accurate measurements at up to the scope's maximum rated bandwidth. Tdisplay = sqrt ( Tprobe^2 + Tscope^2 ). But that won't apply if you use a direct coax connection from your output, if you have a matching-impedance scope input.]

    Cheers,

    Tom
     
    Last edited: Dec 31, 2012
    bug13, Tavi89 and #12 like this.
  5. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    Thank you all for quick responses.First of all, I don't know to much about op amps, so if there is anyone who may want to explain me this schematic (I mean how are these signals generated? and if I want to change the op amp from this scheme with an TL074, what else needs to be changed?) I would really appreciate.
     
  6. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The text for the kit explains how it works.
    The first opamp is a Schmitt Trigger and the second opamp is an integrator.
    The triangle wave from the integrator rises and falls which causes the Schmitt Trigger to switch.

    A TL074 quad opamp has the same pin numbers as the lousy old LM348 so it simply plugs in and works without changing anything.

    It is a lousy circuit. Its supply is not regulated so the levels change as the 9V battery voltage runs down. The sinewave is made from the triangle wave which is a poor way to make a sinewave. The diodes cause the sinewave to be clipped.
     
    Tavi89 likes this.
  7. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    Thank you! But if i don't really need a quad op amp ic and use separate 4 op amps could I get a higher frequency than 100 KHz? if so, what op amps could you recommend me?
     
  8. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    I use opamps for audio. I don't know any opamps that work at radio frequencies.
     
  9. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    Ok. I'm looking for a more detailed explanation of the circuit. I have made a simulation in multisim. I know that the first op amp acts like a comparator (Schmitt trigger) and the second one as integrator. Concerning the Schmitt trigger I'm a little confused;
    how do I calculate the threshold voltages? and is this a non-inverting or an inverting Schmitt trigger?
    In the description it's says that the input to pin 12(Vp) depends on two things; firstly the potential of pin 14(Vo), and secondly, the voltage output of opamp C at pin 8(Vo1). So how do I calculate Vp? Thank you.
    Scheme Multisim
     
  10. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    To calculate the values of the schmitt trigger threshold voltages:
    1) Look up the maximum output voltage swing of your opamp on its datasheet with your load resistance and your supply voltage.
    2) Use Ohm's Law to calculate the threshold voltages.
     
    Tavi89 likes this.
  11. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    I found for the initial op amp (LM348) the output voltage swing for RL ≥2KΩ is ±10 V.
    My supply voltage is 9V. I know Ohm's law, but I'm still confused...

    I have a scheme made in multisim. http://ge.tt/9R2pu3X/v/0?c
     
  12. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Your schematic is not a valid file type (use PNG for schematics) so it does not open.
    Please Attach the schematic HERE to your reply.

    The LM348 quad opamp is extremely old and has poor performance.
    Its datasheet shows that when it has a supply that is plus and minus 15V and has a 2k load then its maximum peak output voltage is only 10V for some of them. Then its p-p output is 10V less than the total supply voltage.

    Since your supply is only 9V then the output current is less so its maximum peak-to-peak output voltage is only about 3V for some of them.

    It has a very slow slew rate so frequencies higher than only 9kHz will be distorted and have reduced output level.

    Modern opamps have a much higher output level and work well at frequencies up to about 100kHz.
     
    Tavi89 likes this.
  13. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    Ok.Thank you. I'm using lm348 just for understanding the circuit and simulation.
    So here is the schematic and some measurements that I made:
    Vn=4.94V
    Vo ranges from 1.73 to 7.27V
    Vo1 ranges from 3.73 to 6.64V
    http://ge.tt/3Ryq86X/v/0?c
     
  14. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    Sorry for the other scheme that I posted. It can be open only with multisim 12.0
     
  15. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
  16. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Thank-you for posting your schematic here (but it is covered in chicken-pox dots).

    You measured (or Multisim guessed at) the output levels of the squarewave and the triangle wave. You are lucky that the LM348 is not a 'minimum' one.
    You forgot to say the frequency since the very old quad opamp has poor high frequency response above 9kHz.

    Your circuit is missing the parts that reduce the triangle level to be something like a sinewave.
     
  17. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    Yes it's missing the sine part, but it doesn't matter because I only want to study the square wave and triangle wave, for now.Do you know how can I calculate the threshold voltage?
     
  18. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    The threshold voltage of the integrator opamp output is when Ohm's Law calculates the current in the positive feedback resistors R3 and R11 to make the positive input the same voltage as the negative input (4.94V).

    For example, the output of the Schmitt trigger (Vo) is low at 1.73V. Then it switches high when Vo1 swings high enough to make the positive input (Vp) higher than 4.94V.
    At the switching point R3 has 4.94V - 1.73V= 3.21V across it then its current is 3.21V/15k= 0.214mA. When R11 has a current of 0.214mA then it has a voltage of 8.2k x 0.214mA =1.76V across it. Then the output of the intergrator (Vo1) is 4.94V + 1.76V= 6.7V but you measured 6.64V which is close.
     
    Tavi89 likes this.
  19. Tavi89

    Thread Starter New Member

    Dec 29, 2012
    11
    0
    Thank you! This is what I was looking for. Now I don't know why after the potentiometer R5, the voltage is stable at 4.94 V? And how could I calculate the Vo1 of the integrator?

    Thank you for your patience.
     
  20. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    An opamp has extremely high voltage gain. The negative feedback through the integration capacitor C2 causes the (-) input to have the same DC voltage as the (+) input which is 4.94V.

    Vo1 is a positive-going and negative-going ramp making a triangle wave.
    It rises or falls far enough to make the (+) input of the Schmitt trigger opamp slightly higher or lower than the voltage on the (-) input (4.94V) as I explained in my last reply to make the threshold voltage of the triangle wave.
     
    Tavi89 likes this.
Loading...