#Variable Declaration:
Vo=15.0 #Output voltage in volt
Vr=2.0 #Ripple voltage in volt
#Calculations:
Vimin=Vo+3.0 #Calculating minimum input voltage
Vi=Vimin + Vr/2.0 #Calculating input voltage
Vz=Vi/2.0 #Calculating zener voltage
Vz=10.0 #Volatge in volt
Iz=20.0*10**-3 #Current in ampere
R1=(Vi-Vz)/Iz #Calculating resistance value
I2=50.0*10**-6 #Current ampere
R2=(Vo-Vz)/I2 #Calculating Resistance value
R2=R2/1000.0 #Calculating resistance value
R3=Vz/I2 #Calculating resistance value
R3=R3/1000.0 #Calculating resistance value
Vcemax=Vi+Vr/2 #Calculating volatge
IE=50.0*10**-6 #Current in ampere
IL=50.0*10**-6 #Current in ampere
P=(Vi-Vo)*IL #Calculating power
P1=P*1000000.0 #Calculating power
#Results:
print('As Vz=%.1f, use Zener diode 1N758 for 10V'%Vz)
print('\nR1= %d ohm'%R1)
print('\nR2= %.1f kohm'%R2)
print('\nR3= %d kohm'%R3)
print('\nSelect C1= 50uF')
print('\nP= %.1f mW'%P1)
print('\nUse the transstor 2N718 for Q1')
#Variable Declaration:
IL=0.25 #Current in ampere
Vr=5.0 #Ripple voltage in volt
#Calculations:
R=Vr/IL #Calculating value of resistance
RL=10.0 #Calculating value of resistance
VL=IL*RL #Calculating voltage
Vo=Vr+VL #Calculating output voltage
Vdrop=2.0 #Voltage drop in volt
Vi=Vo+Vdrop #Calculating voltage
#Results:
print('R= %d ohm'%R)
print('\nVo= %.1f V'%Vo)
print('\nVo= %.1f V'%Vi)
#Variable Declaration:
VL=5.0 #Voltage in volt
RL=100.0 #Resistance in ohm
#Calculations:
IL=VL/RL #Calculating current
IL1=IL*1000.0 #Calculating current
#Part A
R1=7.0 #Resistance in ohm
VR1=IL*R1 #Calculaing voltage drop across R1
VR1x=VR1*1000.0 #Calculatingvoltage drop across R1
#Part B
VLb=5.0 #Voltage in volt
RLb=2.0 #Resistance in ohm
ILb=VLb/RLb #Calculating current
R1=7.0 #Resistance in ohm
VR1=ILb*R1 #Calculating voltage drop accross R1
Io=0.147 #Current in ampere
Ic=ILb-Io #Calculating current
#Results:
print('Part A')
print('\nLoad Current IL= %d mA'% IL1)
print('\nVoltage accross R1= %d mV'%VR1x)
print('\nAs voltage < 0.7V, Q1 is OFF')
print('\nHence IL=Io=Ii=50 mA')
print('\n\nPart B')
print('\nLoad Current IL= %.1f A'%ILb)
print('\nVoltage accross R1= %.1f V'%VR1)
print('\nAs voltage > 0.7V, Q1 is ON')
print('\nHence Ic= %.3f A'%Ic)
#Variable Declaration:
R1=240.0 #Resistance in ohm
R2=2000.0 #Resistance in ohm
Iadj=50.0*10**-6 #Current in ampere
Vref=1.25 #Reference voltage in volt
#Calculation:
Vo=(Vref*(1+R2/R1))+(Iadj*R2) #Calculating output voltage
#Result:
print('Vo= %.2f V'%Vo)
#Variable Declaration:
Iadjmax=100.0*10**-6 #Current in ampere
R1=240.0 #Resistance in ohm
Vref=1.25 #Reference voltage in volt
#Calculations:
#First case: Vo=4
Vo=4.0 #Voltage in volt
R2a1=(Vo-Vref)/(Vref/R1 + Iadjmax) #Calculating value of resistance
R2a=R2a1/1000.0 #Calculating value of resistance
#First case: Vo=12
Vo=12.0 #Voltage in volt
R2b1=(Vo-Vref)/(Vref/R1 + Iadjmax) #Calculating value of resistance
R2b=R2b1/1000.0 #Calculating value of resistance
#Results:
print('\nR2= %.2f kohm'%R2a)
print('\nR2= %.2f kohm'%R2b)
#Variable Declaration:
ILmax=0.5 #Current in ampere
#Calculations:
#Part 1
Rsc=0.7/ILmax #Calculting value of resistance
#Part 2
RL=100.0 #Resistance in ohm
Vo=20.0 #Voltage in volt
IL1=Vo/RL #Calculating current
#Part 3
RLn=10.0 #Resistance in ohm
IL2=Vo/RLn #Calculating current
Von=RLn*ILmax #Calculating voltage
#Results:
print('Rsc= %.1f ohm'%Rsc)
print('\nIL= %.1f A'%IL1)
print('\nIL= %.1f A'%IL2)
print('\nSince IL > ILmax of 0.5A, current limiting will happen')
print('\nVo= %.1f V'%Von)
#Variable Declaration:
R2=10000.0 #Resistance in ohm
Vo=12.0 #Output voltage in volt
Vref=7.15 #Reference voltage
#Calculations:
R1=(Vo/Vref)*R2 - R2 #Calculating resistance value
R1a=R1/1000.0 #Calculating resistance value
#Result:
print('\nR1= %.2f kohm'%R1a)
#Variable Declaration:
Vref=7.15 #Reference voltage in volt
Vo=5.0 #Output voltage in volt
#Calculations:
k=Vref/Vo
k1=k-1
#For min voltage of 2V
Vom=2.0
km=Vref/Vom
km1=km-1.43
R1a=10000.0 #Resistance in ohm
R1b=2000.0 #Resistance in ohm
R2=R1a/2.145 #Calculating resistance value
R2n=R2/1000.0 #Calculating resistance value
R1=6000.0 #Resistance in ohm
R3=(R1*R2)/(R1+R2) #Calculating resistance value
R3n=R3/1000.0 #Calculating resistance value
#Results:
print('(R1b+R2)/R2= %.2f'%k)
print('\nR1 = %.2f * R2'%k1)
print('\n(R1a+R1b+R2)/R2= %.3f'%km)
print('\nR1a = %.3f * R2'%km1)
print('\nR2= %.2f kohm'%R2n)
print('\nR3= %.2f kohm'%R3n)