# Op-amp triangular wave DC offset

I want to generate a triangular wave that has no negative component using op-amps. The method I am employing to generate the wave form is described here, and can be seen in this image:

As in the image, the output wave form oscillates around zero, and has a negative component. In my circuit I have no negative voltage source, and I am connecting the op-amps' V- to ground.

If it is at all possible, how can I shift the triangular wave output upwards so that it has no negative component?

how can I shift the output triangular waveform upwards so that it has no negative component? (on a single supply)

Shift your 0V references to Vcc/2 or better the average output voltage after unequal Use a voltage divider from Vcc. It must be accurate if you want 50% duty cycle.

.At its low point it is about 4V, and high point at about 9V

• 5V triangle swing out of about a 10V means the attenuation of that triangle from R2/(R2+R3) is too small but must be > 50% to reach Vcc/2

• This means the ratio of R3/R2 for non-ideal LM741 is about 10.8k/10k and same for Vcc/2 to get 6.2V.

• Thanks I got a good result with this. But what exactly do you mean by "the average output voltage after unequal'? And how did you find the best R3/R2 ratio? Commented Sep 1, 2022 at 17:32
• Some BJT push-pull Op Amps are closer to one rail than the other so the average is not always Vcc/2. Ideally for a maximum swing , using a rail to rail CMOS OpAmp R3/R2>=1. This means the average of the +ve square wave + the negative peak triangle equals the Vin+ reference = Vdd/2 . But there are better designs adding a FET for feedback so it becomes a voltage controlled oscillator (VCO) triangle + square wave and R ratio for gain and Vref for offset such as Vdd/2 Commented Sep 1, 2022 at 19:30

If it is at all possible, how can I shift the output triangular wave form upwards so that it has no negative component?

Try this: -

• -12 volts replaced with 0 volts
• GND connections replaced with +6 volts
• I tried your advice. The waveform is now shifted into the positive, but it is shifted too much. At its low point it is about 4V, and high point at about 9V. Initially its peak to peak voltage was ~12V, now it is ~6V. Can I get the wave form to reach 0 at its low point, and ideally, close to 12 at its high? Commented Aug 31, 2022 at 20:32
• @TreverThompson you are probably using something like a 741 op-amp and, this type of op-amp is unable to force its output to reach the power rails. You could either use a rail-to-rail op-amp or try making the positive supply higher along with the midpoint (6 volts) higher. In case you are using a 741, please read this: Reasons not to use a 741. Commented Aug 31, 2022 at 21:02
• Thanks, I see. On second though I don't even need it to go rail to rail, this is fine. However, the reduction of the peak to peak voltage by about half (was 12, is now 6) is likely problematic. Is there a way to prevent this reduction in p-p voltage? Commented Aug 31, 2022 at 21:12
• Go rail-to-rail @TreverThompson <-- anyway I believe your question has been answered so, if you are not upvoting I'm done here. Commented Aug 31, 2022 at 21:42