As a part of a work related project I have to use a triangle wave generator as a part of a class D amplifier. The generator works, but the quality of the triangle wave causes distortion. I'm having a hard time figuring out what's causing this and I'm wondering if anyone could give me some tips.
Circuit:
Note: A 100nF capacitor has been put in parallel with R120. Also, R79 is unpopulated.
It looks like the top level is in beginning saturation. I also guess that you see capacitive crosstalk shortly after the reversal points. The small oscillations in the middle of both ramps however needs explanation.
Can we exclude that it's somehow a probing effect? How did you connect the oscilloscope? Or does the triangle drive another circuit, e.g. a comparator? If so, disconnect it for the time being.
According to the waveform the distortion appears at the maximum peak whereas the minimum peak seems correct, so the circuit bandwidth sounds as not being the main issue on this case in particular; perhaps the signal amplitude is to high, reaching the upper allowed limit of input or output of the OpAmp, since it is too close of VDD.
Maybe you are trying too hard. For a simple foolproof
triangle-ish modulator input I like switched-RC. Not
dead linear but requires only two comparators and a
SR FF, and a fat inverter to drive the resistor. 1/3
and 2/3 VDD trip points for the comparators (ala LM555)
again dead simple to make.
So what if the triangle wave isn't textbook perfect?
Is there any observable downside, or just "not perfect"?