 lecture on OPAM as a square wave generator. At the end of this session student will be able to describe the working of square wave generator using operational amplifier. So, let us see the working of operational amplifier as a square wave generator. In the previous lecture we have seen the different kind of sinusoidal oscillators using operational amplifiers which generally gives the output as sine wave or cos wave. Now in this lecture we will see the non sinusoidal waveform oscillator using operational amplifier and it will be the square wave generator. So, let us see first the circuit of the square wave generator. So, this is a capacitor and 1 resistor R let us call it as C. These are connected to inverting terminal of the operational amplifier. As usual we will provide plus 12 volt and minus 12 volt supply. Now the non inverting terminal is connected with a voltage divider that is having R1 as well as R2 and here it is a feedback. It is a output voltage. So, this is a circuit for OPAM as a square wave generator. So, at the output if we force that output to switch between the positive saturation voltage as well as negative saturation voltage then we can achieve the square wave as a output from this operational amplifier circuit. Then it is called as the square wave generator. It is also known as a stable multivibrator or free running multivibrator. Now let us see the working of this. So, at the inverting terminal let us call this voltage as V2 and this 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 that is differential voltage between the non inverting and inverting terminal. As soon as we give the supply voltages to this OPAM initially C has no any charge. So, at initial stage V2 can be taken as 0 volt. So, VID is nothing but the difference between the non inverting and inverting terminal voltages. But initial stage will give us V2 as 0. So, VID is nothing but equal to V1. Now stop the video for while and think what will be the value of 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, V1 is nothing but the output voltage depends on output offset voltage. So, the VID is nothing but the output offset voltage. But VID can be positive or negative and it depends on the polarity of output offset voltage. Let us consider initially VID be a positive voltage. Now we will see the corresponding waveforms with the circuit. So, as VID is positive in this case the gain of this OPAM is maximum because C is not having 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 waveform as positive saturation voltage and negative saturation voltage. So, if the VID is positive then the output will be the positive saturation voltage. Now at this time the C starts charging towards positive saturation voltage through this resistor R and it will increase its voltage V2 from 0 up to certain value. So, we can indicate it with from 0 up to a certain value. Let us say it as a V1 because after getting the value V1 or after getting the slightly more value than V1 to the V2 it will give the negative output and the output will be switched from positive saturation voltage towards negative saturation voltage. So, the output will be switched to negative saturation voltage. Now at this negative saturation voltage this V1 can be given as VID is equal to minus V1 plus V2 and V1 equation can be given as R1 upon R1 plus R2 into minus V saturation because the output of the OPAM is negative saturation voltage. So, in this case V1 quantity is negative voltage. Now as the V1 is negative the C starts discharging through the R towards negative saturation voltage until a certain range comes. We will call it as minus V1. After reaching this V2 slightly less than minus V1 the output will again switch to positive saturation voltage. So, the waveform will till hold to negative saturation voltage and after getting the slightly less value than V1 that is more negative value than V1 the output will be again switched to positive saturation voltage and this happens again and again and continuous square wave is generated and the charging and discharging of capacitor can be continuously shown like this means we get here a square wave which will switch between positive saturation voltage as well as negative saturation voltage. Here the equation of V1 will change like this positive V1 value will be R1 upon R1 plus R2 into positive V saturation voltage and negative voltage can be given as R1 upon R1 plus R2 into negative saturation voltage. So, overall the output magnitude of V1 depends on R1 and R2 like this. So, we can give the equation for V1 like this. Now in this kind of switching of saturation, now this is the overall value of V1 where we can get the output switch between positive and negative V saturation. Here the time t can be given as 2 Rc natural log of 2 R1 plus R2 upon R2 seconds. It is the time period of the output of that square wave and the frequency for that square wave can be given as 1 by t means we can write this equation as frequency is equal to 1 upon 2 Rc natural log of 2 R1 plus R2 upon R2 hertz. So, this is nothing but the frequency of that particular square wave output in that if R2 is taken 1.16 times R1 then we will get F0 as 1 by 2 pi Rc exactly. So, we can calculate the frequency of that square wave as 1 by 2 pi Rc which is nothing but it is inversely proportional to Rc means if we keep the C value constant then it will depend on R inversely means if R increases then frequency will decrease like that it depends on the value of R and C. Now suppose if we want to design the square wave of 1 kilo hertz or square wave generator of 1 kilo hertz then let us consider C as 0.05 micro farad and if we consider R1 as 10 kilo ohm then how to design the circuit for 1 kilo hertz? In this circuit first we have to calculate the value of R2 which is equal to 1.16 of R1. So, in this the R2 is nothing but 11.6 kilo ohm and at these two values the frequency can be given as 1 by 2 Rc in that the C value is constant. So R can be calculated as 1 upon 2 F0 into C and if we put the value of capacitor and the value of frequency of the square wave then we can get R is equal to 10 k. So, the same circuit will be having the values like this C will be 0.05 micro farad R will be 10 k R1 will be 10 k and R2 will be 11.6 k like that we can design a square wave generator for frequency of 1 kilo hertz. The higher frequency of the opamp or the output of the opamp can be limited with the slew rate of the operational amplifier and for the precaution we have to connect the series resistor RS in inverting and non-inverting terminals because these two terminals practically are subjected to very large differential current due to the large differential voltage VID while switching from plus saturation volt to minus saturation volt like that we have to connect the series resistor RS for the precaution. So, this is how generator works. So, this is how the square wave generator works. These are the references. Thank you.