# Chapter 5: Operational Amplifiers- Non-linear Circuits

### Example No.5.1, Page No: 234

In :
#Variable Declaration:
Vz1=5.5             #Volatage in volt
Vz2=5.5             #Voltage in volt
Aol=100000.0        #Open loop gain
Vd=0.7              #Voltage in volt

#Calculations:
Vo=Vz1+Vd  # Plus or minus
Vich=Vo/Aol         #Calculating change in voltage
Vich=Vich*1000.0    #Calculating change in voltage

#Results:
print('Delta Vi=%.3f mV'%Vich)

Delta Vi=0.062 mV

### Example No. 5.2, Page No: 239

In :
#Variable Declaration:
R1=56.0*10**3               #Resistance value in ohm
R2=150.0                    #Resistance value in ohm
Vi=1.0                      #Voltage in volt
f=50.0                      #Frequency in hertz
Vsat=13.5                   #Voltage in volt
Vref=0.0                    #Voltage in volt

#Calculations:
Vut=Vsat*R2/(R1+R2)         #Calculating Vut voltage
Vut=Vut*1000.0              #Calculating Vut voltage
VL=-Vut                     #Calculating Vlt voltage

#Results:
print('Vut= %d mV'%Vut)
print('\nVL= %d mV'%VL)

Vut= 36 mV

VL= -36 mV

### Example No: 5.3, Page No: 249

In :
#Variable Declaration:
Vclipl=0.35            #Voltage in volt
Vp=0.5                 #Voltage in volt
gain=10.0              #Gain
R=1000.0               #Resistance in ohm

#Calculations:
Vounclip=Vp*gain       #Calculating unclipped output voltage
Voclip=Vclipl*gain     #Calculating clipped output voltage
Vb=Voclip-0.7          #Calculating breakdown voltage

#Results:
print('When unclipped, output voltage= %.1f V'%Vounclip)
print('\nWhen clipped, output voltage= %.1f V'% Voclip)
print('\nZener diode breakdown voltage= %.1f V'%Vb)
print('\nA 2.8V Zener diode should be connected')

When unclipped, output voltage= 5.0 V

When clipped, output voltage= 3.5 V

Zener diode breakdown voltage= 2.8 V

A 2.8V Zener diode should be connected

### Example No: 5.4, Page NO: 251

In :
#Variable Declaration:
Vref=1.5                #Voltage in volt

#Part A
#Variable declaration:
Vpp=5.0                 #Voltage in volt
Vnp=2.5                 #Voltage in volt

#Calculation:
Vc=Vnp + Vref           #Calculating capacitor voltage

#Result:
print('\nCapacitor voltage Vc= %.1f V'%Vc)

#Part B
#Calculation:
Vopeak=Vnp + Vref +Vpp  #Calculating peak clamped output voltage

#Result:
print('\nPeak value of clamped output voltage Vo(peak)= %.1f V'%Vopeak)

#Part C
#Calculation:
Voc=0.7 + Vref         #Calating output voltage during charging

#Result:
print('\nOp-amp output voltage during charging Vo= %.1f V'% Voc)

#Part D
#Calculation:
Vd=Vref-Vopeak         #Calculating maximum differenctial input voltage

#Result:
print('\nMaximum differential input voltage Vd= %.1f V'%Vd)

Capacitor voltage Vc= 4.0 V

Peak value of clamped output voltage Vo(peak)= 9.0 V

Op-amp output voltage during charging Vo= 2.2 V

Maximum differential input voltage Vd= -7.5 V