import math
Vrms=10 #RMS Value of sine wave(V)
f=60 #frequency(Hz)
Vp=Vrms/0.707 #peak source voltage(V)
Vpout=Vp #peak load voltage(V)
Vdc=Vp/math.pi #dc load voltage(V)
Vpouts=Vp-0.7 #peak load voltage in 2nd approx.
Vdc=Vpouts/math.pi #dc load voltage(V)
print 'Vp=',round(Vp,2),'V'
print 'With an ideal diode, Vpout =',round(Vpout,2),'V'
print 'DC load voltage, Vdc =',round(Vdc,2),'V'
print 'With second approximation, Vpout =',round(Vpouts,2),'V'
print 'DC load voltage, Vdc =',round(Vdc,2),'V'
import math
Vs=120 #supply voltage(V)
V2=Vs/5 #Secondary voltage(V)
Vp=V2/0.707 #peak secondary voltage
Vpout=Vp #peak load voltage(V)
Vdc1=Vp/math.pi #dc load voltage(V)
Vpouts=Vp-0.7 #peak load voltage in 2nd approx.(V)
Vdc2=Vpouts/math.pi #dc load voltage(V)
print 'As per fig.4-5, Transformer turns ratio is 5:1'
print 'V2=',round(V2,2),'V'
print 'Vp=',round(Vp,2),'V'
print 'With an ideal diode, Vpout =',round(Vpout,2),'V'
print 'DC load voltage, Vdc =',round(Vdc1,2),'V'
print 'With second approximation, Vpout =',round(Vpouts,2),'V'
print 'DC load voltage, Vdc =',round(Vdc2,2),'V'
Vrms=120 #RMS value of supply(V)
N12=10 #turn ratio
Vp1=Vrms/0.707 #peak primary voltage(V)
Vp2=Vp1/N12 #peak secondary voltage(V)
Vpin=0.5*Vp2 #input voltage(V)
Vpout=Vpin #Output voltage (V)
Vpouts=Vpin-0.7 #Output voltage in 2nd approx.(V)
print 'Peak primary voltage Vp1=',round(Vp1,2),'V'
print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'
print 'Due to center-tap,'
print 'input voltage to each half-wave rectifier is only half the secondary voltage:'
print 'With an ideal diode, Vpout =',round(Vpout,2),'V'
print 'With second approximation, Vpout =',round(Vpouts,2),'V'
Vrms=120 #RMS value of supply(V)
N12=10 #turn ratio
Vp1=Vrms/0.707 #peak primary voltage(V)
Vp2=Vp1/N12 #peak secondary voltage(V)
Vpin=0.5*Vp2 #input voltage(V)
Vpout=Vpin #Output voltage(V)
Vpouts=Vpin-0.7 #Output voltage in 2nd approx.(V)
print 'Peak primary voltage Vp1=',round(Vp1,2),'V'
print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'
print 'Due to one of the diodes were open, load voltage will be the half wave signal'
print 'But still peak of half wave signal is same as prior case'
print 'With an ideal diode, Vpout =',round(Vpout,2),'V'
print 'With second approximation, Vpout =',round(Vpouts,2),'V'
Vrms=120 #RMS value of supply(V)
N12=10 #turn ratio
Vp1=Vrms/0.707 #peak primary voltage(V)
Vp2=Vp1/N12 #peak secondary voltage(V)
Vpout=Vp2 #Output voltage(V)
print 'Peak primary voltage Vp1=',round(Vp1,2),'V'
print 'Peak secondary voltage Vp2=',round(Vp2,2),'V'
print 'secondary voltage is input of rectifier'
print 'With an ideal diode, Vpout =',round(Vpout,2),'V'
Vrms=120 #RMS value of supply(V)
N12=5 #turn ratio
RL=5 #Load resistance(KOhm)
C=100 #Capacitance(uF)
f=60 #Frequency(Hz)
V2=Vrms/N12 #RMS secondary voltage(V)
Vp=V2/0.707 #peak secondary voltage(V)
VL=Vp #dc load voltage(V)
IL=VL/RL #Load current(mA)
VR=(IL/(f*C))*(10**3) #ripple voltage(V)
print 'RMS secondary voltage V2=',V2,'V'
print 'Peak secondary voltage Vp=',round(Vp,2),'V'
print 'with ideal diode and small ripple, dc load voltage, VL =',round(VL,2),'V'
print 'To calculate ripple get, dc load current,'
print 'DC Load current IL=',round(IL,2),'mA'
print 'As per ripple formula,'
print 'Ripple voltage VR=',round(VR,2),'V'
Vrms=120 #RMS value of supply(V)
N12=5 #turn ratio
RL=5 #Load resistance(KOhm)
C=100 #Capacitance(uF)
f=60 #Frequency(Hz)
V2=Vrms/N12 #RMS secondary voltage(V)
Vp=V2/0.707 #peak secondary voltage(V)
VL=Vp/2 #dc load voltage(V)
IL=VL/RL #Load current(mA)
VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)
print 'RMS secondary voltage V2=',V2,'V'
print 'Peak secondary voltage Vp=',round(Vp,2),'V'
print 'Half this voltage is input to each half-wave section, with ideal diode and small ripple, dc load voltage, VL =',round(VL,2),'V'
print 'But, due to 0.7V across conducting diode actual dc voltage is, VL =',round((VL-0.7),2),'V'
print 'To calculate ripple get, dc load current,'
print 'DC Load current IL=',round(IL,2),'mA'
print 'As per ripple formula,'
print 'Ripple voltage VR=',round(VR,2),'V'
Vrms=120 #RMS value of supply(V)
N12=5 #turn ratio
RL=5 #Load resistance(KOhm)
C=100 #Capacitance(uF)
f=60 #Frequency(Hz)
V2=Vrms/N12 #RMS secondary voltage(V)
Vp=V2/0.707 #peak secondary voltage(V)
VL=Vp #dc load voltage(V)
IL=VL/RL #Load current(mA)
VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)
print 'RMS secondary voltage V2=',V2,'V'
print 'Peak secondary voltage Vp=',round(Vp,2),'V'
print 'with ideal diode and small ripple, dc load voltage, VL =',round(VL,2),'V'
print 'But, due to 1.4V across two conducting diodes actual dc voltage is, VL =',round((VL-1.4),2),'V'
print 'To calculate ripple get, dc load current,'
print 'DC Load current IL=',round(IL,2),'mA'
print 'As per ripple formula,'
print 'Ripple voltage VR=',round(VR,2),'V'
Vrms=120 #RMS value of supply(V)
N12=15 #turn ratio
RL=0.5 #Load resistance(KOhm)
C=4700 #Capacitance(uF)
f=60 #Frequency(Hz)
V2=Vrms/N12 #RMS secondary voltage(V)
Vp=V2/0.707 #peak secondary voltage(V)
VL=Vp-1.4 #dc load voltage(V)
IL=VL/RL #Load current(mA)
VR=(IL/(2*f*C))*(10**3) #ripple voltage(V)
print 'RMS secondary voltage V2=',V2,'V'
print 'Peak secondary voltage Vp=',round(Vp,2),'V'
print 'with ideal diode and small ripple & due to 1.4V across two conducting diodes actual dc voltage is, VL =',round(VL,2),'V'
print 'To calculate ripple get, dc load current,'
print 'DC Load current IL=',round(IL,2),'mA'
print 'As per ripple formula,'
print 'Ripple voltage VR=',round((VR*1000),2),'mV'
Vrms=120 #RMS value of supply(V)
N12=8 #turn ratio
f=60 #Frequency(Hz)
V2=Vrms/N12 #RMS secondary voltage(V)
Vp=V2/0.707 #peak secondary voltage(V)
PIV = Vp #Peak Inverse Voltage(V)
print 'RMS secondary voltage V2=',V2,'V'
print 'Peak inverse voltage PIV =',round(PIV,2),'V'
print 'PIV << breakdown voltage(50V), So, it is safe to use IN4001'