Chapter 16 : Signal generators¶

Example 16.1, Page No 668¶

In [28]:
import math
#initialisation of variables

Vcc=10.0
Ib=500.0*10**-9
Acl=29.0
f=1.0*10**3

#Calculations
print(" phase shift  oscillator")
I1=100*Ib
vo=Vcc-1
vi=vo/Acl
R1=vi/I1
R1=5.6*10**3#use standard value 5.6Kohm
R2=Acl*R1
R2=180*10**3#use satndard value 180Kohm to give Acl>180
R3=R2R=R1
C=1.0/(2*3.14*R3*f*math.sqrt(6))

#Results
print("The value of C = %.2f  " %(C*10**9))

 phase shift  oscillator
The value of C = 11.61


Example 16.2, Page No 672¶

In [29]:
import math

#initialisation of variables

f=40.0*10**3
L=100.0*10**-3
vp=8.0

#Calculations
print("colpitts oscillator")
Ct=1/(4*3.14*3.14*(f**2)*L)
C1=10*Ct
C2=1/((1/Ct)-(1/C1))
C2=180*10**-12#use standard value
Xc2=1/(2*3.14*f*C2)
Xc1=1/(2*3.14*f*C1)
R1=10*Xc1
R1=27*10**3#use standard value
Acl=C1/C2
R2=Acl*R1
R2=270*10**3#use stabdard value
R3=(R1*R2)/(R1+R2)
f2=Acl*f
SR=2*3.14*f*vp

#Results
print("The value of SR is %.2f " %(SR/1000))

colpitts oscillator
The value of SR is 2009.60


Example 16.3 Page No 678¶

In [30]:
import math

#initialisation of variables

vo=8.0
f=100.0*10**3
print(" hartley oscillator")
Vcc=vo+1
Xl2=1.0*10**3

#Calculations
L2=Xl2/(2*3.14*f)
L2=1.5*10**-3#use standard value
L1=L2/10.0
Lt=L1+L2#(assuming M=0)
C1=1/(4*(3.14**2)*(f**2)*Lt)
C1=1500*10**-12#use 1500pF with aadditional parallel capacitance if necessary
#C1>>stray capacitance
Xl1=2*3.14*f*L1#R1>>Xl1
R1=1*10**3
Acl=L2/L1
R2=Acl*R1
R3=(R1*R2)/(R1+R2)
print("full power bandwidth ")
f2=Acl*f
SR=2*3.14*f*vo

#Results
print("The value of SR is %.2f " %(SR/1000))

 hartley oscillator
full power bandwidth
The value of SR is 5024.00


Example 16.4, Page No 680¶

In [31]:
import math
#initialisation of variables

f=100.0*10**3
Vo=9.0
Acl=3.0

#Calculations
print(" design of wein bridge oscillator")
Vcc=Vo+1
C1=1000.0*10**-12#standard value
C2=C1
R1=1.0/(2*3.14*f*C1)
R2=R1
R4=R2
R3=2*R4
R3=3.3*10**3#use standard value
print(" minimum full power bandwidth")
f2=Acl*f
SR=2*3.14*f*Vo

#Results
print("The value of SR is %.2f " %(SR/1000))

 design of wein bridge oscillator
minimum full power bandwidth
The value of SR is 5652.00


Example 16.5 Page No 683¶

In [32]:
import math
#initialisation of variables

f=5.0*10**3
vo=5.0
I1=1.0*10**-3
Vf=0.7

#Calculations
print("phase shift oscillator")
R1=(vo/29.0)/I1
R1=150#use standard value
R2=29*R1
R4=(2*Vf)/I1
R4=1.5*10**3#use 1.5kohm standard value
R5=R2-R4
R6=.4*R5
R7=.8*R5
R=R1
C=1.0/(2*3.14*R*f*math.sqrt(6))

#Results
print("The value of C is %.2f mF" %(C*10**9))

phase shift oscillator
The value of C is 86.68 mF


Example 16.6 Page No 686¶

In [33]:
import math

#initialisation of variables

rds=600.0
Vgs=1.0
Vd1=0.7
f=100.0*10**3

#Calculations
print("wien bridge ocillator")
R4=560.0
R3=2*((R4*rds)/(R4+rds))
I5=200.0*10**-6
Vo=6
R6=Vgs/I5
R5=(Vo-(Vgs+Vd1))/I5
print(" C4 discharge voltage ")
Vc=.1*Vgs
print("C4 discharge time")
T=1/f
Ic=I5
C4=(Ic*T)/Vc
Xc3=rds/10#at oscillating frequency
C3=1/(2*3.14*f*Xc3)

#Results
print("The value of C3 is %.2f mF" %(C3*10**9))

wien bridge ocillator
C4 discharge voltage
C4 discharge time
The value of C3 is 26.54 mF


Example 16.7, Page No 689¶

In [34]:
import math
#initialisation of variables

Vo=14.0
Vr3=.5
Ib=500.0*10**-9
f=1.0*10**3

#Calculations
print("square wave generator")
Vcc=Vo+1
UTP=Vr3
LTP=UTP
I2=100*Ib
R3=Vr3/I2
R2=(Vo-Vr3)/I2
t=1/(2*f)
V=UTP-(-LTP)
C1=.1*10**-6
I1=(C1*V)/t
R1=Vo/I1

#Results
print("The value of R1 is %.2f kohm" %(R1/1000))

square wave generator
The value of R1 is 70.00 kohm


Example 16.8 Page No 694¶

In [35]:
import math

#initialisation of variables

R1=2.2*10**3
R2=2.7*10**3
C2=.5*10**-6
Vcc=15.0

#Calculations
t1=.693*C2*(R1+R2)
t2=.693*C2*R2
T=t1+t2
f=1/T
Ic1=(Vcc/3)/(R1+R2)

#Results
print("The value of Ic1 is %.2f mA" %(Ic1*10**3))

The value of Ic1 is 1.02 mA


Example 16.10 Page No 699¶

In [36]:
import math
#initialisation of variables

Vcc=9.0
Vo=3
I1=1.0*10**-3
f=500.0
UTP=3.0

#Calculations
print("design the triangular wave")
Vi=Vcc-1
V=Vo-(-Vo)
print(" I1>>Ibmax for op-amp")
R1=Vi/I1
t=1.0/(2*f)
C1=(I1*t)/V
print("schmitt design")
I2=1.0*10**-3
R2=UTP/I2
R3=(Vcc-1)/I2

#Results
print("The value of R3 is %.2f kohm" %(R3/1000))

design the triangular wave
I1>>Ibmax for op-amp
schmitt design
The value of R3 is 8.00 kohm


Example 16.11 Page No 705¶

In [37]:
import math

#initialisation of variables

f=100.0*10**3
Rs=1.5*10**3
R1=2.0*Rs

#Calculations
R1=2.7*10**3#use standard value
R2=R1+Rs
C1=1/(2*3.14*f*R2)
R4=R2
R3=2*R4

#Results
print("The value of R3 is %.2f kohm" %(R3/1000))

The value of R3 is 8.40 kohm


Example 16.12, Page No 705¶

In [38]:
import math

#initialisation of variables

fs=1.0*10**6
Rs=700.0
C1=1000.0*10**-12
C2=100.0*10**-12
R1=1.0*10**6
R2=10.0*10**3
Rs=700.0
Vdd=5

#Calculations
Ct=(C1*C2)/(C1+C2)
print(" at resonance Xl=Xct    2*pi*f*L=1/2*pi*f*Ct")
L=1/(((2*3.14*f)**2)*Ct)
ip=Vdd/(R1+R2+Rs)
Pd=(((.707*ip)**2)*Rs)*10**9

#Results
print(" peak power dissipated is %.3fnW " %Pd)

 at resonance Xl=Xct    2*pi*f*L=1/2*pi*f*Ct
peak power dissipated is 8.563nW