Distorted sin wave from op amp - Page 1
Forum section: electronics / projects

author: hmpws
author_rank: Newbie
timestamp: July 25, 2017, 12:24:32 pm
content: Hello. I have been lurking for a while, absorbing knowledge but now I am stuck on this problem and I am trying to understand it! I am seeing distortion on an op amp from a sin wave input. This distortion gets worse the higher the frequency, and the problem appears earlier at higher gain.My signal input has a maximum frequency of ~500kHz. From data sheet (fig 16,http://www.ti.com/lit/ds/symlink/opa4192.pdf), the GBW is 10MHz at G = 1 and ~2MHz at G = ~6 (3Vp-p). The slew rate is 20V/us, so that is still greater than the steepest part of the sin wave at 500kHz. Since the bandwidth and the slew rate is higher than my signal, I am wondering what may be causing it? I have attached the FFT of a 500kHz signal at the input and output, and also the output at lower frequency of 125kHz, which is much cleaner!If I was to replace the op amp, what specification should I be looking for? Any insight would be helpful!

author: madires
author_rank: Super Contributor
timestamp: July 25, 2017, 12:44:33 pm
content: A circuit diagram would be helpful

author: tszaboo
author_rank: Super Contributor
timestamp: July 25, 2017, 12:54:56 pm
content: Figure 26, THD+N vs Frequency? If you extrapolate those lines...

author: grumpydoc
author_rank: Super Contributor
timestamp: July 25, 2017, 12:56:18 pm
content: Quote from: madires on July 25, 2017, 12:44:33 pmAs would time-domain views of the signals rather than frequency domain.

author: Zero999
author_rank: Super Contributor
timestamp: July 25, 2017, 01:00:29 pm
content: Does it get worse at higher signal levels?It could be harmonics due to the slew rate being exceeded.

author: DaJMasta
author_rank: Super Contributor
timestamp: July 25, 2017, 04:33:34 pm
content: 20V/us should be plenty for almost any 500kHz sine at normal levels (+-15V even), I think you're seeing a different effect. Have you probed the input to make sure that it's really the opamp? Are your power rails far enough apart to keep the top and bottom of the signal from being clipped by running into them?Is the signal purely AC? Are you driving it into a 50 ohm load or a high impedance load? It could be you're asking the opamp to drive too much current and it's simply not able to give you the highest and lowest peaks of the signal.+1 to looking at time domain signals, it takes a pretty well trained eye to put together an idea of it from just an FFT, and there's a lot to be learned from the look of the distortion to inform what's causing it.

author: David Hess
author_rank: Super Contributor
timestamp: July 25, 2017, 10:55:12 pm
content: Quote from: DaJMasta on July 25, 2017, 04:33:34 pm20V/us for a 500kHz sine wave is about 6 volts peak.

author: macboy
author_rank: Super Contributor
timestamp: July 26, 2017, 01:53:46 am
content: Distortion in an opamp circuit output is actively reduced via the negative feedback, but only to the extent that the available gain allows. GBP comes into play here. As frequency increases, available open loop gain is reduced. As your closed loop gain is increased, the available gain for correcting the output is reduced. You didn't say what your circuit gain is, but with it 10 MHz GBP, at 500 kHz, you have only gain of 20 to play with. If you have gain set to 4 for example then the extra gain is 20/4=5. Then you can expect up to 1/5 or 20% distortion.TLDR: for 500 kHz signals, you may need way more than 10 MHz GBP.

author: hmpws
author_rank: Newbie
timestamp: July 26, 2017, 04:07:49 am
content: Thanks for all the replies!Here is a screenshot (attached) of my spice simulation (I didn't want to make the problem description more complicated!).In brief, the AD9838 is a DDS with high impedance current outputs that are complementary (green trace in plot). The maximum compliance voltage on the pins at 0.8V, so the current (3mA max) is developed across the reisistors, 200R. This is passed to a low pass filter to reduce signal spurs (LT1565, with 650k cutoff, blue trace). I am sure the outputs up to this stage are good because I probed the signal and only see the FFT peak corresponding to the output frequency.DDS:http://www.analog.com/media/en/technical-documentation/data-sheets/AD9838.pdfLP:https://cds.linear.com/docs/en/datasheet/156531fa.pdfHowever, the problem comes in after amplification by the op amp (ideal signal is given in the red trace), that turns the complementary signal into a single ended one, I start seeing peaks at harmonics of the main frequency. It is not driving any load at the moment. Unfortunately, I don't have the scope at the moment so can't show the time domain data, but to my naked eyes, the 500kHz signal looked "good". A strange thing I was seeing when I had higher gain was that the output signal was hitting the rail cutoff much sooner than expected (4.2V vs ~4.8V from datasheet). This may not be related though.Quote from: macboy on July 26, 2017, 01:53:46 amI was thinking this may be the case but was not sure how to actually relate to the GBP. Currently, the gain is at 6 to give ~3Vp-p. The problem does appear sooner at lower frequency with higher gain. What do you mean in the last sentence referring to the % distortion?

author: David Hess
author_rank: Super Contributor
timestamp: July 26, 2017, 12:13:35 pm
content: Quote from: macboy on July 26, 2017, 01:53:46 amIt is not quite that bad. The excess gain reduces the existing distortion which does not become 100% just because no excess gain is available. Transconductance amplifiers usually operate with no feedback and easily achieve less than 1% distortion albeit at low maximum input signal levels. An operational amplifier is a transconductance amplifier with a voltage (low impedance) output.Depending on the specific design, operational amplifier distortion can be surprisingly low without feedback even at large input voltages.

author: mikerj
author_rank: Super Contributor
timestamp: July 26, 2017, 02:53:20 pm
content: The comment in your LTspice model says you've connected the op-amp it as a differential amplifier, but the resistor values say otherwise. Why are the gain setting resistor values so radically different in the inverting and non-inverting paths?

author: hmpws
author_rank: Newbie
timestamp: July 27, 2017, 03:43:28 am
content: Quote from: mikerj on July 26, 2017, 02:53:20 pmThanks for noticing, mikerj! I actually misread the example circuit in the datasheet (pg 9 LT1565) and made a mistake there. I should definitely match R1 = R3 and R2 = R4 and set the gain (R2/R1) that way! I will give it a go and see if this fixes some of the issues.