Skip to main content

Triangular wave generator circuit

Short answer

A triangular wave is obtained by feeding a square wave to an op-amp integrator, yielding linear ramps with slope ±Vsat/(Rin C). The square wave generator is an astable comparator with positive feedback and an RC network; capacitor voltage oscillates between ±βVsat, switching the output to generate a square wave.

Draw circuit diagram of triangular wave generator with square wave as input signal. Explain the working principle of square wave generator circuit using operational amplifier.

A triangular wave is obtained by integrating a square wave. The square wave generator feeds an op-amp integrator, and the integrator output is a triangle.

Block and circuit

 +-------------+     +-----------------+
 | Square wave |     |   Integrator    |
 | generator   |---->| (Rin, C, op-amp)|----> triangular
 | (astable)   | Vs  |                 |      wave Vo
 +-------------+     +-----------------+

  Vs --Rin--/\/\--+----||----+
                  |    C     |
                  |  |\      |
                  +--|-\     |
                     |  >----+---- Vo
              GND ---|+/

Integrator: Vo = −(1/Rin C) ∫ Vs dt

For a square wave of amplitude ±Vsat and period T:

  • During the positive half, Vs = +Vsat (constant), so Vo falls linearly with slope −Vsat/(Rin C).
  • During the negative half, Vs = −Vsat, so Vo rises linearly with slope +Vsat/(Rin C).
  • The output is therefore a triangular wave of the same period T.

Peak-to-peak output: Vpp = Vsat T / (2 Rin C).

Rin C is chosen large enough (Vpp must stay below the supply), otherwise the integrator output saturates. A resistor across C (about 10 Rin) is often added to limit DC drift.

Working of the square wave generator

It is an op-amp comparator with positive feedback (R1, R2 divider, β = R1/(R1 + R2)) and an RC network from output to inverting input.

  1. At output +Vsat, C charges through R towards +Vsat.
  2. When Vc reaches +βVsat, the output flips to −Vsat.
  3. C then discharges and charges towards −Vsat. When Vc reaches −βVsat, the output flips to +Vsat.
  4. The cycle repeats, giving a square wave with T = 2RC ln[(1 + β)/(1 − β)].

✓ Answer checked by Claude Opus 5.5 (high effort)

All Basic Electronics Engineering chapter 4 questions →