# Triangle Wave Generator

Discussion in 'Homework Help' started by stupidlogic, Apr 20, 2011.

1. ### stupidlogic Thread Starter Member

Aug 10, 2010
39
0
I have to build a triangle wave generator from scratch with the following specs:

Source: 12VDC (something like a car battery)
Wavform Output:
-> 3V pk-pk with 3% tolerance
-> Mean value of 1V with 3% tolerance
-> Frequency of 10kHz with a 10% tolerance
Price: As cheap as possible

My current circuit is within tolerance for frequency and pk-pk but I'm having trouble getting a DC offset of +1V. My wave has a mean around ~4V. And at that point it starts to clip and rounds off the peak of my triangle wave. I've included a schematic of my circuit and a couple pics of the output from the simulator.

I've tried using a voltage divider and an op amp set up like an adder to make the adjustment but it either ends up farther off or somehow I get a DC output of one of the rail voltages.

Any suggestions or ideas would be appreciated. Thank you!

File size:
199.8 KB
Views:
78
File size:
211.9 KB
Views:
44
2. ### Adjuster Well-Known Member

Dec 26, 2010
2,147
300
You cannot expect a nominally "perfect" integrator (with no DC feedback) to have a stable mean output level over time. Even with zero deliberate DC input, imperfections in the system such as input offset voltages will tend to produce errors which will be integrated over time to produce substantial and uncontrolled DC output. To attain a stable DC condition, add DC negative feedback around your integrator, but filter off all but low frequencies so that the triangular waveform is not too distorted.

Consider a T-network consisting of a resistor of a few hundred kohms connected to U1C -IN, a capacitor (value TBD) to ground, and a second resistor of a few hundred kohms to U1C output. You would thus reduce the DC gain to a low value, so the DC working point should be stable, but with an appropriate choice of capacitance the wave shape should be little changed. There may be stability (compensation) issues with this method, but it should be worth a try.

In passing, I notice that you are limiting the output voltage at U1B output with zeners connected in parallel - is this OK, relying on internal current limiting, or would it be better to have some resistance in series with the output?

3. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
The standard technique is to put a Schmitt trigger and an integrator in a feedback loop, which will prevent the integrator from saturating. Google "triangle wave generator".

Apr 5, 2008
15,796
2,382
5. ### Wendy Moderator

Mar 24, 2008
20,772
2,540
Do you want a symmetrical triangle wave, or is a sawtooth acceptable?