Skip to main content

Square wave generator using op-amp

Short answer

An op‑amp astable multivibrator uses positive feedback (divider R1, R2) and an RC timing network. The output toggles between +Vsat and –Vsat when the capacitor voltage reaches ±βVsat. Frequency: f = 1/[2RC ln(1 + 2R2/R1)]. For R1 = 1.16 R2, f ≈ 1/(2RC).

Explain how a square wave can be generated using Op-Amp (draw the circuit, explain its working principle) and write the relation for frequency of oscillation.

A square wave generator using an op-amp is an astable multivibrator (relaxation oscillator). It uses positive feedback to switch the output between the saturation levels +Vsat and −Vsat, and an RC circuit to set the time period.

Circuit

          +----------[ R ]-----------+
          |                          |
          |         |\               |
          +---------|- \             |
          |         |   >------------+----o Vo
         === C   +--|+ /             |
          |      |  |/               |
         GND     +-------[ R1 ]------+
                 |
               [ R2 ]
                 |
                GND
  • R and C form the timing network: R from the output to the inverting input (−), and C from that input to ground.
  • R1 and R2 form the positive feedback divider from the output to the non-inverting input (+): the feedback fraction is β = R2/(R1 + R2).

Working principle

  1. Suppose Vo = +Vsat. The voltage at the non-inverting input is V+ = +βVsat. The capacitor charges through R towards +Vsat.
  2. When the capacitor voltage Vc reaches +βVsat, the inverting input exceeds the non-inverting input, so the output switches to −Vsat. Now V+ = −βVsat.
  3. The capacitor now discharges and charges toward −Vsat. When Vc falls to −βVsat, the output switches back to +Vsat.
  4. The process repeats, giving a square wave.
 Vo
       +Vsat  ___     ___     ___
             |   |   |   |   |   |
       -Vsat |   |___|   |___|   |

 Vc
      +βVsat    /\      /\      /\
               /  \    /  \    /  \
      -βVsat__/    \__/    \__/    \

Frequency of oscillation

The capacitor voltage moves between −βVsat and +βVsat while charging toward ±Vsat:

Vc(t) = Vsat − (Vsat + βVsat) e^(−t/RC)

The half period T/2 is the time to go from −βVsat to +βVsat:

T/2 = RC ln((1 + β)/(1 − β))

T = 2RC ln((1 + β)/(1 − β)) = 2RC ln(1 + 2R2/R1)

f = 1/T = 1 / [2RC ln(1 + 2R2/R1)]

If R1 = 1.16 R2 (β = 0.462), then T = 2RC and f = 1/(2RC). The output has a 50% duty cycle with amplitude ±Vsat.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Basic Electronics Engineering chapter 4 questions →