from __future__ import division
from math import sqrt, pi
R=4.7e3 # each resistance of the RC phase shift oscillator
C=0.47e-6 # each capacitance of the RC phase shift oscillator
f=1/(2*pi*sqrt(6)*R*C) #
print "\n Therefore frequency of oscillation is %.3f Hz \n"%(f)
from __future__ import division
from math import sqrt, pi
f=900e3 # frequency of oscillation
C=1e-12 # each capacitance of the RC phase shift oscillator
R=1/(2*pi*sqrt(6)*f*C) #
print "\n each resistance of the RC phase shift oscillator is %.3f kohm \n"%(R*1e-3)
G=29 # opamp gain Rf/R1=29
R1=1e3 #
print "\n R1=%.0f kohm \n"%(R1*1e-3)
Rf=G*R1 #
print "\n Rf=%.0f kohm \n"%(Rf*1e-3)
print "the design circuit is shown "
from __future__ import division
from math import sqrt, pi
f=1e3 # frequency of oscillation
C=0.1e-6 # We choose the value of each capacitance of the RC phase shift oscillator
R=1/(2*pi*sqrt(6)*f*C) #
print "\n each resistance of the RC phase shift oscillator is %.3f ohm \n"%(R)
print " The standard value of R=680 ohm"
from __future__ import division
from math import sqrt, pi
R=5e3 # each resistance of the RC phase shift oscillator
C=0.1e-6 # each capacitance of the RC phase shift oscillator
f=1/(2*pi*sqrt(6)*R*C) #
print "\n Therefore frequency of oscillation is %.3f Hz \n"%(f)
from __future__ import division
from math import sqrt, pi
L=100e-6 #
f=500e3 #
print "We know that for a colpitts oscillator f=1/(2*pi*sqrt(L*Ceq))"
Ceq=1/(f**2*4*pi**2*L)
Ceq1=Ceq*1e9 #
print "\n Ceq = %.5f nF \n"%(Ceq1)
# C1=C2=C
C=Ceq1*2 # Ceq=(C*C)/(C+C)
print "\n Therefore C = %.5f nF \n"%(C)
from __future__ import division
from math import sqrt, pi
L=50e-6 #
C1=150e-12 #
C2=1.5e-9 #
Ceq=(C1*C2)/(C1+C2) #
f=1/(2*pi*sqrt(L*Ceq)) #
f=f*1e-6 #
print "\n Therefore frequency of oscillation is %.3f MHz \n"%(f)
from __future__ import division
from math import sqrt, pi
C=1000e-12 #
C1=C #
C2=C #
f=500e3 #
Ceq=(C1*C2)/(C1+C2) #
L=1/(4*pi**2*f**2*Ceq) # since f=1/(2*pi*sqrt(L*Ceq)) #
L=L*1e6 #
print "\n Therefore L=%.3f micro H \n"%(L)
from __future__ import division
from math import sqrt, pi
C1=100e-12 #
C2=50e-12 #
f=10e6 #
Ceq=(C1*C2)/(C1+C2) #
L=1/(4*pi**2*f**2*Ceq) # f=1/(2*pi*sqrt(L*Ceq)) #
L=L*1e6 #
print "\n Therefore inductor L = %.1f microH \n"%(L)
from __future__ import division
from math import sqrt, pi
L1=0.5e-3 #
L2=1e-3 #
C=0.2e-6 #
Leq=L1+L2 # total inductance for Hartley oscillator
f=1/(2*pi*sqrt(Leq*C)) #
print "\n Therefore frequency of oscillation is %.f Hz \n"%(f)
# there is a slight difference between the answer given in the book
# and the and output in the book they have taken the approximate value
from __future__ import division
from math import sqrt, pi
L1=2e-3 #
L2=20e-6 #
Leq=L1+L2 # total inductance for Hartley oscillator
fmax=2050e3 # maximum frequency
fmin=950e3 # minimum frequency
print "For f=fmax=2050kHz"
f=fmax #
C=1/(4*pi**2*f**2*Leq) # since f=1/(2*pi*sqrt(Leq*C)) #
C=C*1e12
print "\n C=%.2f pF \n"%(C)
print "\n For f=fmin=950kHz"
f=fmin #
C1=1/(4*pi**2*f**2*Leq) # since f=1/(2*pi*sqrt(Leq*C)) #
C1=C1*1e12
print "\n C=%.2f pF \n"%(C1)
print "\n Hence C must be varied between %.2f pF and %.2f pF \n"%(C,C1)
from __future__ import division
from math import sqrt, pi
L1=20e-6 #
L2=2e-3
Leq=L1+L2 # total inductance for Hartley oscillator
fmax=2.5e6 # maximum frequency
fmin=1e6 # minimum frequency
print "For f=fmax=2.5MHz"
f=fmax #
C=1/(4*pi**2*f**2*Leq) # since f=1/(2*pi*sqrt(Leq*C)) #
C=C*1e12
print "\n C=%.3f pF \n"%(C)
print "\n For f=fmin=1MHz"
f=fmin #
C1=1/(4*pi**2*f**2*Leq) # since f=1/(2*pi*sqrt(Leq*C)) #
C1=C1*1e12
print "\n C=%.3f pF \n"%(C1)
print "\n Hence C must be varied between %.3f pF and %.2f pF \n"%(C,C1)
from __future__ import division
from math import sqrt, pi
L=0.4 #
C=0.085e-12 #
R=5e3 #
Cm=1e-12 #
f=1/(2*pi*sqrt(L*C)) # series resonant frequency for crystal oscillator
print "\n series resonant frequency for crystal oscillator fs=%.3f MHz \n"%(f*1e-6)
Ceq=C*Cm/(C+Cm) #
fp=1/(2*pi*sqrt(L*Ceq)) # parallel resonant frequency for crystal oscillator
print "\n parallel resonant frequency for crystal oscillator=%.3f MHz \n"%(fp*1e-6)
increase=(fp-f)/f*100 #
print "\n increase in parallel frequency fp=%.3f %% \n"%(increase)
w=2*pi*f #
Q=w*L/R # Q factor
print "\n Therefore Q factor=%.3f \n"%(Q)
# in the book fs=0.856MHz is wrong,correct answer is fs=.863MHz
# in the book 1Jncrease=5.023% is wrong the correct answer is 1Jncrease=4.163%
# in the Q=430.272 which is wrong the correct answer is Q=433.861
from __future__ import division
from math import sqrt, pi
C=0.01e-12 #
Cm=2e-12 #
L=2 #
R=2e3 #
fs=1/(2*pi*sqrt(L*C)) # series resonant frequency for crystal oscillator
print "\n series resonant frequency for crystal oscillator fs=%.3f MHz \n"%(fs*1e-6)
Ceq=C*Cm/(C+Cm) #
fp=1/(2*pi*sqrt(L*Ceq)) # parallel resonant frequency for crystal oscillator
print "\n parallel resonant frequency for crystal oscillator=%.3f MHz \n"%(fp*1e-6)