Author Topic: Op amp triangle generator - how to get a constant amplitude  (Read 4277 times)

0 Members and 1 Guest are viewing this topic.

Offline tbjTopic starter

  • Contributor
  • Posts: 25
Op amp triangle generator - how to get a constant amplitude
« on: December 24, 2012, 06:30:47 pm »
Hi,

I'm building a function generator, and I have two op amps configured like this:



R1 is a variable resistor, and I select different values for C1 to get the frequency ranges. I am using a TL082 op-amp. As I increase the frequency up towards around 300kHz, I find that the amplitude of the output triangle wave increases - at very low frequencies the amplitude is around 0.5v P-P; near 300kHz it's around 10 volts on a 15 volt supply.

I am going to use another op-amp to amplify the triangle wave, so 0.5v P-P would be fine, but how can I get the circuit to maintain a constant amplitude over the entire range of frequencies? Is it possible?

Cheers.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Op amp triangle generator - how to get a constant amplitude
« Reply #1 on: December 26, 2012, 02:33:57 pm »
That's odd, I'd expect the output to be lower at higher frequencies - the TL082 will struggle at 300kHz.
« Last Edit: December 26, 2012, 02:37:40 pm by Hero999 »
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Op amp triangle generator - how to get a constant amplitude
« Reply #2 on: December 26, 2012, 03:25:36 pm »
Not really; a triangle wave oscillator works by integrating a square wave, and if there's a delay between the triangular output reaching the programmed limit of its excursion and the square wave changing stage, the output will overshoot. The problem is likely to be down to the bandwidth of OA1, and the solution could be something as simple as a small capacitor across R3.

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: Op amp triangle generator - how to get a constant amplitude
« Reply #3 on: December 26, 2012, 09:00:04 pm »
The other thing that can cause an unexpected rise at higher frequencies would be an improperly compensated 10x probe on the scope.
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline marinedalek

  • Contributor
  • Posts: 22
  • Country: gb
Re: Op amp triangle generator - how to get a constant amplitude
« Reply #4 on: December 26, 2012, 09:22:19 pm »
The output of the left hand op-amp will typically have a peak-to-peak swing of 13.5V on a 15V supply. If you look at the slew rate, that equates to roughly 1 µs taken for each swing. If the wave being produced measures as 300 kHz, bearing in mind a single cycle will comprise two swings, the switching time would account for 60% of the cycle. The output probably looks more like a triangle wave with sine-wave-like tips, due to the integration of the falling ramp as the left op-amp switches. Only the remaining 40% of the wave is actually linear ramp.

Although wasteful in terms of layout size, the ideal solution is to use a fast-switching comparator for the left-hand op-amp such as an LM319, though you'll always come up against a frequency limit at some point.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Op amp triangle generator - how to get a constant amplitude
« Reply #5 on: December 27, 2012, 09:46:09 am »
The other thing that can cause an unexpected rise at higher frequencies would be an improperly compensated 10x probe on the scope.

That wouldn't explain a factor of 20:1 between the low frequency and high frequency responses of the circuit.

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: Op amp triangle generator - how to get a constant amplitude
« Reply #6 on: December 27, 2012, 01:57:56 pm »
Although wasteful in terms of layout size, the ideal solution is to use a fast-switching comparator for the left-hand op-amp such as an LM319, though you'll always come up against a frequency limit at some point.
The circuit might work with both comparators. The LM393 works in LTSpice. I haven't tried it in real life though.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf