Experiment No: 9 Date:
OP-AMP: SQUARE WAVE GENERATOR, TRIANGULAR WAVE GENERATOR
Aim: To Design square wave generator and triangular wave generator using op-amp.
Objective: To design, construct, and analyze oscillator circuits using operational amplifiers for the
generation of square and triangular waveforms, and to understand the underlying principles of op-amp
based waveform generation.
Apparatus Required:
Sr. No. Name And Specification Quantity Required
1 Regulated Variable DC Dual-Power Supply [0-32V & 1
2A]
2 IC 741 1
3 Dual Channel DSO 100MHz 1
4 Resistors in Ω [ ¼ or ½ W] As per circuit design
5 Capacitors in F As per circuit design
6 Breadboard 1
7 Connecting Wires As per circuit design
8 Compensating Probes [1:1] 3
Principle:
The basic square wave oscillator operates by repeatedly charging and discharging a capacitor. The
inverting input of the op-amp is connected to the capacitor, while the non-inverting input receives a
portion of the output via a voltage divider (resistors).
When the circuit is first powered on, the capacitor is initially uncharged, so the inverting input is at 0V.
This causes the op-amp to output a positive saturation voltage (+Vsat), and the capacitor starts charging
toward +Vsat through resistor R.
As the capacitor charges, its voltage increases. When it reaches a threshold voltage +V f (set by the voltage
divider at the non-inverting input), the op-amp output flips to -Vsat. The capacitor then begins discharging
and charges in the opposite direction. When it reaches -Vf, the output flips back to +Vsat, repeating the
cycle. This produces a continuous square wave at the op-amp output.
The time period, T of the square wave is given by:
𝑅1
T = 2𝑅𝐶 ln (1 + 2 )
𝑅2
If 𝑅2 = 1.16𝑅1 ,then the expression simplifies to:
T = 2RC
A triangular wave can be obtained by integrating the output of the square wave generator. This is done
using an integrator circuit (typically an op-amp with a resistor and capacitor in feedback configuration).
When a square wave is fed to the integrator, the output is a triangular wave due to the constant charging
and discharging of the capacitor with a constant current.
To obtain a stable triangular wave at the output, it is necessary that the condition:
𝑇
5𝑅3 𝐶2 >
2
is satisfied, where T is the period of the square wave, and R3, C2 are the components of the integrator.
Simplified Triangular Wave Generator:
Below is an alternative triangular wave generator circuit using fewer components:
Circuit Diagram:
IC741 Pin Configuration:
Theoretical Calculations:
To design square wave generator with frequency 1kHz
If R2=1.16R1, the equation for period is T=2RC or f = 0.5/RC Let R1=10kΩ, then R2=11.6kΩ (Use closest std.
0.5
value) Let C=0.1µF, then R=(103×0.1×10−6)= 5kΩ
Procedure:
1. Set up the circuit according to the provided diagrams.
2. Ensure the op-amp is powered correctly, with connections to pin 4 (-15V) and pin 7 (+15V), making sure
not to exceed 18V.
3. Construct an astable multivibrator using two op-amps. Connect the output of the first op-amp to the
input of the second, and vice versa, to create a positive feedback loop. Incorporate pairs of resistors and
capacitors to establish the oscillation frequency.
4. Power the circuit and utilize an oscilloscope to measure the frequency and amplitude of the square wave
output. Adjust resistor or capacitor values to observe frequency changes.
5. For the triangular wave generator, connect the output of the square wave generator to the input of
another op-amp configured as an integrator. Set the time constant of the integrator using its resistor and
capacitor to properly shape the square wave into a triangular waveform.
6. Observe the triangular waveform on the oscilloscope and measure its frequency and amplitude, noting
the relationship between these values and the square wave input.
Observations:
Theoretical Frequency Practical Frequency
SQUARE WAVE TRIANGULAR WAVE SQUARE WAVE TRIANGULAR WAVE
Practical Calculations:
NOTE: In the experiment, slight discrepancies in practical output may arise due to the use of standard
component values instead of those precisely derived from design equations. This discrepancy occurs
because standard values, while close approximations, may deviate slightly from ideal theoretical
values, influencing experimental results.
Conclusion: Circuits of op amp square wave generator and triangular wave generator are designed, setup
and waveforms observed.
Precautions:
1. Double-check resistor values and connections to ensure accuracy in the square and triangular wave
generator circuit before applying power. Additionally, verify that the product of the resistance (R 3) and
capacitance (C2) in the integrator circuit is greater than half the period (T) of the square wave input for
stable triangular wave generation at the output.
2. Operate all circuit components, including resistors, capacitors, and op-amps, within their specified
voltage and current ratings to prevent damage during the experiment.
3. Prevent short circuits by securely connecting components and insulating connections within the wave
generator circuit.
4. Include appropriate current-limiting resistors in the setup to protect components from excessive
currents, especially in the charging and discharging circuits.
5. Handle wave generator components with care to minimize static electricity discharge, grounding
yourself before handling to prevent damage.
6. Promptly report any malfunctioning equipment to the TA before proceeding with the experiment for
safety.
7. Avoid damaging or altering the wave generator equipment or connections, maintaining the integrity of
the experimental setup.
8. Use wire stripping tools for insulation removal to prevent wire or component damage during assembly.
9. Shield wires with hands or pliers during wiring to prevent wire fragments from scattering, ensuring a
clean and safe work environment.
Applications:
1. Square waves are important waveforms that are sometimes taken for granted, but they are important in
digital systems as clocks and analog systems as excitation sources.
2. Triangular functions are useful in signal processing and communication systems engineering as
representations of idealized signals, and the triangular function specifically as an integral transform kernel
function from which more realistic signals can be derived, for example in kernel density estimation. They
are also used in audio synthesizers, as they produce a softer sound compared to square waves, making it
useful in music and sound design.
Advantages:
1)SQUARE WAVE GENERATOR:
i. Simple Design: Square wave generators are easy to design and build, especially using op-amps or
timer ICs.
ii. Easy to Generate: It is easier to generate square waves compared to sinusoidal waves using basic
components.
iii. Provides Fast Switching Signals: The fast rise and fall times of a square wave are ideal for switching
and timing applications.
iv. Used for Clock Signals: Square waves are widely used as clock pulses in digital circuits,
microcontrollers, and processors.
v. Stable Frequency Output: When designed properly, square wave generators provide a very stable
and predictable frequency.
vi. High Harmonic Content: A square wave contains a wide range of odd harmonics, making it useful
for creating different frequencies in audio and signal processing.
2)TRIANGULAR WAVE GENERATOR:
i. Simple Construction: Can be built easily by integrating a square wave using op-amp circuits.
ii. Linear Slope: The voltage changes linearly with time, making it ideal for timing and ramp-based
applications.
iii. Used in Function Generators: Triangular waves are commonly found in function generators as a
base waveform.
iv. Low Harmonic Content Compared to Square Wave: A triangular wave has fewer and lower-
amplitude harmonics than a square wave, making it cleaner in some applications.
v. Good for Slope Comparisons: Useful in ramp generators and circuits that require linear ramp
voltage for comparison or triggering.
vi. Frequency Control: Frequency and amplitude can be adjusted independently in well-designed
circuits.
Disadvantages:
1)SQUARE WAVE GENERATOR:
i. High Harmonic Content: Square waves contain many high-frequency harmonics, which can cause
interference or unwanted noise in sensitive circuits.
ii. Not Ideal for Analog Systems: Sudden transitions and sharp edges can create distortion in analog
circuits.
iii. EMI (Electromagnetic Interference): The sharp transitions produce EMI, which can affect nearby
electronic devices or systems.
iv. Can Stress Components: Fast switching can stress components like transistors or capacitors,
especially in power electronics.
v. Limited Use in Audio Applications: Square waves sound harsh due to high harmonic content,
limiting their use in high-quality audio.
vi. Difficult to Filter: Removing unwanted harmonics from a square wave requires complex filtering.
2)TRIANGULAR WAVE GENERATOR:
i. Lower Output Amplitude: Compared to square wave generators, triangular wave outputs may
have lower amplitude depending on design.
ii. Slower Rise and Fall Time: Not suitable for fast-switching applications due to its linear (slow)
transitions.
iii. More Complex than Square Wave Generator: Requires integration of square wave, which adds
circuit complexity.
iv. Limited Frequency Range: The frequency range is usually lower and limited by the op-amp’s slew
rate and bandwidth.
v. May Drift with Time or Temperature: Component tolerances and temperature changes can affect
wave linearity and frequency.
vi. Not Ideal for Digital Applications: Due to gradual voltage changes, it’s unsuitable for driving digital
logic circuits directly.
Specifications: