from __future__ import division
deltaVin=4 #V
deltaVout=0.4 #V
Vout=20 #V
LR=(deltaVout/Vout)*100/deltaVin #%/V(Line Regulation)
print "Line Regulation = %0.1f %%/V " %LR
VNL=18.0 #V
VFL=17.8 #V
IL=50.0 #mA
LR=(VNL-VFL)*100/VFL #%(Line Regulation)
LdR=LR/IL #%/mA(Load Regulation)
print "Load Regulation = %0.3f %%/mA " %LdR
VBE=0.65 #V
RCL=1.2 #ohm
ILmax=VBE/RCL #A
#For Vout=0, IL=ILmax
IL=ILmax #A
print "Load current = %0.2f A " %IL
from __future__ import division
R=20 #kohm
R1=20 #kohm
R2=10 #kohm
VZ=4.7 #V
Vref=VZ #V
Vout=Vref*(1+R1/R2) #V
print "Output Voltage = %0.1f V " %Vout
from __future__ import division
Vout=15 #V
Vin=20 #V
INL=2 #mA(INL=Iadj+Iref)
Iadj=60 #mA(Assumed)
Iref=INL-Iadj/1000 #mA
Vref=1.25 #V
R1=Vref/Iref*1000 #ohm
VR2=Vout-Vref #V
R2=VR2/INL*1000 #ohm
print "Design values are : "
print "Resistance, R1 = %0.f ohm " %R1
print "Resistance, R2 = %0.3f kohm " %(R2/1000 )
from __future__ import division
RL1=100 #ohm
RL2=1 #ohm
RCS=7 #ohm
VEB=0.7 #V
Beta=25 #unitless
#For 100 ohm Load
Vout=5 #V(as 7805 used)
IL=Vout/RL1 #A
VRCS=IL*RCS #V(Voltage across RCS)
#VRCS<VEB, hence Q1 is off
Iout=IL; Iin=IL #A
Iext=Iout-Iin #A
print "For 100 ohm load, Output current Iext = %0.2f A " %Iext
#For 1 ohm Load
Vout=5 #V(as 7805 used)
IL=Vout/RL2 #A
ILmax=IL #A
VRCS=IL*RCS #V(Voltage across RCS)
#VRCS>VEB, hence Q1 is on
Iout=(ILmax+Beta*VEB/RCS)/(Beta+1) #A
Iext=ILmax-Iout #A
print "For 10 ohm load, Output current Iext = %0.3f A " %Iext
from __future__ import division
RL=range(1,11) #ohm
R1=5 #ohm
Vref=5 #V
IL=1 #A
IQ=0 #A
Iref=IL #A
R1=Vref/Iref #ohm
print "Value of resistor R1 = %0.f ohm " %R1
from __future__ import division
Vout=range(15,21) #V
Vin=24 #V
VR1=12 #V
Vref=12 #V
I4=0 #A(Assumed)
Iout=1 #A(Assumed)
R1=VR1/Iout #ohm
#Vout=VR1*(1+R2/R1)
R2min=R1*(min(Vout)/VR1-1) #Putting min Vout
R2max=R1*(max(Vout)/VR1-1) #Putting min Vout
print "Resistance R1 = %0.f ohm " %R1
print "Minimum & maximum value of R2 are %0.f ohm & %0.f ohm " %(R2min,R2max)
#A pot of 10 ohm should be used."
from __future__ import division
Vout=6 #V
IL=100 #mA
Vref=7.15 #V(For LM 723)
Iref=1 #mA(Assumed)
R1=(Vref-Vout)/Iref #kohm
R2=Vout/Iref #kohm
print "Design values are : "
print "R1 should be used 1.2kohm. Calculated R1 %0.2f kohm " %R1
print "R2 should be used 6.2kohm. Calculated R2 = %0.2f kohm " %R2
R1=1.2; R2=6.2 #kohm
R3=R1*R2/(R1+R2) #kohm
print "Resistance R3 = %0.f kohm " %R3
RCL=0.65/(IL/1000) #kohm
print "Resistance RCL = %0.1f kohm " %RCL
from __future__ import division
Vout=15 #V
IL=50 #mA
Vin=20 #V
PDmax=1 #W(For LM 723)
Iref=3 #mA(From datasheet)
PD=Vout*(IL+Iref) #mW
print "Required PD = %0.3f W " %(PD/1000)
print "PDmax supplied by LM723 = %0.2f mW " %PDmax
print "PD<PDmax, so we can use it."
Vref=7.15 #V(For LM 723)
R3=1.5 #kohm(choosen)
R1BYR2=(Vout-Vref)/Vref
R1=R3*(R1BYR2+1) #ohm
print "Resistance R1 = %0.2f kohm" %R1
R2=R1/R1BYR2 #ohm
print "Resistance R2 = %0.2f kohm " %R2
print "Resistance R3 = %0.2f kohm " %R3
RCL=0.65/(IL/1000) #ohm
print "Resistance RCL = %0.2f ohm " %RCL