Triangle wave rms
  1. Square Wave Oscillator Circuit

This circuit's input is not restricted to square waves; a 5 percent duty-factor rectangular wave input, for example, will result in a sawtooth, as opposed to a triangular output. The author gratefully acknowledges Rick Hansen for the design concepts incorporated in this circuit.

I need to convert that signal into a triangle / sawtooth wave of fixed amplitude. A simple RC type circuit is not too suitable because as the frequency goes up or down, the amplitude of the voltage across the capacitor changes proportionally.What circuit will allow me to convert a square wave directly to a triangle wave of fixed amplitude???? Square Wave Electrical Waveforms. Square-wave Waveforms are used extensively in electronic and micro electronic circuits for clock and timing control signals as they are symmetrical waveforms of equal and square duration representing each half of a cycle and nearly all digital logic circuits use square wave waveforms on their input and output.

Triangle
Active3 years, 9 months ago

I'm trying to generate different wave forms in c++. So far I managed the sine, triangle and square wave, but I fail to get an idea how to generate a sawtooth wave.

This is how my sine wave looks like:

And this is the triangle wave:

How can I convert it into a sawtooth wave?

user66875user66875
9141 gold badge12 silver badges36 bronze badges
Square To Triangle Wave Converter Circuit

1 Answer

You can't do a sample-by-sample conversion of a sine wave to a sawtooth wave. That's because the sine wave is symmetric in time: if you reverse time, then except for some possible phase shift you get the same wave. For a swatooth wave a time reversal has to be combined with a sign reversal, the only time-reversed version will look qualitatively different.

You need some additional information, like e.g. the slope at the current position. Or you need access to the raw parameter value, in which case the formula would be very easy:

MvGMvG
41.1k11 gold badges104 silver badges217 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Square Wave Oscillator Circuit

Not the answer you're looking for? Browse other questions tagged c++mathaudiowaveformwave or ask your own question.

Comments are closed.