# Chapter 6: Signal Generators¶

### Example 6.1 Page No 155¶

In [2]:
#Given
R1 = 100*10**3
R2 = 86*10**3
Vsatp = 15.0
Vsatm = -15.0      #Saturation voltages

#calculation
Vut = (R2 * Vsatp)/(R1 + R2)
Vlt = (R2 * Vsatm)/(R1 + R2)

#Result
print" Upper Threshold Voltage = ",round(Vut,0),"V"
print" Lower Threshold Voltage = ",round(Vlt,0),"V"

 Upper Threshold Voltage =  7.0 V
Lower Threshold Voltage =  -7.0 V


### Example 6.2 Page No 155¶

In [3]:
#Given
Rf = 100*10**3       #Feedback Resistance
C = 0.1*10**-6

#calculation
T = 2 * Rf * C

#result
print" Period  ", T,"s or ",T*1000,"ms"

 Period   0.02 s or  20.0 ms


### Example 6.3 Page No 155¶

In [2]:
#Given
T = 20*10**-3   #Period

#calculation
f = 1 / T

#Result
print" Frequency = ", f,"Hz"

 Frequency =  50.0 Hz


### Example 6.5 Page No 159¶

In [5]:
#Given
Rf = 100*10**3 #Feedback Resistance
C = 0.1*10**-6

#Calculation
t = (Rf * C)/ 5.0

#Result
print" Duration of output pulse of one-shot = ", t ,"sec  or",t*1000,"ms"

 Duration of output pulse of one-shot =  0.002 sec  or 2.0 ms


### Example 6.6 Page No 162¶

In [14]:
#Given
Vsatm = -13.8
Vut = 5.0      #Upper Threshold Voltage
R = 10*10**3
f = 1000.0    #Frequency
C = 0.05*10**-6

#calculation
p = -Vsatm / Vut
pR = round(p,1) * R
Ri = p / (4*f*C)

#Result
print" Value of p = ", p
print" Value of pR =", pR/1000,"kohm"
print" Value of Ri = ", round(Ri/1000,0),"kohm"

 Value of p =  2.76
Value of pR = 28.0 kohm
Value of Ri =  14.0 kohm


### Example 6.7 Page No 163¶

In [7]:
#Given
p = 2.8
Vsatm = -13.8
Ri = 28*10**3
C = 0.05*10**-6

#Calculation
Vut = - ((Vsatm+0.6)/p)
f = p / (2*Ri*C)

#Result
print" Peak Voltage = ", round(Vut,2),"V"
print" frequency =  ", f ,"Hz"

 Peak Voltage =  4.71 V
frequency =   1000.0 Hz


### Example 6.8 Page No 167¶

In [9]:
#Given
#Checking Frequency value
Ri = 10*10**3
Ci = 0.1*10**-6
Ei = 1.0
Vref = 10.0

#Calculation
f = Ei / (Ri*Ci*Vref)

#Result
print" Frequency is ", f,"Hz"

 Frequency is  100.0 Hz


### Example 6.9 Page No 168¶

In [18]:
#Given
Ri = 10*10**3   #Resistance
Ci = 0.1*10**-6
Ei = 2.0
Vref = 2.0

#Calculation
f = Ei / (Ri*Ci*Vref)

#Result
print " New Frequency of oscillation is ", f/1000 ,"KHz"

 Frequency is   200.0 Hz. So It means Frequency is doubled.


### Example 6.10 Page no 168¶

In [31]:
#Given
Vref1 = 10.0
Vref2 = 5.0

#Calculation
f1 =1000/Vref1
f2 = 1000/Vref2

#Result
print"For Vref=10V, frequency is",f1,"Hz and For Vref=5V, frequency is",f2,"Hz"

For Vref=10V, frequency is 100.0 Hz and For Vref=5V, frequency is 200.0 Hz


### Example 6.11 Page no 172¶

In [33]:
#Given
V=5    #Peak voltage
f=1    #Khz frequency
Vref=5 #V
C=0.01*10**-6  #Capacitance

#Calculation
Ri=1/(4*f*1000*C)

#Result
print"Value of Ri is",Ri/1000,"Kohm"

Value of Ri is 25.0 Kohm


### Example 6.12 Page No 175¶

In [1]:
#Given
Ei = 1.0
#Angle given in degree
t1 = 45.0
t2 = 90.0
t3 = 225.0
t4 = 405.0

#Calculation
import math
Vang1 = (20*10**-3)*t1
Vang2 = (20*10**-3)*t2
Vang3 = (20*10**-3)*t3
Vang4 = (20*10**-3)*t4
Vo1 = Ei*math.sin(t1*3.14/180.0)
Vo2 = Ei*math.sin(t2*3.14/180.0)
Vo3 = Ei*math.sin(t3*3.14/180.0)
Vo4 = Ei*math.sin(t4*3.14/180.0)

#Result
print" Input Voltages are ", Vang1,"V, ",Vang2,"V ,",Vang3,"V,",Vang4 , "V"
print" Output Voltages are  ", round(Vo1,3),"V,",round(Vo2,3),"V,",round(Vo3,3),"V,",round(Vo4,3),"V"

 Input Voltages are  0.9 V,  1.8 V , 4.5 V, 8.1 V
Output Voltages are   0.707 V, 1.0 V, -0.706 V, 0.705 V


### Example 6.13 Page No 178¶

In [19]:
#Given
R1 = 10*10**3
R2 = 100*10**3
C = 0.025*10**-6

#Calculation
f1 = 1 / (4*R1*C)
f2 = 1 / (4*R2*C)

#Result
print" Frequency when Ri is 10KiloOhm is " , f1/1000.0,"KHz"
print" Frequency when Ri is 100KiloOhm is " , f2,"Hz"


 Frequency when Ri is 10KiloOhm is  1.0 KHz
Frequency when Ri is 100KiloOhm is  100.0 Hz