Waveform Generator Using OpAmp

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

WAVEFORM GENERATOR USING OPAMP

AIM
To set up and study square waveform, triangular waveform and sawtooth waveform
generator using Op-Amp.
THEORY
Square wave oscillator
The basic square wave oscillator is based on the charging and discharging of a
capacitor. Op-amps inverting input is the capacitor voltage and the noninverting input is a
portion of the output fed back through resistors and (refer figure 1). When the circuit is
first turned on, the capacitor is uncharged, and thus the inverting input is at 0V. This makes
the output a positive maximum, and the capacitor begins to charge towards voltage at VO
through resistor R. When the capacitor voltage reaches a value equal to the feedback voltage
(Vf) on the non-inverting input, the op-amp switches to the maximum negative state. At this
point, the capacitor begins to discharge from +Vf towards –Vf. When the capacitor voltage
reaches –Vf, the op-amp switches back to the maximum positive state. This action repeats and
a square wave output voltage is obtained.
Expression for period is

1  R2
T  2 RC ln where  
1  R1  R2

If R1 = R2, the equation for period reduces to T  2 RC ln 3

1
The frequency of oscillation, f 
2 RC ln 3
Triangular-wave oscillator
This circuit (figure 2) uses two operational amplifiers. Op-amp A1 functions as a
comparator and the op-amp A2 as an integrator. Comparator compares the voltage at point P
continuously with respect to the voltage at the inverting input; which as at ground potential.
When the voltage at P goes slightly below zero, the output of A1 will switch to negative
saturation. Suppose the output of A1 is at positive saturation +Vsat. Since this voltage is the
input of the integrator, the output of A2 will be a negative going ramp. Thus, one end of the
voltage divider R1-R2 is at +Vsat and the other at the negative going ramp. At time t = t1, when
the negative going ramp attains value of –Vramp the effective voltage at point P becomes
slightly less than 0 V. This switches output of A1 from positive saturation to negative
saturation level –Vsat. During the time when the output of A1 is at –Vsat, the output of A2
increases in positive direction. At the instant t = t2, the voltage at point P becomes just above
0 V, thereby switching the output of A1 from –Vsat to +Vsat. The cycle repeats and generates a
triangular waveform.

Vramp Vsat R2
At t = t1  ie. Vramp    Vsat 
R2 R1 R1
R2
Similarly, at t = t2 Vramp    Vsat 
R1

The peak to peak output of the triangular wave is

R2
VO(pp)  Vramp   Vramp   2 Vsat
R1

During the period 0-t1, The integrator functions as below.


T
2
1  V  T 
VO(pp) 
RC   V  dt   RC   2 
0
sat
sat

V 
Then, T  2 RC  O(pp) 
 Vsat 

4RCR2
Substituting for VO(pp) T
R1

R1
Then, frequency of oscillation, f 
4 RCR2

Sawtooth-wave oscillator
The difference between the triangular and sawtooth waveform is that the rise time of
the triangular wave is always equal to its fall time while in sawtooth wave generator, rise
time may be much higher than its fall time or vice versa. The triangular wave generator can
be converted to a sawtooth wave generator by injecting a variable dc voltage into the non-
inverting terminal of the integrator. This can be done by using a potentiometer as shown in
figure 3. When the wiper of the potentiometer is at the centre, the output will be a triangular
wave since the duty cycle is 50%. If the wiper moves towards –V, the rise time of the
sawtooth becomes longer than the fall time. If the wiper moves towards +V, the fall time
becomes more than the rise time.
DESIGN AND CIRCUIT DIAGRAMS

Design of square wave generator


Let the frequency of oscillation be 1 kHz

Take = 0.5 and R1 = R2 = 10 kΩ.

1
Frequency, f  Assume C = 0.1 μF
2 RC ln 3
1 1
Then, R   6
 4.55 kΩ
2Cf ln 3 2  0.1 10  1000  ln 3

Select standard value of 4.7 kΩ for R.


Square wave generator and waveforms

Triangular wave generator and waveforms

Sawtooth wave generator and waveforms


Design of triangular wave generator
Let the frequency of oscillation be 1 kHz

R1 R2
We have f  and VO(pp)  2 Vsat
4 RCR2 R1

Since supply voltage is ±12 V, Vsat will be approximately 10 V


Let VO(pp) be 5 V; Assume R2 = 1 kΩ.

2Vsat 2 10
Then R1  R2   1 103  4 kΩ
VO(pp) 5

Select standard value, R1 = 4.7 kΩ

Assume C = 0.1 μF

R1 4.7  103
R   11.7 kΩ
4 fCR2 4 1000  0.1 10 6  1103

Select standard value, R = 12 kΩ

Design of sawtooth wave generator


Design is similar to that of triangle wave generator.
Select R3 = 47 kΩ potentiometer to vary the reference voltage of second op-amp.
PROCEDURE
1. Set up the circuit after testing the components.
2. Set up the square wave generator as shown in figure and observe the output waveform
and note down their amplitudes and frequencies.
3. Set up the triangular wave generator as shown in figure and observe the variation in
frequencies of output waveform by varying the values of resistances ,
4. Set up the sawtooth wave generator as shown in figure and note down the rise time
and fall time.
5. Move the wiper of the potentiometer in both directions and observe the changes
taking place in the waveform.

RESULT

Circuits of square wave generator, triangular wave generator and sawtooth wave
generator are designed, setup and waveforms observed.

You might also like