Chapter05 : Waveform Generators

Exa 5.1 : page 170

In [2]:
from __future__ import division
# given data 
fo=1 #in KHz
# assume R1=1 Kohm and C=1 uF
R1=1 #in Kohm
C=1 #in uF
R2=1.16*R1 #in Kohm
R=1/(2*fo*10**3*C*10**-6)
print "Value of R1 = %0.2f kohm" %R1
print "Value of R2 = %0.2f kohm" %R2
print "Value of R = %0.2f ohm" %R
print "Value of C = %0.2f uF"%C
Value of R1 = 1.00 kohm
Value of R2 = 1.16 kohm
Value of R = 500.00 ohm
Value of C = 1.00 uF

Exa 5.2 : page 170

In [3]:
from math import log
# given data 
fo=1 #in KHz
BETA=0.6 #unitless
print "As choosing R1=1 Kohm"
# assume R1=1 Kohm and C=1 uF
R1=1 #in Kohm
C=1 #in uF
R=1/(2*fo*10**3*C*10**-6*log((1+BETA)/(1-BETA))) 
print "Value of R = %0.2f ohm"%R
#Answer in the book is wrong
As choosing R1=1 Kohm
Value of R = 360.67 ohm

Exa 5.3 : page 170

In [5]:
# given data 
BETA=0.41 #unitless
R=2.7 #in Kohm
C=0.1 #in uF
fo=1/(2*R*C*log((1+BETA)/(1-BETA))) #in KHz
print "Output signal frequency = %0.3f khz"%fo,
Output signal frequency = 2.126 khz

Exa 5.4 : page 171

In [6]:
# given data 
Ton=100 #in mSEC
Toff=200 #in mSEC
BETA=0.2 #unitless
#Let R1=1 Kohm
R1=1 #in Kohm
R2=R1*(1-BETA)/BETA #in Kohm
# Assuming C=10 uF
C=10 #in uF
R3=Ton*10**-3/(C*10**-6*0.41) #in Kohm
R4=Toff*10**-3/(C*10**-6*0.41) # in Kohm
print "Value of R1 = %0.2f kohm"%R1
print "Value of R2 = %0.2f kohm"%R2
print "Value of R3 = %0.2f kohm"%(R3/1000)
print "Value of R4 = %0.2f kohm"%(R4/1000)
print "Value of C = %0.2f uF"%C
Value of R1 = 1.00 kohm
Value of R2 = 4.00 kohm
Value of R3 = 24.39 kohm
Value of R4 = 48.78 kohm
Value of C = 10.00 uF

Exa 5.5 : page 171

In [8]:
# given data 
Vo=7.5 #in Volt
fo=1 # in KHz
DutyCycle=60 #in %
Vz=6.8 # in volt
Vz1=6.8 # in volt
Vz2=6.8 # in volt
VD=0.7 # in volt
T=1/fo #in mSec
# duty cycle 60% gives Ton & Toff
Ton=0.6*T #in mSec
Toff=T-Ton #in mSec
# choosing R2=1.16*R1
R1=1 #in Kohm
C=0.1 #in uF
R2=1.16*R1 #in Kohm
R3=Ton*10**-3/(C*10**-6) #in ohm
R4=Toff*10**-3/(C*10**-6) #in ohm
print "Value of R1 = %0.2f kohm"%R1
print "Value of R2 = %0.2f kohm"%R2
print "Value of R3 = %0.2f kohm"%(R3/1000)
print "Value of R4 = %0.2f kohm"%(R4/1000)
print "Value of C = %0.2f uF"%C
Value of R1 = 1.00 kohm
Value of R2 = 1.16 kohm
Value of R3 = 6.00 kohm
Value of R4 = 4.00 kohm
Value of C = 0.10 uF

Exa 5.6 : page 179

In [9]:
# given data 
RA=6.8 #in Kohm
RB=3.3 #in Kohm
C=0.1 #in uF
fo=1.45/((RA+2*RB)*C) # in KHz
d=(RA+RB)/(RA+2*RB) 
print "Frequency of oscillation = %0.2f khz"%fo
print "Duty cycle = %0.2f %%" %(d*100)
Frequency of oscillation = 1.08 khz
Duty cycle = 75.37 %

Exa 5.7 : page 179

In [12]:
# given data 
fo=50 #in kHz
d=75/100 #unitless
C=1 #in nF
print "RA+2RB=28.9 kohm" 
print "d=0.75=(RA+RB)/(RA+2*RB)" 
print "It gives RA=2*RB" 
RA=28.9/2 # in kohm
RB=RA/2 #in kohm
print "Value of RA = %0.1f kohm " %RA
print "Value of RB = %0.2f kohm " %RB
RA+2RB=28.9 kohm
d=0.75=(RA+RB)/(RA+2*RB)
It gives RA=2*RB
Value of RA = 14.4 kohm 
Value of RB = 7.22 kohm 

Exa 5.8 : page 180

In [13]:
# given data 
fo=800 # in Hz
d=60/100 #unitless
T=1/fo #in Sec
TC=0.6*T #in Sec
TD=T-TC #in Sec
C=0.01 #in uF
C2=10 #in uF
RB=TD/(0.69*C*10**-6) #in ohm
RA=(TC-0.69*RB*C*10**-6)/(0.69*C*10**-6) #in ohm
print "Value of RA = %0.2f kohm " %(RA/1000)
print "Value of RB = %0.2f kohm " %(RB/1000)
print "Value of C = %0.2f uF" %C
print "Value of C2 = %0.2f uF" %C2
Value of RA = 36.23 kohm 
Value of RB = 72.46 kohm 
Value of C = 0.01 uF
Value of C2 = 10.00 uF

Exa 5.9 : page 180

In [16]:
# given data 
fo=700 # in Hz
d=50/100 #unitless
T=1/fo #in Sec
TC=0.5*T #in Sec
TD=T-TC #in Sec
C=0.1 #in uF
RB=TD/(0.69*C*10**-6) #in ohm
RA=TC/(0.69*C*10**-6) #in ohm
print "Value of RA = %0.1f kohm " %(RA/1000)
print "Value of RB = %0.1f kohm " %(RB/1000)
print "We have TC = TD = %0.3f ms" %(TC*1000)
Value of RA = 10.4 kohm 
Value of RB = 10.4 kohm 
We have TC = TD = 0.714 ms

Exa 5.10 : page 181

In [17]:
# given data 
fo=1 # in KHz
d=40/100 #unitless
T=1/fo #in Sec
TC=0.4*T #in mSec
TD=T-TC #in mSec
C=0.1 #in uF
RB=TD*10**-3/(0.69*C*10**-6) #in ohm
RA=TC*10**-3/(0.69*C*10**-6) #in ohm
print "Value of RA = %0.2f kohm " %(RA/1000)
print "Value of RB = %0.2f kohm " %(RB/1000)
print "We have TC = %0.2f ms" %(TC)
print "We have TD = %0.2f ms" %(TD)
Value of RA = 5.80 kohm 
Value of RB = 8.70 kohm 
We have TC = 0.40 ms
We have TD = 0.60 ms

Exa 5.11 : page 186

In [18]:
# given data 
T=100 # in uSec
C=15 #in 
R=T*10**-6/(1.1*C*10**-9) #in ohm
print "To obtain a output pulse at 100uSec resistor required = %0.2f kohm"%(R/1000)
#Note : in the question 15uF is given but in the solution 15nF is used in the book
To obtain a output pulse at 100uSec resistor required = 6.06 kohm

Exa 5.12 : page 187

In [20]:
# given data 
VCC=15 #in Volt
T=10 #in mSec
ILED=20 #in mA
Vf=1.4 #in Volt
VBE=0.7 #in Volt
VCEsat=0.2 #in Volt
C=0.22 #in uF
R=T*10**-3/(1.1*C*10**-6) #in ohm
#output of the device 
Vo=VCC-2*VBE-VCEsat 
R5=(Vo-Vf)/(ILED*10**-3) #in ohm
print "Value of R = %0.2f kohm" %(R/1000)
print "Output of the device = %0.2f Volt" %(Vo)
print "Value of RB = %0.2f ohm" %(R5)
Value of R = 41.32 kohm
Output of the device = 13.40 Volt
Value of RB = 600.00 ohm

Exa 5.13 : page 187

In [21]:
# given data 
fo=2 # in KHz
C=0.01 #in uF
T=1/fo #in mSec
tp=1.2*T #in mSec
R=tp*10**-3/(1.1*C*10**-6) #in ohm
print "Period of trigger pulse = %0.2f ms" %(tp)
print "Value of R = %0.2f kohm"%(R/1000)
Period of trigger pulse = 0.60 ms
Value of R = 54.55 kohm

Exa 5.14 : page 193

In [22]:
# given data 
fo=2 # in KHz
Vopp=5 #in volts
Vsat=13 #in Volts
# Let the value of R2 used be 10 Kohm 
R2=10 #in Kohm
R3=(2*R2*Vsat)/Vopp #in Kohm 
# Let C1=0.1 uF
C1=0.1 # in uF
R1=R3/(4*fo*10**3*C1*10**-6*R2) # in ohm
print "Value of R1 = %0.2f kohm" %(R1/1000)
print "Value of C1 = %0.2f uF" %(C1)
print "Value of R2 = %0.2f kohm" %R2
print "Value of R3 = %0.2f kohm" %R3 
Value of R1 = 6.50 kohm
Value of C1 = 0.10 uF
Value of R2 = 10.00 kohm
Value of R3 = 52.00 kohm

Exa 5.15 : page 193

In [23]:
# given data 
Vcc=12 #in Volt
R1=10 #in Kohm
R2=100 #in Kohm
R3=820 #in Kohm
# Let Vsat=10 volt
Vsat=10 #in volt
# part (a)
Vopp=2*R2*Vsat/R3 #in Volt
print "Amplitude of triangular wave = %0.2f Volt" %(Vopp)
Vopp=Vsat-(-Vsat) # in Volt
print "Amplitude of square wave = %0.2f Volt" %(Vopp)
# part (b)
C1=0.1 # in uF
fo=R3*1000/(4*R1*1000*R2*1000*C1*10**-6) # in Hz
print "Frequency = %0.2f kHz" %(fo/1000)
Amplitude of triangular wave = 2.44 Volt
Amplitude of square wave = 20.00 Volt
Frequency = 2.05 kHz

Exa 5.16 : page 205

In [24]:
from math import sqrt, pi
# given data 
fo=1 # in KHz
# choose C=.01 uF
C=.01 # in uF
R=1/(2*pi*sqrt(6)*fo*1000*C*10**-6) # in ohm
R1=35.6 # in  Kohm
RF=29*R1 #in ohm
print "Value of C = %0.2f uF" %(C)
print "Value of R = %0.2f kohm" %(R/1000)
print "Value of R1 = %0.2f kohm" %R1
print "Value of RF = %0.2f Mohm" %(RF/1000) 
# Note : Answer in the book is wrong
Value of C = 0.01 uF
Value of R = 6.50 kohm
Value of R1 = 35.60 kohm
Value of RF = 1.03 Mohm

Exa 5.17 : page 206

In [25]:
from math import sqrt, pi
# given data 
fo=1 # in KHz
# choose C=.01 uF
C=.01 # in uF
R=1/(2*pi*fo*1000*C*10**-6) # in ohm
# choosing R1=10 Kohm
R1=10 # in Kohm
RF=2*R1 #in Kohm
print "Value of C = %0.2f uF" %(C)
print "Value of R = %0.2f kohm" %(R/1000)
print "Value of R1 = %0.2f kohm" %R1
print "Value of RF = %0.2f kohm" %(RF) 
Value of C = 0.01 uF
Value of R = 15.92 kohm
Value of R1 = 10.00 kohm
Value of RF = 20.00 kohm

Exa 5.19 : page 207

In [26]:
# given data 
R=1 #in Kohm
C=3.6 #in uF
fo=1/(2*pi*R*1000*C*10**-6) # in Hz
print "The frequency of oscillation = %0.2f Hz" %fo
The frequency of oscillation = 44.21 Hz

Exa 5.20 : page 217

In [27]:
# given data 
R1=10 #in Kohm
R2=47 #in Kohm
R3=5.6 #in Kohm
RT=4.7 #in Kohm
CT=0.05 #in uF
V1=-10 #in Volt
V2=2 #in Volt
Vop=-(R1*V1/R2+R1*V2/R3) # in volt
VEE=0 #in Volt
I=(VEE+3-Vop)/RT # in mA
fo=0.32*I*10**-3/(CT*10**-6) #in Hz
print "Op-amp voltage = %0.2f V "%Vop
print "Frequency = %0.2f kHz" %(fo/1000)
Op-amp voltage = -1.44 V 
Frequency = 6.05 kHz

Exa 5.21 : page 233

In [28]:
# given data 
RT=50 #in Kohm
CT=0.001 #in uF
V=20 #in Volt
C=10 #in uF
fo=0.25/(RT*10**3*CT*10**-6) #in Hz
dfl=7.8*fo/V #in Hz
dfc=sqrt(dfl/(2*pi*3.6*10**3*C*10**-6)) #in Hz
print "Free running frequency = %0.2f kHz" %(fo/1000)
print "Lock range = %0.2f kHz" %(dfl/1000)
print "Capture range = %0.2f Hz" %(dfc)
Free running frequency = 5.00 kHz
Lock range = 1.95 kHz
Capture range = 92.85 Hz

Exa 5.22 : page 237

In [29]:
from math import log10, ceil
# given data 
fomax=100 # in KHz
Resolution=2 #in Hz
flowest=Resolution #in Hz
fclk=fomax*2.2 #in KHz
# formula: 2**n=fclk/flowest
n=(log10(fclk*1000/flowest))/log10(2) 
print " Frequency of reference oscillator = %0.2f kHz" %fclk
print " No. of bits needed is ",ceil(n) 
 Frequency of reference oscillator = 220.00 kHz
 No. of bits needed is  17.0