#Variable Declarartion:
import math
f=300.0 #frequency in hertz
C=0.1*10**-6 #capacitance in farad
#Calculations:
t=f*C
R=1/(2*math.pi*t*math.sqrt(6)) #Calculating resistance value
R=R/1000 #Calculating resistance value
R1=22000.0 #Calculating resistance value
Rf=29.0*R1 #Calculating resistance value
Rf=Rf/1000.0 #Calculating resistance value
#Results:
print('R= %.2f kohm'%R)
print('\nLet R=2.2 kohm, hence R1=22 kohm')
print('\nRf= %d kohm'%Rf)
#Variable Declaration:
import math
f=2000.0 #Frequency in hertz
C=0.05*10**-6 #Capacitance in farad
#Calculations:
t=f*C
R=1/(2*math.pi*t) #Calculating resistance value
R=R/1000.0 #Calculating resistance value
R1=1800.0 #Calculating resistance value
Rf=2.0*R1 #Calculating resistance value
Rf=Rf/1000.0 #Calculating resistance value
#Results:
print('R= %.3f kohm'%R)
print('\nLet R=1.8 kohm')
print('\nRf= %3f kohm'%Rf)
print('\nStandard value Rf= 3.3 kohm')
#Variable Declaration:
R1=116.0*10**3 #Resistance in ohm
R2=100.0*10**3 #Resistance in ohm
Vsat=14.0 #Voltage in volt
#Calculations:
# Part A
f=1000.0 #Frequency in hertz
T=1/f
# As log value is approx 1
RC=T/2 #Calculating time constant
RC1=RC*1000.0 #Calculating time constant
# Part B
C=0.01*10**-6 #Capacitance in farad
R=RC/C #Calculating resistance
Rn=R/1000.0 #Calculating resistance
# Part C
Vmax=2*Vsat*(R2/(R1+R2)) #Calculating maximum value of differential voltage
#Results:
print('RC= %.1f *10^-3 sec'%RC1)
print('\nR= %d kohm'%Rn)
print('\nMaximum value of differential input voltage= %.2f V'%Vmax)
#Variable Declaration:
fo=1000.0 #Frequency in hertz
Vcc=12.0 #Voltage Vcc in volt
R1=10.0*10**3 #Resistance in ohm
R2=10.0*10**3 #Resistance in ohm
C=0.1*10**-6 #Capacitance value in farad
#Calculations:
R=1/(2.2*C*fo) #Calulating resistance value
R=R/1000.0 #Calculating resistance value
#Results:
print('R= %.3f kohm'%R)
#Variable Declaration:
R1=100.0*10**3 #Resistance in ohm
R3=20.0*10**3 #Resistance in ohm
C1=0.01*10**-6 #Capacitance in farad
Vsat=14.0 #Voltage in volt
#Calculations:
# Part A
T=4*R1*R2*C1/R3 #Calculating time period
Tn=T*1000 #Calculating time period
# Part B
f=1/T #Calculating frequency
# Part C
# Part D
Vp=R2*Vsat/R3 #Calculating peak value of the triangular wave
#Results:
print('Time period T= %d ms'%Tn)
print('\nfrequency f= %d Hz'%f)
print('\nPeak value is +14V and -14V')
print('\nTriangular wave oscillates between %d V and - %d V'%(Vp,Vp))
#Variable Declaration:
Ri=10.0*10**3 #Resitance in ohm
Vp=10.0 #Voltage in volt
Vref=10.0 #Voltage in volt
fo=200.0 #Frequency in hertz
C1=0.1*10**-6 #Capacitance in farad
Vi=2.0 #Voltage in volt
#Calculations:
t=Vi/Vref
f=t/(Ri*C1) #Calculating frequency
#Result:
print('Frequency f= %d Hz'%f)
# Answer in textbook is wrong
#Varible Declaration:
C=0.1*10**-6 #Capacitance in farad
t=1*10**-3 #time in second
#Calculations:
R=t/(1.22*C) #Calculating resistance value
R=R/1000 #Calculating resistance value
#Result:
print('R= %.1f kohm'% R)
#Variable Declaration:
D=20.0 # 20 percent #Duty cycle
Ton=1.0*10**-3 #On time period in seconds
#Calculatins:
Tonpoff=100.0*Ton/D #Calculating total time period
Tonpoff1=Tonpoff*1000.0 #Calculating total time period
f=1/Tonpoff #Calculating frequency of oscillation
#Results:
print('Ton + Toff= %d ms'%Tonpoff1)
print('\nFrequency of oscillation= %d Hz'%f)
#Variable Declaration:
D=0.7 #Duty cycle
f=1000.0 #Frequency in hertz
RB=10.0**4/(6.43/3.0) #Resistance value in ohm
#Calculations:
RA=4.0*RB/2.75 #Calculating resistance value
RB1=RB/1000.0 #Calculating resistance value
RA1=RA/1000.0 #Calculating resistance value
#Results:
print('RB= %.1f kohm'%RB1)
print('\nRA= %.1f kohm'%RA1)
#Variable Declaration:
f1=1070.0 #Frequency in hertz
RA=50000.0 #Resistance in ohm
C=0.01*10**-6 #Capacitance value in farad
Rc=76.0#Standard Value #Resistance in ohm
#Calculations:
t=1.45/(f1*C)
RB=(t-RA)/2 #Calculating value of resistance
RB=RB/1000 #Calculating value of resistance
#Results:
print('Assuming RA= 50 kohm and C= 0.01 uF')
print('\nHence, RB= %.2f kohm'%RB)
print('\nRc= %d ohm (Standard Value)'%Rc)