Chapter 9: Oscillators and Frequency Generators

Example 9.1, Page 306

In [1]:
import math

#Variable declaration
R=50000;            #in Ohm
C=0.01*10**-6;           #in F

#Calculations
f=1/(2*math.pi*R*C);

#Result
print "The frequency of oscillation  = %.0f Hz\n"%f; 
The frequency of oscillation  = 318 Hz

Example 9.2, Page 307

In [3]:
import math

#Calculations&Results
# for minimium frequency
R=11100;            #in Ohm
C=0.1*10**-6;           #in F
f=1/(2*math.pi*R*C);
print "The mimimum frequency of oscillation  = %.1f Hz\n"%f;  

# for maximum frequency
R=1100;            #in Ohm
C=0.1*10**-6;           #in F
fm=1/(2*math.pi*R*C);
print "The maximum frequency of oscillation  = %.0f Hz\n"%fm;  
print "For C=0.001microF, the range is from %.1f Hz to %.0f Hz\n  "%(f*10,fm*10);
print "For C=0.0001microF, the range is from %.1f Hz to %.0f Hz\n  "%(f*100,fm*100);
Rf=10000.+2700;          #in ohm
Ri=5600;                #in Ohm
Av=1+Rf/Ri;
print "Gain ,Av is %.2f \n  "%Av;
The mimimum frequency of oscillation  = 143.4 Hz

The maximum frequency of oscillation  = 1447 Hz

For C=0.001microF, the range is from 1433.8 Hz to 14469 Hz
  
For C=0.0001microF, the range is from 14338.3 Hz to 144686 Hz
  
Gain ,Av is 3.27 
  

Example 9.3, Page 310

In [4]:
import math

#Variable declaration
R=1000;            #in Ohm
C=0.1*10**-6;           #in F

#Calculations&Results
f=1/(2*math.pi*1.732*R*C);
print "The mimimum frequency of oscillation  = %.0f Hz\n"%f;  
#Vo=(R+Xc)*I1-R*I2
W=1/((6**0.5)*C*R);
print "The frequency = %.0f Hz\n"%W;  
#Vo/V3=1+(6*Xc/R)+(5*Xc/R**2)+(Xc/R)**3;
Vr=1-(5/((W*C*R)**2));           #Vr=Vo/V3
print "The Vo/V3 is = %.0f \n"%Vr;  
print "The gain of ladder network is B= V3/Vo = 1/%.0f \n"%Vr;  
The mimimum frequency of oscillation  = 919 Hz

The frequency = 4082 Hz

The Vo/V3 is = -29 

The gain of ladder network is B= V3/Vo = 1/-29 

Example 9.4, Page 313

In [5]:
import math

#Variable declaration
C=0.1*10**-6;           #in F
R=1000;            #in Ohm
Av=-29;

#Calculations&Results
Rf=-Av*R;
print "The value for Rf is = %.0f Ohm\n"%Rf;
f=1/(2*math.pi*6**0.5*R*C);
print "The  frequency ,fo  = %.0f Hz\n"%f; 
The value for Rf is = 29000 Ohm

The  frequency ,fo  = 650 Hz

Example 9.5, Page 318

In [10]:
#Variable declaration
Vsat=13.;            #in V
R2=10000.;               #in ohm
R3=20000;               #in ohm
R=33000;               #in ohm
C=0.01*10**-6;            #in Farad

#Calculations&Results
Vup=Vsat*R2/R3;
print "Value of Vupperthreshold  is = %.1f V\n"%Vup;  
#dv/dt=Vsat/RC=k
k=Vsat/R/C;
print "dv/dt = %.0f V/S\n"%k;  
T=Vsat/k;
print "T = %.5f S\n"%T;  

f=1/T/2*10**-3;
print "f = %.2f KHz\n"%f;  
Value of Vupperthreshold  is = 6.5 V

dv/dt = 39394 V/S

T = 0.00033 S

f = 1.52 KHz

Example 9.6,Page 323

In [9]:
#Variable declaration
R1=10000.;               #in Ohm
R2=R1/0.859;                #in Ohm
fo=2000;            #in Hz

#Calculations&Results
print "R2 is %.0f Ohm\n"%R2; 
C=1./(2*R1*fo)*10**11;
print "C is %e F\n"%C; 
R2 is 11641 Ohm

C is 2e+03 F

Example 9.7, Page 327

In [2]:
#Variable declaration
Vp=12;          #in V
R1=4700;            #in Ohm
R2=2000;            #in Ohm
R3=20000.;            #in Ohm
C=1.1*10**-9;            #in Farad

#Calculations&Results
Vc=Vp*(R3/(R2+R3));
print "The control Voltage is  = %.2f V\n"%Vc; 
fo=2*(Vp-Vc)/(Vp*R1*C)*10**-3;
print "Output frequency  = %.2f Hz\n"%fo;
The control Voltage is  = 10.91 V

Output frequency  = 35.17 Hz

Example 9.8, Page 328

In [2]:
#Variable declaration
Vp=12;          #in V
R1=4700;            #in Ohm
R2=2000;            #in Ohm
R3=20000.;            #in Ohm
C=1.1*10**-9;            #in Farad

#Calculations&Results
Vc=Vp*(R3/(R2+R3));
#for minimum Vc
Vcmin=Vc-0.5;
print "The control Voltage is  = %.2f V\n"%Vcmin
fo=2*(Vp-Vcmin)/(Vp*R1*C);
print "Output frequency  = %.0f Hz\n"%fo;  
#for maximum Vc
print "For minimum frequency Use maximum Vc";
Vcmin1=Vc+0.5;
print "The control Voltage is  = %.2f V\n"%Vcmin1;  
fo=2*(Vp-Vcmin1)/(Vp*R1*C);
print "Output frequency  = %.0f Hz\n"%fo;  
The control Voltage is  = 10.41 V

Output frequency  = 51287 Hz

For minimum frequency Use maximum Vc
The control Voltage is  = 11.41 V

Output frequency  = 19049 Hz

Example 9.9, Page 333

In [14]:
import math

#Variable declaration
Vp=6;          #in V
R1=4000;            #in Ohm
C=330*10**-12;            #in Farad
C2=270*10**-12;            #in Farad

#Calculations&Results
fo=0.3/(R1*C);
print "Free running  frequency  = %.1f kHz\n"%(fo*10**-3)
fl=8*fo/Vp;
print "Lock Range  = %.f kHz\n"%(fl*10**-3)
fc=math.sqrt(2*math.pi*fl/(3600*C2))/(2*math.pi)*10**-3;
print "Capture Range  = %.1f kHz\n"%fc;  
Free running  frequency  = 227.3 kHz

Lock Range  = 303 kHz

Capture Range  = 222.8 kHz

Example 9.10, Page 336

In [21]:
#Variable declaration
R=10000;            #in Ohm
print "Value of Assumed resistance is  = %.0f Ohm\n"%R; 

#Calculations
Tout=100*10**-6;
C=Tout/(1.1*R);

#Results
print "Value of Capacitance is  = %.2f F\n"%(C*10**9); 
print "The nearest value would be 10nF";
Value of Assumed resistance is  = 10000 Ohm

Value of Capacitance is  = 9.09 F

The nearest value would be 10nF

Example 9.11, Page 340

In [34]:
#Variable declaration
f=2000;         #/in Hz
DC=0.8;

#Calculations&Results
T=1./f;
Thigh=DC*T;
print "T high is  = %.f uSec\n"%(Thigh*10**6);  
Tlow=T-Thigh;
print "T low is  = %.f uSec\n"%(Tlow*10**6);  
#assumption
Rb=10000;            #in Ohm
#Tlow=0.69RC
C1=Tlow/(0.69*Rb);
print "Value of Capacitance C is  = %.10f F\n"%(C1*10**9);  
#Thigh=0.69(Ra+Rb)
Ra=Thigh/(0.69*C1)-Rb;
print "Value of resistance Ra is  = %.0f Ohm\n"%Ra;  
T high is  = 400 uSec

T low is  = 100 uSec

Value of Capacitance C is  = 0.0000000145 F

Value of resistance Ra is  = 30000 Ohm

Example 9.12, Page 343

In [23]:
#Variable declaration
R=110000;            #in Ohm
C=0.1*10**-6;            #in Farad

#Calculations&Results
print "When C=0.1microF"

fomin=0.15/(R*C);
print "For low range with lowest   frequency  = %.1f Hz\n"%fomin;  
#
R1=10000;            #in Ohm
fomax=0.15/(R1*C);
print "For low range with highest  frequency  = %.1f Hz\n"%fomax;  
#
print "When C=0.01microF"
R=110000;            #in Ohm
C=0.01*10**-6;            #in Farad
fomin=0.15/(R*C);
print "For low range with lowest   frequency  = %.1f Hz\n"%fomin;  
#
R1=10000;            #in Ohm
fomax=0.15/(R1*C);
print "For low range with highest  frequency  = %.1f Hz\n"%fomax;  
#
print "When C=0.001microF"
R=110000;            #in Ohm
C=0.001*10**-6;            #in Farad
fomin=0.15/(R*C);
print "For low range with lowest   frequency  = %.1f Hz\n"%fomin;  
#
R1=10000;            #in Ohm
fomax=0.15/(R1*C);
print "For low range with highest  frequency  = %.1f Hz\n"%fomax;  
When C=0.1microF
For low range with lowest   frequency  = 13.6 Hz

For low range with highest  frequency  = 150.0 Hz

When C=0.01microF
For low range with lowest   frequency  = 136.4 Hz

For low range with highest  frequency  = 1500.0 Hz

When C=0.001microF
For low range with lowest   frequency  = 1363.6 Hz

For low range with highest  frequency  = 15000.0 Hz