# How to make sawtooth wave from square or triangular wave?

I know it is easy to convert a square wave to a triangular wave by an integrator. I know also that they can be made out of Harmonics but I don't know how to make a sawtooth wave form. Having a constant amplitude is also a concern ( 10Hz - 50MHz) and integrators naturally reduce the amplitude in higher frequencies. Is there any clean and standard way (especially any integrated circuit ) for this purpose?

• It is easy to do using harmonics as well. Have you seen this: en.wikipedia.org/wiki/Sawtooth_wave? I just tried this using a standard DAC and it seems pretty fine on a CRO. I used upto 11 harmonics. Use more if the shape requirement is more stringent. (all harmonics at amplitude 1/n, even harmonics negative or 180 degrees out of phase) Oct 5, 2013 at 12:01
• good suggestion. Basically I am thinking of making a sine wave by a DDS ( AD9850) and converting it to a square wave via its internal comparator. I am really interested in making triangular/ sawtooth wave by harmonics because I think I can learn a lot of it but I have no idea about making those harmonics from a DDS. Can you address a schematic or tutorial please?
– Aug
Oct 5, 2013 at 14:23
• Why not use a DAC such as AD5668, with which I have had a personal successful experience? Very easy to use and very flexible! Oct 7, 2013 at 9:18
– Aug
Oct 7, 2013 at 13:58

Off the top of my head, here's how I might consider approaching the solution.

The higher the square wave frequency, the lower the resulting triangle wave if you use "normal" integration circuitry. If you want to address this issue you could "filter" the square wave and use a peak measurment circuit to produce a "control" voltage that rises linearly as the squarewave frequency increases. This can be used to control integration rates.

Another method is to "examine" the amplitude of the resulting triangle wave and use this to control the amount by which the triangle wave is post-amplified - i.e. big triangle wave = low gain, small triangle wave = big gain. Maybe this technique and the variable integration method can work together successfully.

To make a triangle wave I'd use an integrator circuit formed around a current source and this current source could be designed to inject more current as the squarewave frequency increases hence keeping the output amplitude roughly constant. You'd need two current sources to make this work; one for the rise and one for the fall of the triangle.

Ultimately, you could make the rise and fall have different rates and therefore you'd be approaching the concept of a sawtooth waveform.

Alternatively you use a phase locked loop (PLL) to produce a frequency that is significantly higher than the square wave base frequency and use this higher frequency to control a sinewave/triangle/sawtooth look-up table - I think this is how Analog Devices make there DDS products.

• The last part ( using a lookup table) seems the most practical. Could you please explain a little more ( any IC or something)?
– Aug
Oct 5, 2013 at 17:35
• You'll need an eprom programmed with values corresponding to a triangle or saw shape. The PLL produces a frequency many times the input frequency and this, with a binary counter chip provides addresses to the eprom. Oct 5, 2013 at 18:19