In this tutorial you will learn about a **square wave generator circuit using OP-AMP IC741**. With the use of few resistors and capacitors connected with the **Operational Amplifier** we will create a Square Wave as output. By using this Square wave you can also generate triangular wave which we will explain in our next article.

So, first lets learn briefly about the OP AMP and then create a circuit with it and next learn **how the square wave generator circuit works** with formulas in detail. Square wave generator is also called as **Astable MultiVibrator**.

## What is an Operational Amplifier OP-AMP?

An **operational amplifier (OA or op-amp)**, is a high-gain amplifier directly coupled, which is generally fed with positive and negative sources, which allows it to obtain excursions both above and below ground or reference point that be considered. It is especially characterized by its response in: frequency, phase change and high gain that is determined by externally introduced feedback. Due to its design, it has a high input impedance (Z) and a very low output impedance. This is the symbol:

## Op-Amp IC LM741 Overview:

The LM741 is an integrated circuit corresponding to the series of operational amplifiers, which are designed for general purposes, since they are used as comparators, multi vibrators, or amplifiers.

This amplifier was born in 1963, at the hands of **Fairchild semiconductors**, with the mission of making an “all-terrain” operational amplifier.Â The registration number of this integrated circuit is no coincidence:

- The number 741 means that the op amp consists of 7 functional pins.
- 4 pins with the ability to receive an input signal
- And only 1 output pin
- And that is how the numberÂ 7-4-1Â is formed.

Just as data, inside it is a very complex arrangement of resistors, capacitors and above all transistors, this arrangement is what allows all the magic and is encapsulated in a single circuit.

## LM741 OP-AMP Pin diagram:

Below is the LM741 IC along with the pin diagram.

As we discussed there are 4 input pins in green, and one output pin at pin6. And has 7 usable pins.

## Square wave generator circuit diagram

The Schematic diagram of Astable Multivibrator is given below.

As you can see from the above circuit of the square wave generator, the capacitor C and one resistor R are connected to inverting terminal of the operational amplifier. The non-inverting terminal is connected with a voltage divider which has 2 resistors R1 and R2. We will provide +12 volt and +12 volt supply supply to pin7 and pin4 of OP AMP 741 respectively.

So, above is a circuit for OP AMP as a square wave generator. At the output Vo if we force it to switch between the positive saturation voltage as well as negative saturation voltage then we can achieve the square wave as output from this operational amplifier circuit. It is also known as **Astable multivibrator or freerunning multivibrator.**

## Working of Square wave generator using OP AMP 741

let us assume the voltage at the inverting terminal be V2 which is nothing but the voltage across capacitor C. let us call the voltage at non-inverting terminal as V1 and the differential voltage is taken as Vid. Vid is the differential voltage between the non-inverting and inverting terminals.

Differential voltage Vid = V1-V2

As soon as we give the supply voltages to this op-amp, initially capacitor C has no charge so at initial stage V2 can be taken as 0volt. Then the differential voltage is taken as Vid = V1-0.

Now you will get a doubt that what is the voltage at V1 because we are not providing any kind of input here. So V1 is nothing but the function of output offset voltage and also it depends on the values of R1 and R2.

So at initial state Vid is nothing but the output offset voltage but it can be positive or negative and it depends on the polarity of output offset voltage.

Now let us see the corresponding waveforms with the circuit. So as Vid is positive in this case the gain of this op-amp is maximum because C is doesn’t have any kind of charge. so this positive voltage will drive the output of the operational amplifier towards positive saturation voltage. So we can show the initial wave as: if the Vid is positive then the output will be the positive saturation voltage.

Now at this time the capacitor C starts charging towards positive saturation voltage through this resistor R and it will increase its voltage V2 from 0 up to certain value. let us say it as a V1 because after getting the value V1 or after getting the slightly more value than V1. V2 will give the negative output and the output will be switched from positive saturation voltage towards negative saturation voltage.

When the output is in the negative saturation voltage the capacitor C will start discharging to certain level through resistor R. and when V2 becomes slightly less than V1 the output will be again switched to positive saturation voltage. This process continues again and again which results in generating the Square Wave.

Here the magnitude of V1 depends on R1, R2 and Vsat. The equation for V1 can be written as below image.

Here the time T is given as

As we know Frequency = 1/Time

by solving this equation further we get the equation for frequency fo as

The frequency of the wave inversely is proportional to R and C.

## Lets design a 1KHz frequency square wave

Here frequency= 1KHz , capacitor C= 0.05Î¼FÂ and R1= 10KÎ©, as from the above equation R2=1.16R1, we get R2=11.6KÎ©.

To get the value of R, use the below equation

by substituting the values which we already know we can get the value of R as 10KÎ©.

### Now lets build the circuit for 1KHz square wave generator.

For this Astable multivibrator circuit we need

- OP-AMP 741 IC
- 2X 10K resistors
- 1X 11.6K resistor
- 1X 0.05uF Capacitor
- Wires to connect

## Square Wave Generator simulation on Proteus software

You can design and simulate this circuit in Proteus software which has lots of components and mainly the Digital Oscillator which we need to check the waveforms in this circuit. We used it and sharing the screenshot of Square wave below.

Or if you built this circuit and want to test in live refer this article where you will be able to build a DIY Oscilloscope with Raspberry Pi Pico:Â DIY Smartphone Oscilloscope using Raspberry Pi Pico.

If you like this **Square wave generator Circuit**Â please subscribe to ourÂ **YouTube Channel â€œCircuit Schoolsâ€œ**Â to encourage us to publish more interesting projects. If you have any doubts write to us from below comment section.

Good explanation, could you please make the same with saw tooth wave generator