CHAPTER 23 OSCILLATORS

Example 23-1, Page 897

In [15]:
import math

R1=100.0*10**3                        #non-inverting input resistance wiper R1(Ohm)
R2=1.0*10**3                          #non-inverting input resistance R2(Ohm)
C=0.01*10**-6                         #capacitance at non-inverting input(F)

R=R1+R2                                         #max. total resistance(Ohm)
fr1=(2*math.pi*R*C)**-1                          #minimum frequency(Hz)
R=R2                                            #min. total resistance(Ohm)
fr2=(2*math.pi*R*C)**-1                          #maximum frequency(Hz)

print 'minimum frequency fr = ',round(fr1,2),'Hz'
print 'maximum frequency fr = ',round((fr2/1000),2),'KHz'
minimum frequency fr =  157.58 Hz
maximum frequency fr =  15.92 KHz

Example 23-2, Page 897

In [4]:
Rf=2                         #feedback resistance(KOhm)
Rl=1                         #lamp resistance(KOhm)
Vl=2                         #lamp voltage(V)

Il=Vl/Rl                     #lamp current(mA)
Vout=Il*(Rf+Rl)              #output voltage of oscillator(V)

print 'Lamp current = ',Il,'mA'
print 'output voltage of oscillator = ',Vout,'Vrms'
Lamp current =  2 mA
output voltage of oscillator =  6 Vrms

Example 23-3, Page 904

In [14]:
C1=0.001*10**-6                     #capacitance in oscillator(F)
C2=0.01*10**-6                      #capacitance in oscillator(F)
L=15*10**-6                         #inductance(H)

C=C1*C2/(C1+C2)                    #equivalent capacitance(F)
fr=(2*math.pi*((L*C)**0.5))**-1     #oscillation frequency(Hz)
B=C1/C2                            #feedback fraction
Av_min=C2/C1                       #minimum voltage gain

print 'feedback fraction B = ',B
print 'oscillation frequency fr = ',round((fr*10**-6),2),'MHz'
print 'minimum voltage gain Av(min) = ',Av_min
feedback fraction B =  0.1
oscillation frequency fr =  1.36 MHz
minimum voltage gain Av(min) =  10.0

Example 23-4, Page 908

In [13]:
C1=0.001*10**-6                     #capacitance in oscillator(F)
C2=0.01*10**-6                      #capacitance in oscillator(F)
C3=50.0*10**-12                     #capacitance in oscillator(F)
L=15*10**-6                         #inductance(H)

C=(C1**-1+C2**-1+C3**-1)**-1                  #equivalent capacitance(F)
fr=(2*math.pi*((L*C)**0.5))**-1                #oscillation frequency(Hz)

print 'oscillation frequency fr = ',round((fr*10**-6),2),'MHz'
oscillation frequency fr =  5.97 MHz

Example 23-5, Page 912

In [16]:
import math

Cs=0.05*10**-12                       #series capacitance in oscillator(F)
Cm=10.0*10**-12                       #capacitance in oscillator(F)
R=2.0*10**3                           #resistance in oscillator(Ohm)
L=3                                   #inductance(H)

fs=(2*math.pi*((L*Cs)**0.5))**-1                #series resonant frequency(Hz)
Cp=Cs*Cm/(Cs+Cm)                               #equvalent parallel capacitance(F)
fp=(2*math.pi*((L*Cp)**0.5))**-1                #parallel resonant frequency(Hz)

print 'series resonant frequency fs = ',math.ceil(fs*10**-3),'KHz'
print 'parallel resonant frequency fp = ',math.ceil(fp*10**-3),'KHz'
series resonant frequency fs =  411.0 KHz
parallel resonant frequency fp =  412.0 KHz

Example 23-6, Page 918

In [14]:
VCC=12.0                              #given supply voltage(V)
R=33*10**3                            #given resistance(Ohm)
C=0.47*10**-6                         #given capacitance(F)

LTP=VCC/3                             #trip point LTP (V)
UTP=2*LTP                             #trip point UTP (V)
W=1.1*R*C                             #pulse width of output(s)

print 'trigger voltage LTP = ',LTP,'V'
print 'trigger voltage UTP = ',UTP,'V'
print 'pulse width W = ',W*10**3,'ms'
trigger voltage LTP =  4.0 V
trigger voltage UTP =  8.0 V
pulse width W =  17.061 ms

Example 23-7, Page 919

In [6]:
R=10*10**6                            #given resistance(Ohm)
C=470*10**-6                          #given capacitance(F)

W=1.1*R*C                             #pulse width of output(s)

print 'pulse width W = ',W,'s = ',round((W/3600),2),'hours'
pulse width W =  5170.0 s =  1.44 hours

Example 23-8, Page 922

In [7]:
R1=75.0*10**3                            #given resistance1(Ohm)
R2=30.0*10**3                            #given resistance2(Ohm)
C=47.0*10**-9                            #given capacitance(F)

f=1.44/((R1+(2*R2))*C)                 #frequency (Hz)
D=(R1+R2)/(R1+(2*R2))                  #duty cycle     

print 'frequency f = ',round(f,2),'Hz' 
print 'duty cycle D = ',round((D*100),2),'%'
frequency f =  226.95 Hz
duty cycle D =  77.78 %

Example 23-9, Page 923

In [9]:
import math

VCC=12.0                                 #given supply voltage(V)
R1=75.0*10**3                            #given resistance1(Ohm)
R2=30.0*10**3                            #given resistance2(Ohm)
C=47.0*10**-9                            #given capacitance(F)
Vcon1=11                                 #given Vcon(V)     
Vcon2=1                                  #given Vcon(V)     

W1=-(R1+R2)*C*(math.log((VCC-Vcon1)/(VCC-(0.5*Vcon1))))     #pulse width(s)
T1=W1+(0.693*R2*C)                                          #period(s)
D1=W1/T1                                                    #duty cycle
f1=1/T1                                                     #frequency(Hz)
W2=-(R1+R2)*C*(math.log((VCC-Vcon2)/(VCC-(0.5*Vcon2))))     #pulse width(s)
T2=W2+(0.693*R2*C)                                          #period(s)
D2=W2/T2                                                    #duty cycle
f2=1/T2                                                     #frequency(Hz)

print 'For Vcon = 11V,'
print 'frequency f = ',round(f1,2),'Hz'
print 'duty cycle D = ',round((D1*100),2),'%'
print 'For Vcon = 1V,'
print 'frequency f = ',round(f2,2),'Hz'
print 'duty cycle D = ',round((D2*100),2),'%'
For Vcon = 11V,
frequency f =  97.9 Hz
duty cycle D =  90.43 %
For Vcon = 1V,
frequency f =  835.77 Hz
duty cycle D =  18.33 %

Example 23-10, Page 927

In [10]:
VCC=12.0                                 #given supply voltage(V)
R=9.1*10**3                              #given resistance(Ohm)
C=0.01*10**-6                            #given capacitance(F)
f=2.5*10**3                              #given frequency(Hz)
Vmod=2                                   #peak value of modulating signal(V)                         

T=1/f                                    #period of output pulse(s)
W=1.1*R*C                                #pulse width(s)
UTP_max=(2*VCC/3)+Vmod                   #maximum UTP(V)
UTP_min=(2*VCC/3)-Vmod                   #minimum UTP(V)
Wmin=-R*C*(math.log(1-(UTP_min/VCC)))    #minimum pulse width(s)
Wmax=-R*C*(math.log(1-(UTP_max/VCC)))    #maximum pulse width(s)
Dmin=Wmin/T                              #minimum duty cycle
Dmax=Wmax/T                              #maximum duty cycle

print 'period of output pulse T = ',T*10**6,'us'
print 'Quiscent pulse width W = ',W*10**6,'us'
print 'minimum UTP = ',UTP_min,'V'
print 'maximum UTP = ',UTP_max,'V'
print 'minimum pulse width W(min) = ',round((Wmin*10**6),2),'us'
print 'maximum pulse width W(max) = ',round((Wmax*10**6),2),'us'
print 'minimum duty cycle D(min) = ',round((Dmin*100),2),'%'
print 'maximum duty cycle D(max) = ',round((Dmax*100),2),'%'
period of output pulse T =  400.0 us
Quiscent pulse width W =  100.1 us
minimum UTP =  6.0 V
maximum UTP =  10.0 V
minimum pulse width W(min) =  63.08 us
maximum pulse width W(max) =  163.05 us
minimum duty cycle D(min) =  15.77 %
maximum duty cycle D(max) =  40.76 %

Example 23-11, Page 928

In [11]:
VCC=12.0                                 #given supply voltage(V)
R1=3.9*10**3                             #given resistance(Ohm)
R2=3*10**3                               #given resistance(Ohm)
C=0.01*10**-6                            #given capacitance(F)
Vmod=1.5                                 #peak value of modulating signal(V)                         

W=0.693*(R1+R2)*C                                              #pulse width(s)
T=0.693*(R1+(2*R2))*C                                          #period of output pulse(s)
UTP_max=(2*VCC/3)+Vmod                                         #maximum UTP(V)
UTP_min=(2*VCC/3)-Vmod                                         #minimum UTP(V)
Wmin=-(R1+R2)*C*(math.log((VCC-UTP_min)/(VCC-(0.5*UTP_min))))  #minimum pulse width(s)
Wmax=-(R1+R2)*C*(math.log((VCC-UTP_max)/(VCC-(0.5*UTP_max))))  #minimum pulse width(s)
Tmin=Wmin+(0.693*R2*C)                                         #minimum period(s)
Tmax=Wmax+(0.693*R2*C)                                         #maximum period(s)
s=0.693*R2*C                                                   #space(s)

print 'period of output pulse T = ',T*10**6,'us'
print 'Quiscent pulse width W = ',W*10**6,'us'
print 'minimum UTP = ',UTP_min,'V'
print 'maximum UTP = ',UTP_max,'V'
print 'minimum pulse width W(min) = ',round((Wmin*10**6),2),'us'
print 'maximum pulse width W(max) = ',round((Wmax*10**6),2),'us'
print 'minimum period T(min) = ',round((Tmin*10**6),2),'us'
print 'maximum period T(max) = ',round((Tmax*10**6),2),'us'
print 'space = ',round((s*10**6),2),'us'
period of output pulse T =  68.607 us
Quiscent pulse width W =  47.817 us
minimum UTP =  6.5 V
maximum UTP =  9.5 V
minimum pulse width W(min) =  32.04 us
maximum pulse width W(max) =  73.47 us
minimum period T(min) =  52.83 us
maximum period T(max) =  94.26 us
space =  20.79 us

Example 23-12, Page 929

In [35]:
VCC=15.0                                 #given supply voltage(V)
C=100*10**-9                             #given capacitance(F)
Ic=1*10**-3                              #collector current (A)

S=Ic/C                               #slope(V/s)             
V=2*VCC/3                            #peak value(V)
T=V/S                                #duration of ramp(s)     

print 'slope is ',S/1000,'V/ms'
print 'Peak value V = ',V,'V'
print 'duration of ramp = ',T*10**3,'ms'
slope is  10.0 V/ms
Peak value V =  10.0 V
duration of ramp =  1.0 ms

Example 23-13, Page 938

In [37]:
R=10*10**3                                #given resistance(Ohm)
C=0.01*10**-6                             #given capacitance(F)

f0=(R*C)**-1                              #output frequency(Hz)

print 'output frequency f0 = ',f0/1000,'KHz' 
output frequency f0 =  10.0 KHz

Example 23-14, Page 938

In [12]:
R1=1.0*10**3                                #given resistance(Ohm)
R2=2.0*10**3                                #given resistance(Ohm)
C=0.1*10**-6                                #given capacitance(F)

f=(2/C)*((R1+R2)**-1)                     #output frequency(Hz)
D=R1/(R1+R2)                              #duty cycle

print 'output frequency f = ',round((f/1000),2),'KHz' 
print 'duty cycle = ',round((D*100),2),'%'
output frequency f =  6.67 KHz
duty cycle =  33.33 %
In [ ]: