Chapter : 13 - Integrated Circuit Timer

Example 13.1 : Page No - 496

In [2]:
#Given data
C = 0.01 # in µF
C = C *10**-6 # in F
R_A = 2 # in  k ohm
R_A = R_A * 10**3 # in ohm
R_B = 100 # in k ohm
R_B = R_B * 10**3 # in ohm
T_HIGH = 0.693*(R_A+R_B)*C # in s
T_HIGH = T_HIGH # in sec
T_LOW = 0.693*R_B*C # in s
T_LOW = T_LOW  # in sec
T = T_HIGH + T_LOW # in sec
f = 1/T # in Hz
print "The value of frequency = %0.1f Hz" %f 
D = (T_HIGH/T)*100 # in %
print "Duty cycle = %0.1f %%" %D
The value of frequency = 714.4 Hz
Duty cycle = 50.5 %

Example 13.2 : Page No - 497

In [5]:
#Given data
C = 1 # in µF
C = C * 10**-6 # in F
R_A = 4.7 # in k ohm
R_A = R_A * 10**3 # in ohm
R_B = 1 # in k ohm
R_B = R_B * 10**3 # in ohm
T_on = 0.693*(R_A+R_B)*C # in s
T_on = T_on # in sec
print "Positive pulse width = %0.2f ms" %(T_on * 10**3) 
T_off = 0.693*R_B*C # in s
T_off = T_off # in ms
print "Negative pulse width = %0.3f ms" %(T_off * 10**3) 
f = 1.4/((R_A+2*R_B)*C) # in Hz
print "Free running frequency = %0.2f Hz" %f 
D = ((R_A+R_B)/(R_A+(2*R_B)))*100 # in %
print "The duty cycle = %0.f %%" %D
Positive pulse width = 3.95 ms
Negative pulse width = 0.693 ms
Free running frequency = 208.96 Hz
The duty cycle = 85 %

Example 13.3 : Page No - 497

In [7]:
#Given data
C = 0.01 # in µF
C = C * 10**-6 # in F
f = 1 # in kHz
f = f * 10**3 # in Hz
R_A = 1.44/(2*f*C) # in ohm
R_A = R_A * 10**-3 # in k ohm
R_B= R_A # in kohm
print "The value of both the resistors required = %0.f kΩ (standard value 68 kohm)" %R_A
The value of both the resistors required = 72 kΩ (standard value 68 kohm)

Example 13.4 : Page No - 497

In [9]:
#Given data
f = 700 # in Hz
C = 0.01 # in µF
C = C * 10**-6 # in F
a = 1.44 
R_A = a/(2*f*C) # in ohm
R_A = R_A * 10**-3 # in k ohm
R_B =R_A # in k ohm
print "The the value of C = %0.2f µF" %(C*10**6)
print "The value of both the resistors = %0.f kΩ" %R_A 
print "(Standard value of resistor is 100 kΩ)"
The the value of C = 0.01 µF
The value of both the resistors = 103 kΩ
(Standard value of resistor is 100 kΩ)

Example 13.5 : Page No - 498

In [11]:
#Given data
C = 0.01 # in µF
C = C *10**-6 # in F
R_A = 2 # in  k ohm
R_A = R_A * 10**3 # in ohm
R_B = 100 # in k ohm
R_B = R_B * 10**3 # in ohm
T_HIGH = 0.693*(R_A+R_B)*C # in s
T_HIGH = T_HIGH # in sec
T_LOW = 0.693*R_B*C # in s
T_LOW = T_LOW  # in sec
T = T_HIGH + T_LOW # in sec
f = 1/T # in Hz
print "The value fo frequency = %0.1f Hz" %f 
D = (T_HIGH/T)*100 # in %
print "Duty cycle = %0.1f %%" %D
The value fo frequency = 714.4 Hz
Duty cycle = 50.5 %

Example 13.6 : Page No - 498

In [14]:
#Given data
C = 1 # in µF
C = C * 10**-6 # in F
R_A = 4.7 # in k ohm
R_A = R_A * 10**3 # in ohm
R_B = 1 # in k ohm
R_B = R_B * 10**3 # in ohm
T_on = 0.693*(R_A+R_B)*C # in s
T_on = T_on # in sec
print "Positive pulse width = %0.2f ms" %(T_on * 10**3) 
T_off = 0.693*R_B*C # in s
T_off = T_off # in ms
print "Negative pulse width = %0.3f ms" %(T_off * 10**3) 
f = 1.4/((R_A+2*R_B)*C) # in Hz
print "Free running frequency = %0.2f Hz" %(f) 
D = ((R_A+R_B)/(R_A+(2*R_B)))*100 # in %
print "The duty cycle = %0.f %%" %D
Positive pulse width = 3.95 ms
Negative pulse width = 0.693 ms
Free running frequency = 208.96 Hz
The duty cycle = 85 %

Example 13.7 : Page No - 498

In [16]:
#Given data
C = 0.01 # in µF
C = C * 10**-6 # in F
f = 1 # in kHz
f = f* 10**3 # in Hz
a = 1.44 
R_A = a/(2*f*C) # in ohm
R_A = R_A * 10**-3 # in k ohm
R_B = R_A # in k ohm
print "The value of both the resistors required = %0.f kΩ (standard value 68 kohm)" %R_A
The value of both the resistors required = 72 kΩ (standard value 68 kohm)

Example 13.8 : Page No - 499

In [18]:
#Given data
f = 700 # in Hz
C = 0.01 # in µF
C = C * 10**-6 # in F
a = 1.44 
R_A = a/(2*f*C) # in ohm
R_A = R_A * 10**-3 # in k ohm
R_B =R_A # in k ohm
print "The the value of C = %0.2f µF" %(C*10**6)
print "The value of both the resistors = %0.f kΩ" %R_A 
print "(Standard value of resistor is 100 kΩ)"
The the value of C = 0.01 µF
The value of both the resistors = 103 kΩ
(Standard value of resistor is 100 kΩ)

Example 13.9 : Page No - 499

In [19]:
#Given data
f = 800 # in Hz
C = 0.01 # in µF
C =C * 10**-6 # in F
R_A = 1.44/(5*f*C) # in ohm
R_A = R_A * 10**-3 # in k ohm
print "The value of R_A = %0.f kΩ" %R_A 
R_B = 2*R_A # in k ohm
print "The value of R_B = %0.f kΩ" %R_B 
The value of R_A = 36 kΩ
The value of R_B = 72 kΩ

Example 13.10 : Page No - 501

In [21]:
#Given data
C = 10 # in µF
C = C*10**-6 # in F
T_ON = 5 # in sec
R = T_ON/(1.1*C) # in ohm
print "The resistor value = %0.1f ohm" %R
The resistor value = 454545.5 ohm

Example 13.11 : Page No - 501

In [22]:
#Given data
C = 10 # in µF
C = C * 10**-6 # in F
T_off = 1 # in sec
#Formula T_off= 0.693*R2*C
R2 = T_off/(0.693*C) # in ohm
print "The value of R2 = %0.f Ω" %R2 
T_on = 3 # in sec
# Formula T_on= 0.693*(R1+R2)*C
R1 =T_on/(C*0.693)-R2 # in ohm
print "The value of R1 = %0.f Ω" %R1
The value of R2 = 144300 Ω
The value of R1 = 288600 Ω

Example 13.12 : Page No - 502

In [26]:
from __future__ import division
#Given data
C = 0.22 # in µF
C=C*10**-6 # in F
T_on = 10 # in ms
T_on = T_on * 10**-3 # in s
V_CC = 15 # in V
V_BE = 0.7 # in V
V_EC = 0.2 # in V
V_LED= 1.4 # in V
I_LED= 20*10**-3 # in A
R = T_on/(C*1.1) # in ohm
R = R *10**-3 # in k ohm
print "Values for first circuit : "
print "The value of R = %0.1f kΩ" %R 
V_o = V_CC-(2*V_BE) - V_EC # in V
print "The output voltage = %0.1f V" %V_o 
R_LED = (V_o - V_LED)/(I_LED) # in ohm 
print "The value of R_LED = %0.f Ω" %R_LED
# Part (ii)
f= 1*10**3 # in Hz
C=0.01*10**-6 # in F
D= 95/100 # duty cycle
# Formula f= 1.44/((R1+2*R2)*C)
# R1+2*R2= 1.44/(f*C)                  (i)
# D= (R1+R2)/(R1+2*R2) or
# R2= (1-D)/(2*D-1)*R1           (ii)
# From eq (i) and (ii)
R1= 1.44/(f*C*(1+2*((1-D)/(2*D-1)))) # in ohm
R2=  (1-D)/(2*D-1)*R1 # in ohm
print "\nValues for second circuit : "
print "The value of R1 = %0.1f kΩ" %(R1*10**-3) 
print "The value of R2 = %0.2f kΩ" %(R2*10**-3)
Values for first circuit : 
The value of R = 41.3 kΩ
The output voltage = 13.4 V
The value of R_LED = 600 Ω

Values for second circuit : 
The value of R1 = 129.6 kΩ
The value of R2 = 7.20 kΩ

Example 13.13 : Page No - 503

In [28]:
#Given data
T = 5 # in msec
T = T * 10**-3 # in sec
C = 0.1 # in µF
C = C * 10**-6 # in F
R = T/(C*1.1) # in ohm
R = R * 10**-3 # in k ohm
print "The resistor = %0.2f kΩ" %R
The resistor = 45.45 kΩ

Example 13.14 : Page No - 503

In [30]:
#Given data
f = 1 # in kHz
f = f * 10**3 # in Hz
T = 1/f # in s
T = T * 10**3 # in msec
T_d = T/2 # in msec
T_d = T_d * 10**-3 # in sec
C = 0.1 # in µF
C = C * 10**-6 # in F
R2 = T_d/(0.69*C) # in ohm
R2 = R2 * 10**-3 # in k ohm
print "The value of C = %0.1f µF" %(C*10**6)
print "The value of R2 = %0.2f kΩ" %R2 
print "The value of R1 will be 100 Ω +10 kΩ pot" 
The value of C = 0.1 µF
The value of R2 = 7.25 kΩ
The value of R1 will be 100 Ω +10 kΩ pot

Example 13.15 : Page No - 504

In [32]:
#Given data
f = 800 # in Hz
D = 0.6 
C = 0.1 # in µF
C = C * 10**-6 # in F
# Formula f= 1.44/((R_A+2*R_B)*C)
# R_A+2*R_B= 1.44/(f*C)                  (i)
# D= (R_A+R_B)/(R_A+2*R_B) or
# R_B= (1-D)/(2*D-1)*R_A           (ii)
# From eq (i) and (ii)
R_A= 1.44/(f*C*(1+2*((1-D)/(2*D-1)))) # in ohm
R_B=  (1-D)/(2*D-1)*R_A # in ohm
print "The value of R_A = %0.1f kΩ" %(R_A*10**-3) 
print "The value of R_B = %0.1f kΩ" %(R_B*10**-3) 
The value of R_A = 3.6 kΩ
The value of R_B = 7.2 kΩ

Example 13.16 : Page No - 504

In [34]:
#Given data
f = 700 # in Hz
D = 0.5 
C = 0.1 # in µF
C = C * 10**-6 # in F
# Formula f= 1.44/((R_A+2*R_B)*C)
# R_A+2*R_B= 1.44/(f*C)                  (i)
# D= (R_A+R_B)/(R_A+2*R_B) or
# R_A+R_B=D*1.44/(f*C)
# From eq (i) and (ii)
R_B=round(1.44/(f*C))*(1-D) 
R_A= round(D*1.44/(f*C))-R_B 
#R_A= 1.44/(f*C*(1+2*((1-D)/(2*D-1)))) # in ohm
#R_B=  (1-D)/(2*D-1)*R_A # in ohm
print "The value of R_A = %0.f Ω" %round(R_A)
print "The value of R_B = %0.3f kΩ" %(R_B*10**-3) 
The value of R_A = 1 Ω
The value of R_B = 10.286 kΩ

Example 13.17 : Page No - 507

In [35]:
#Given data
R_A = 20 # in k ohm
R_A = R_A * 10**3 # in ohm
C = 0.1 # in µF
C = C*10**-6 # in F
pulse_width = 1.1*R_A*C # in s
print "The output pulse width = %0.f ms" %(pulse_width*10**3)
The output pulse width = 2 ms

Example 13.18 : Page No - 507

In [39]:
from sympy import symbols, solve
T= symbols('T')
#Given data
n=4 
# t_p= X*T, where
X= (0.2+(n-1)) # (assumed)
t_p= X*T
print "The relation between t_p and T is :"
print "t_p = ",t_p
The relation between t_p and T is :
t_p =  3.2*T

Example 13.19 : Page No - 507

In [42]:
#Given data
C = 0.02 # in µF
C = C * 10**-6 # in F
f=2*10**3 #frequency in Hz
T = 1/f # in sec
n = 5 
t_p = (0.2+(n-1))*T # in sec
R_A = t_p/(1.1*C) # in ohm
print "The value of R_A = %0.2f kΩ (standard value 100 kohm)" %(R_A*10**-3)
The value of R_A = 95.45 kΩ (standard value 100 kohm)