Chapter 32 , Non-Sinusoidal Oscillators

Example 32.1 , Page Number 816

In [1]:
import math
import numpy
%matplotlib inline
from matplotlib.pyplot import plot,title,xlabel,ylabel

#Variables

VCC = 10.0                     #Supply voltage (in volts)
VBB = 5.0                      #Voltage across base (in volts)
RC = 200.0                     #Collector resistance (in ohm)

#Calculation

#Upper end point
ic = VCC / RC                  #Collector current (in Ampere)
VCE = VCEsat = 0               #Collector-to-emitter voltage (in volts)

#lower cut-off point
ic1 = 0                        #Collector current (in Ampere) 
VCE1 = VCC                     #Collector-to-emitter voltage (in volts)  

#Result

print "The upper end point is ic = ",ic * 10**3," mA.\nThe lower end point is VCE = ",VCE1," V."

#Graph

x = numpy.linspace(0,VCE1,100)
plot(x,ic*10**3 - ic*10**3/VCE1*x)
title("d.c. load line")
xlabel("Collector-to-emitter voltage VCE (V)")
ylabel("Collector current IC (mA)")
The upper end point is ic =  50.0  mA.
The lower end point is VCE =  10.0  V.
Out[1]:
<matplotlib.text.Text at 0x60d9af0>

Example 32.2 , Page Number 822

In [2]:
import math

#Variables

R1 = R2 = R = 20.0 * 10**3              #Resistance (in ohm)
C1 = C2 = C = 100.0 * 10**-12           #Capacitance (in Farad)    

#Calculation

f = 1/(1.38 * R * C)                    #Frequency (in Hertz) 

#Result

print "Frequency of oscillation is ",round(f * 10**-3)," kHz."
Frequency of oscillation is  362.0  kHz.

Example 32.3 , Page Number 822

In [3]:
import math

#Variables

R1 = 2.0 * 10**3         #Resistance (in ohm)
R2 = 20.0 * 10**3        #Resistance (in ohm)
C1 = 0.01 * 10**-6       #Capacitance (in Farad)
C2 = 0.05 * 10**-6       #Capacitance (in Farad)

#Calculation

T = 0.69*(R1*C1 + R2*C2) #Time periode of oscillation (in seconds)
f = 1/T                  #Frequency of oscillation (in Hertz)

#Result

print "Time period of oscillation is ",round(T * 10**3,1)," ms.\nFrequency of oscillation is ",round(f * 10**-3,2)," kHz."

#Slight variation due to higher precision.
Time period of oscillation is  0.7  ms.
Frequency of oscillation is  1.42  kHz.

Example 32.4 , Page Number 822

In [4]:
import math

#Variables

T1 = 1.0 * 10**-6                #Pulse width (in seconds)
f = 100.0 * 10**3                #Frequency (in Hertz)
R1 = R2 = 10.0 * 10**3           #Resistance (in ohm)

#Calculation

T = 1/f                          #Time period of oscillation (in seconds) 
C1 = T1 / 0.69 / R1              #Capacitance (in Farad)
T2 = T - T1                      #Time period (in seconds) 
C2 = T2 / 0.69 / R2              #Capacitance (in Farad)

#Result

print "Value of C1 capacitor is ",round(C1 * 10**12)," pico-Farad.\nValue of C2 capacitor is ",round(C2 * 10**12)," pico-Farad."
Value of C1 capacitor is  145.0  pico-Farad.
Value of C2 capacitor is  1304.0  pico-Farad.

Example 32.5 , Page Number 823

In [5]:
import math

#Variables

T2A = 310.0 * 10**-6            #Time period (in seconds)
T2B = 250.0 * 10**-6            #Time period (in seconds)
VCC = 15.0                      #Supply voltage (in volts)
ICsat = 5.0 * 10**-3            #Saturated collector current (in Ampere)
hFEmin = 20.0                   #Current gain

#Calculation

RC = VCC / ICsat                #Collector resistance (in ohm)
RC1 = RC2 = RC                  #Collector resistance of transistors Q1 and Q2 (in ohm)              
IBsat = ICsat / hFEmin          #Saturated Base current (in Ampere)
IB = 2 * IBsat                  #Base current (in Ampere)
R1 = R2 = R = VCC / IB          #Resistance (in ohm)
C1 = T2A / 0.69 / R1            #Capacitance (in Farad)
C2 = T2B / 0.69 / R2            #Capacitance (in Farad)
t1 = R1 * C1                    #Time constant1 (in seconds)
t2 = R2 * C2                    #Time constant2 (in seconds)
t11 = RC1 * C1                  #Time constant (in seconds)
t12 = RC1 * C2                  #Time constant (in seconds)

#Result

print "Rc : ",RC," ohm.\nRC1 : ",RC1," ohm.\nIBsat : ",IBsat," A.\nIB : ",IB," A.\nR1 : ",R1*10**-3," kilo-ohm.\nR2 : ",R2*10**-3," kilo-ohm.\nC1 : ",round(C1 * 10**12)," pico-Farad.\nC2 : ",round(C2*10**12)," pico-Farad."
print "Output waveform time constants :\nt1 = ",round(t1 * 10**6,1)," micro-second.\nt2 : ",round(t2 * 10**6,1)," micro-second\nt11 : ",round(t11 * 10**6,1)," micro-second\nt12 : ",round(t12 * 10**6,1)," micro-second." 

#In some places milli seconds is mentioned in place of micro second in book.
Rc :  3000.0  ohm.
RC1 :  3000.0  ohm.
IBsat :  0.00025  A.
IB :  0.0005  A.
R1 :  30.0  kilo-ohm.
R2 :  30.0  kilo-ohm.
C1 :  14976.0  pico-Farad.
C2 :  12077.0  pico-Farad.
Output waveform time constants :
t1 =  449.3  micro-second.
t2 :  362.3  micro-second
t11 :  44.9  micro-second
t12 :  36.2  micro-second.

Example 32.6 , Page Number 826

In [6]:
import math

#Variables

f = 20.0 * 10**3            #Frequency (in Hertz)
tp = 5.0 * 10**-6           #Pulse duration (in seconds)        

#Calculation

T = 1/f                     #Time period (in seconds)
duty_cycle = tp / T         #Duty cycle of monostable multivibrator  

#Result

print "The duty cycle of the waveform at the output (Q) of the monostable multivibrator is ",duty_cycle * 100,"%."
The duty cycle of the waveform at the output (Q) of the monostable multivibrator is  10.0 %.

Example 32.7 , Page Number 826

In [7]:
import math

#Variables

f = 100.0 * 10**3              #Frequency (in Hertz)
C1 = 0.001 * 10**-6            #Capacitance (in Farad)   

#Calculation

duty_cycle = 0.5               #Duty cycle 
T = 1/f                        #Time period (in seconds)
tp = duty_cycle * T            #Pulse width (in seconds)       
R3 = tp / 0.69 / C1            #Resistance (in ohm)   

#Result

print "Value of R3 is ",round(R3 * 10**-3,3)," kilo-ohm and value of C1 is ",C1 * 10**9," nF."   
Value of R3 is  7.246  kilo-ohm and value of C1 is  1.0  nF.

Example 32.8 , Page Number 834

In [8]:
import math

#Variables

R1 = 2.2 * 10**3                     #Resistance (in ohm)
C1 = 0.01 * 10**-6                   #Capacitance (in Farad)

#Calculation

tp = 1.1 * R1 * C1                   #Pulse width (in seconds)

#Result

print "The pulse width is ",tp * 10**6," micro-second."
The pulse width is  24.2  micro-second.

Example 32.9 , Page Number 834

In [9]:
import math

#Variables

C = 1000.0 * 10**-12             #Capacitance (in Farad) 
tp = 10.0 * 10**-6               #Pulse width (in seconds)
T = 60.0 * 10**-6                #time period (in seconds) 

#Calculation

R1 = tp / (1.1 * C)              #Resistance (in ohm)               

#Result

print "Resistance required is ",round(R1 * 10**-3,2)," kilo-ohm."
Resistance required is  9.09  kilo-ohm.

Example 32.10 , Page Number 836

In [10]:
import math

#Variables

R1 = 6.8 * 10**3                #Resistance (in ohm)
R2 = 4.7 * 10**3                #Resistance (in ohm)
C1 = 1000.0 * 10**-12           #Capacitance (in Farad) 

#Calculation

t2 = 0.7 * R2 * C1              #Time interval2 (in seconds)
t1 = 0.7 * (R1 + R2 ) * C1      #Time interval1 (in seconds)  
T = t1 + t2                     #Total time (in seconds)
duty_cycle = t1 / T * 100       #Duty cycle of the waveform 

#Result

print "t1 is ",t1 * 10**6," micro-seconds.\nt2 is ",t2 * 10**6," micro-seconds.\nDuty cycle is ",round(duty_cycle),"%."
t1 is  8.05  micro-seconds.
t2 is  3.29  micro-seconds.
Duty cycle is  71.0 %.

Example 32.11 , Page Number 837

In [11]:
import math

#Variables

R1 = 27.0 * 10**3                  #Resistance (in ohm)
R2 = 56.0 * 10**3                  #Resistance (in ohm)  
C1 = 0.01 * 10**-6                 #Capacitance (in Farad)    

#Calculation

t2 = 0.7 * R2 * C1                 #Time interval2 (in seconds)
t1 = 0.7 * (R1 + R2 ) * C1         #Time interval1 (in seconds)  
T = t1 + t2                        #Total time (in seconds)
f = 1 / T                          #Frequency (in Hertz)
duty_cycle = t1 / T * 100          #Duty cycle of the waveform 

#Result

print "Frequency is ",round(f * 10**-3,2)," kHz.\nDuty cycle is ",round(duty_cycle),"%." 

#In book it forgot to mention the duty_cycle.
Frequency is  1.03  kHz.
Duty cycle is  60.0 %.

Example 32.12 , Page Number 838

In [12]:
import math

#Variables

f = 50.0 * 10**3               #Frequency (in Hertz)
duty_cycle = 0.6               #Duty cycle
C = 0.0022 * 10**-6            #Capacitance (in Farad)             

#Calculation

T = 1/f                        #Time period (in seconds)
t1 = duty_cycle * T            #time interval1 (in seconds)
t2 = T - t1                    #time interval2 (in seconds)
R2 = t2 / (0.7 * C )           #Resistance (in ohm)  
R1 = t1 / (0.7 * C) - R2       #Resistance (in ohm) 

#Result

print "Time period is ",T * 10**3,"ms.\nt1 is ",t1 * 10**3," ms.\nt2 is ",t2 * 10**3," ms.\nR2 is ",round(R2 * 10**-3,2)," kilo-ohm.\nR1 is ",round(R1 * 10**-3,1)," kilo-ohm."
Time period is  0.02 ms.
t1 is  0.012  ms.
t2 is  0.008  ms.
R2 is  5.19  kilo-ohm.
R1 is  2.6  kilo-ohm.