---
title: "Triangular wave generator circuit"
subject: "Basic Electronics Engineering"
chapter: 4
key: "semester_2/basic_electronics_engineering:triangular-wave-generator"
source: https://www.bctengineer.com/q/semester_2/basic_electronics_engineering/triangular-wave-generator
site: BCT Engineering
---

# Triangular wave generator circuit

Basic Electronics Engineering · Chapter 4: The Operational Amplifier and Oscillator

- Asked in: 2072 Magh, 2+4 marks
- Video: [How to Generate a Triangular Wave (Part -1)](https://www.youtube.com/watch?v=-_Ny8YjPY-U) — ALL ABOUT ELECTRONICS
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_2/basic_electronics_engineering/triangular-wave-generator
- Whole chapter: https://www.bctengineer.com/md/semester_2/basic_electronics_engineering/chapter-4

## Question

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.

## 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.

## Answer

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

```text
 +-------------+     +-----------------+
 | 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 − β)].

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How is a triangular wave obtained from a square wave?
   A. By feeding it to a differentiator
   B. By passing it through a comparator
   C. By amplifying it with a non-inverting amplifier
   D. By feeding the square wave to an op-amp integrator
   Answer: D. Integrating a constant gives a ramp; alternating constants give up and down ramps, i.e. a triangle. (Key point: Triangle from square)

2. During the positive half (Vs = +Vsat), what does the integrator output do?
   A. Rises linearly with slope +Vsat/(Rin C)
   B. Falls linearly with slope -Vsat/(Rin C)
   C. Stays constant at +Vsat
   D. Falls exponentially to zero
   Answer: B. The integrator inverts, so a positive constant input gives a falling ramp. (Key point: Slope in positive half)

3. When does the output switch from +Vsat to -Vsat?
   A. When the capacitor voltage reaches zero
   B. When the capacitor voltage reaches +Vsat
   C. When the input signal is applied
   D. When the capacitor voltage reaches +βVsat
   Answer: D. The non-inverting input is at +βVsat; once Vc exceeds it, the comparator flips. (Key point: Switching thresholds)

4. Why must Rin·C be large enough?
   A. To increase the frequency of the square wave
   B. Otherwise the triangular output exceeds the supply and saturates
   C. To make the op-amp inverting
   D. To reduce Vsat
   Answer: B. Vpp = Vsat T/(2 Rin C); it must stay below the supply limits. (Key point: Practical limit)

## Related in Basic Electronics Engineering

- [Square wave generator using op-amp](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Asquare-wave-generator-opamp) — Basic Electronics Engineering, chapter 4, asked 8×
- [Op-amp properties; square wave generator](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Aopamp-five-props-square-wave) — Basic Electronics Engineering, chapter 4
- [Barkhausen criteria and square wave generator](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Abarkhausen-square-wave-generator) — Basic Electronics Engineering, chapter 4
- [Feedback concept and square wave oscillator](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Afeedback-theory-square-wave) — Basic Electronics Engineering, chapter 4
- [MOSFET construction and working principle](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Amosfet-construction-working) — Basic Electronics Engineering, chapter 3, asked 2×
- [CRO block diagram and working](https://www.bctengineer.com/question.md?key=semester_2%2Fbasic_electronics_engineering%3Acro-block-diagram) — Basic Electronics Engineering, chapter 7

## Related in other subjects

- [Square wave generator circuit](https://www.bctengineer.com/question.md?key=semester_3%2Felectronics_devices_and_circuit%3Asquare-wave-generator-circuit) — Electronics Devices and Circuit, chapter 5
- [Working principle of dc generator with diagram](https://www.bctengineer.com/question.md?key=semester_4%2Felectrical_machines%3Adc-generator-principle-diagram) — Electrical Machines, chapter 3
- [Voltage follower square-wave output with slew rate](https://www.bctengineer.com/question.md?key=semester_4%2Fadvanced_electronics%3Avoltage-follower-square-wave) — Advanced Electronics, chapter 2
- [Working principle of DC generator](https://www.bctengineer.com/question.md?key=semester_4%2Felectrical_machine%3Adc-generator-working-neat-diagram) — Electrical Machine, chapter 3
