Waves are important fundamental ideas in engineering, especially in electrical circuit design or signal processing. Common input signals to circuits include sine waves, square waves, triangle waves, or sawtooth waves; these are produced with function generators.

The duty cycle is a parameter of the wave that describes how long it is active (in percent). A 75% duty cycle square wave, for instance, is at its peak voltage for 75% of its period and at its trough 25% of the time. We have a few more mechanisms for producing unusual waveforms.

  • One is by using op amps in saturation mode as a comparator. When a sinusoidal signal is sent through, when it is positive and when it is negative .
  • Triangle waves are similar, but we use capacitors to charge and discharge over time.
  • Astable multivibrator circuits can be used to produce a square wave only with DC sources, by tracking op amp supply rails.

Square waves can be approximated as the sum of sinusoids with a Fourier series:

Simulation

In LTspice, triangle waves can be simulated using the PULSE function. For a given source, right click and select from the function options. Vinitial and Von can define the minimum and maximum values of the source output. The Trise and Tfall should be half of the period.1

To adjust the scale of the -axis, we can right click on axis labels.

Footnotes

  1. From the Analog Devices documentation.