Adjustable frequency & amplitude function generator

Discussion in 'Homework Help' started by GodsmacK, Jun 18, 2016.

  1. GodsmacK

    Thread Starter New Member

    Jun 18, 2016
    14
    0
    Hello, I have to build a function generator with three waveforms using op amps. Well I need the bandwidth to be from ~1Hz to ~110KHz, and an amplitude of 1-10V.
    BACKGROUND:
    Based on the theory of derivators and integrators with op amps, I know how to transform one signal into another, so I simulated some circuits using the LM741; however, I got high distortion on 10KHz+ and a 50kHz maximum bandwidth.

    My questions are: how should I build the variable frecuency generator? and which op amps should I use in order to handle such bandwidth?

    I'd be glad if you can give any advice to achieve this project.
     
  2. dl324

    Distinguished Member

    Mar 30, 2015
    3,234
    619
    Welcome to AAC!

    Is this project for school?
     
  3. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    Have you been given any restrictions regarding power supply voltages and whether a single-polarity or dual-polarity supply should be used?
    Have you read the datasheet for the 741 opamp and understood why the 741 is a bad choice for this project?
    What tolerances (voltage, frequency, linearity, distortion) have been specified?
    Are the three waveforms entirely your choice?
     
  4. DickCappels

    Moderator

    Aug 21, 2008
    2,647
    632
    While at it, what is the third waveform?
     
  5. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,771
    930
  6. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,771
    930
    If you must use a 741 then pay attention to gain. You have to sacrifice gain in the 741 to reach your target range.
    You could add a transistor amp to your output to make up for the gain restrictions.
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    What do YOU mean (or the project specs mean) when it says you need the "bandwidth" to go up to 110 kHz? Does it really mean the waveform bandwidth or does it mean the waveform frequency? Except for a sine wave, the waveform bandwidth is considerably higher than the waveform frequency and that is especially true for a square wave.

    What are the three waveforms you are planning to provide?
     
  8. GodsmacK

    Thread Starter New Member

    Jun 18, 2016
    14
    0
    Hello, everyone!
    Thank you for your responses.
    -I need three waveforms: sine, square and triangle. Each one must have a tunable frecuency from 0Hz to 110KHz, as well as a tunable amplitude from 0V to 10V.

    - I'm not restricted to use the 741. I can use any op amp. However, I must not use 555 or other ICs.

    The main problem I have it's on generating the main waveform. I have been trying a lot of oscillators, but their are not amplitude-stable. What kind of oscillator should I use?. So, I can have a stable amplitude no matter which frequency I tune.
     
    Last edited: Jun 27, 2016
  9. GodsmacK

    Thread Starter New Member

    Jun 18, 2016
    14
    0
  10. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,380
    494
    The obvious answer is to use 555 to generate square wave, use pot for the resistor to vary the frequency. BAM! You have square wave generator.
    http://www.electronics-tutorials.ws/waveforms/555_oscillator.html

    Then you take square wave and run it through op amp configured as integrator. BAM! You have triangle/sawtooth wave generator.

    Somewhere you can put another op amp configured as amplifier, again use pot in the feedback to adjust the voltage gain.
     
  11. GodsmacK

    Thread Starter New Member

    Jun 18, 2016
    14
    0
    Well I also thought about that, but I'm not allowed to use sophisticated ICs. Only Op. Amps, transistors, resistors, coils and so...
     
  12. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,380
    494
    Then Hartley or Colpitts or Wien Bridge oscillator to generate sine wave.
     
    Last edited: Jun 27, 2016
  13. GodsmacK

    Thread Starter New Member

    Jun 18, 2016
    14
    0
    I just tried all three. In fact, I get the frequencies I need, but the amplitude is very unstable.
     
  14. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,380
    494
    Either you get a nice clean sine wave or you don't. You can not have it both ways.
     
  15. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    What tolerances (voltage, frequency, linearity, distortion) have been specified? The sine wave is the biggest challenge. The greater the allowable distortion the easier it will be to generate to meet the requirements: but 0Hz is unrealistic!
     
  16. MrAl

    Well-Known Member

    Jun 17, 2014
    2,418
    488
    Hi,

    The old sine/square/triangle IC's used a square/triangle generator and a non linear circuit to produce a pseudo sine. I dont know if you can have some distortion in your sine or need a super clear sine. The max frequency for the old designs was about 1Mhz, for the newer design about 20MHz. The accuracy and stability was only about as good as a typical RC oscillator.

    The more modern IC's use digital signal processing techniques to generate accurate and fairly clean sines. The top end on these is about 40Mhz typical, but the accuracy matches that of the base frequency crystal, and the frequency set resolution is on the order of less than 1 Hz.
     
  17. GodsmacK

    Thread Starter New Member

    Jun 18, 2016
    14
    0
    Hello!
    I wasn't given any tolerance specifications. The waveforms don't have to be perfect, but they must be as clear as posible... Also, it doesnt have to be 0Hz, <10Hz is good.
    So yeah, I have a good allowable distortion.
     
  18. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    I hope you are not trying to get 10 Hz to 110 kHz in a single potentiometer range. An 11,000:1 adjustment range is not practical. Also, that is too great a change in network impedance to assure oscillation. A single- or dual-gang pot with a bank of capacitors and a selector switch gets you the coverage you want.

    Following the internal layout of the 8038 function generator chip, start with the triangle wave formed by an integrator and comparator in a loop. The integrator resistor and capacitor set the operating frequency. This also gives you the square wave, and both are at constant amplitude regardless of frequency. The sine converter is tricky because the rate of change of the waveform varies by 11,000:1 across all ranges. A breakpoint converter using either a bunch of diodes or some fast transistor junctions can get the distortion below 5%. TI and LT have app notes on sine conversion circuits. Note that all output amplitude adjustments come after the conversion circuits, so the breakpoints always are at fixed voltages in the waveform amplitude.

    ak
     
    Last edited: Jun 28, 2016
  19. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    This circuit will not work. There is no feedback from the triangle wave converter (integrator) back to the square wave oscillator. Circuit tolerances and opamp errors cause the integrator to drift over time, saturating its output. Also, the output amplitudes are incorrect.

    ak
     
    Last edited: Jun 28, 2016
  20. GodsmacK

    Thread Starter New Member

    Jun 18, 2016
    14
    0
    Hello, guys...

    I have achieved to get two of the waveforms(square and triangle) I need, amplitude stable over frequency. However, when I integrate the triangle to get the sine, this sine changes its amplitude as I change the frequency. How could I fix this?
    I have attached the design. Hope you can help me out...

    1.PNG
     
Loading...