## Example 15-1, Page 521¶

In [2]:
VB=10          #breakover voltage(V)
Vin=15         #input voltage(V)
R=100.0        #resistance (Ohm)

I1=1000*Vin/R        #diode current ideally(mA)
I2=1000*(Vin-0.7)/R  #diode current with second approx.(mA)
I3=1000*(Vin-0.9)/R  #diode current more accurately(mA)

print 'Diode current ideally ID1 = ',I1,'mA'
print 'Diode current with second approx. ID2 = ',I2,'mA'
print 'Diode current more accurately ID3 = ',I3,'mA'

Diode current ideally ID1 =  150.0 mA
Diode current with second approx. ID2 =  143.0 mA
Diode current more accurately ID3 =  141.0 mA


## Example 15-2, Page 525¶

In [7]:
Ih=4*10**-3             #holding current(mA)
R=100.0                 #resistance (Ohm)
Vs=15                   #input voltage (V)

Vin=0.7+(Ih*R)          #new input voltage(V)

print 'New input voltage Vin = ',Vin,'V'

New input voltage Vin =  1.1 V


## Example 15-3, Page 525¶

In [9]:
R=2.0*10**3                    #resistance (Ohm)
C=0.02*10**-6                  #capacitance (F)
VB=10                          #breakdown voltage(V)

RC=R*C                         #Time constant(s)
T=0.2*RC                       #period (s)
f=T**-1                        #frequency(Hz)

print 'time constant RC = ',RC*10**6,'us'
print 'Period T = ',T*10**6,'us'
print 'Frequency = ',f/1000,'KHz'

time constant RC =  40.0 us
Period T =  8.0 us
Frequency =  125.0 KHz


## Example 15-4, Page 531¶

In [11]:
It=7*10**-3             #trigger current(mA)
R1=100.0                #resistance (Ohm)
R2=1*10**3              #resistance (Ohm)
Vt=0.75                 #trigger voltage (V)
Ih=6*10**-3             #holding current(mA)

Vin=Vt+(It*R2)           #minimum input voltage(V)
VCC=0.7+(Ih*R1)          #supply voltage for turning of SCR(V)

print 'Minimum input voltage Vin = ',Vin,'V'
print 'supply voltage for turning of SCR VCC = ',VCC,'V'

Minimum input voltage Vin =  7.75 V
supply voltage for turning of SCR VCC =  1.3 V


## Example 15-5, Page 532¶

In [16]:
IGT=200*10**-6          #trigger current(mA)
VGT=1                   #trigger voltage(V)
R1=900.0                #resistance (Ohm)
R2=100.0                #resistance (Ohm)
C=0.2*10**-6            #capacitance (F)
Vt=0.75                 #trigger voltage (V)
Ih=6*10**-3             #holding current(mA)
R=1*10**3               #Resistance (Ohm)

RTH=R1*R2/(R1+R2)       #Thevenin resistance (Ohm)
Vin=VGT+(IGT*RTH)       #input voltage needed to trigger(V)
Vp=10*Vin               #Output voltage at SCR firing point(V)
RC=C*(R/2)              #time constant (s)
T=RC*0.2                #period (s)
f=1/T                   #frequency (Hz)

print 'peak output voltage Vpeak = ',Vp,'V'
print 'time constant RC = ',RC*10**6,'us'
print 'Period T = ',T*10**6,'us'
print 'Frequency = ',f/1000,'KHz'

peak output voltage Vpeak =  10.18 V
time constant RC =  100.0 us
Period T =  20.0 us
Frequency =  50.0 KHz


## Example 15-6, Page 536¶

In [17]:
Vz=5.6                      #breakdown voltage(V)
VGT1=0.75                   #trigger voltage (V)
VGT2=1.5                    #worst case maximum trigger voltage(V)
Vz2=6.16                    #break down voltage with 10% tolerance (V)

VCC1=Vz+VGT1                  #supply voltage(V)
VCC2=VGT2+Vz2                 #Over voltage (V)

print 'supply voltage VCC1 = ',VCC1,'V'
print 'supply over voltage VCC2 = ',VCC2,'V'

supply voltage VCC1 =  6.35 V
supply over voltage VCC2 =  7.66 V


## Example 15-7, Page 539¶

In [2]:
import math   # This will import math module

C=0.1*10**-6            #capacitance (F)
f=60                    #frequency (Hz)
R=26*10**3              #resistance(KOhm)
Vm=120                  #input ac voltage(V)

XC=(2*math.pi*f*C)**-1                 #capacitive reactance(Ohm)
ZT=((R**2)+(XC**2))**0.5               #impedance (Ohm)
thetaz=math.atan2(-XC,R)*180/math.pi   #angle (deg)
IC=Vm/ZT                               #Current through C(A)
VC=IC*XC                               #voltage across C(V)
thetac=180+thetaz                      #conduction angle(deg)

print 'Capacitor reactance XC = ',round((XC/1000),2),'KOhm'
print 'impedance ZT = ',round((ZT/1000),2),'KOhm'
print 'firing angle = ',round(thetaz,2),'deg'
print 'Current through C, IC = ',round((IC*1000),2),'mA'
print 'voltage across C, VC = ',round(VC,2),'V'
print 'conduction angle = ',round(thetac,2),'deg'

Capacitor reactance XC =  26.53 KOhm
impedance ZT =  37.14 KOhm
firing angle =  -45.57 deg
Current through C, IC =  3.23 mA
voltage across C, VC =  85.7 V
conduction angle =  134.43 deg


## Example 15-8, Page 546¶

In [1]:
C=1*10**-6               #capacitance (F)
R1=22.0                  #resistance (Ohm)
R2=82*10**3              #resistance(KOhm)
Vs=75                    #input voltage(V)

I=Vs/R1                  #current through 22Ohm resistor (A)

print 'current through 22Ohm resistor I = ',round(I,2),'A'

current through 22Ohm resistor I =  3.41 A


## Example 15-9, Page 547¶

In [27]:
Vdb=32.0                    #diac break down voltage (V)
VTT=1                       #triac trigger voltage(V)

Vin=VTT+Vdb                 #input voltage for triggering triac

print 'input voltage for triggering triac vin = ',Vin,'V'

input voltage for triggering triac vin =  33.0 V