# Chapter 18 : Linear and switching voltage regulators¶

## Example 18.1, Page No 761¶

In [25]:
import math
#initialisation of variables

Vs=21.0
Vo=12.0
Av=100.0

#Calculations
vo=(Vs*0.1)/Av#source effect is 10% of the Vs
print(" source effect is %3.3fV " %vo)
vo=(21-20)/100.0
print(" laod effect is %3.3fV " %vo)
LR=(21*10**-3 *100)/12.0
print("line regulation is %3.3fpercentage " %LR)
LR=(10*10**-3*100)/12.0
print(" load effect is %3.3fpercentage  " %LR)
RJ=20*math.log((1.0/Av),10)

#Results
print("ripple rejection is %d dB " %RJ)

 source effect is 0.021V
laod effect is 0.010V
line regulation is 0.175percentage
ripple rejection is -39 dB


## Example 18.2, Page No 762¶

In [26]:
import math

#initialisation of variables

Vo=12.0
Il=40.0*10**-3
Vs=20.0
Vbe=.7
Vz=0.75*Vo
print("for minimum D1 current select")
Ir2=10.0*10**-3

#Calculations
R2=(Vo-Vz)/Ir2
Ie1=Il+Ir2
print("specification for Q")
Vce1=20
Vs=Vce1
Ic1=50*10**-3
Pd=(Vs-Vo)*Ie1
hfe=50
Ib1=Ie1/hfe
Ic2=5*10**-3
R1=(Vs-(Vo+.7))/(Ic2+Ib1)
Iz=Ie1+Ir2
I4=1*10**-3
R4=(Vz+Vbe)/I4
R3=(Vo-(Vz+Vbe))/I4

#Results
print("The value of R3 is %.2f kohm" %(R3/1000))

for minimum D1 current select
specification for Q
The value of R3 is 2.30 kohm


## Example 18.3 Page No 765¶

In [27]:
import math

#initialisation of variables

I4=1.0*10**-3
Vb2=9.8

#Calculations
print(" for Vo=11V moving contact at top of R5")
Vo=11
R3=(Vo-Vb2)/I4
R=Vb2/I4#R=R4+R5
print(" for Vo=13V moving contact at bottom of R5")
Vo=13
I4=Vo/(R3+R)
R4=Vb2/I4
R5=R-R4

#Results
print("The value of R5 is %.2f kohm" %(R5/1000))

 for Vo=11V moving contact at top of R5
for Vo=13V moving contact at bottom of R5
The value of R5 is 1.51 kohm


## Example 18.4, Page No 766¶

In [28]:
import math
#initialisation of variables

hFE3=50.0
hFE1=20.0
Ie1=200.0*10**-3+10*10**-3
Ic2=1.0*1**-3
Vs=20.0
Vb3=13.4
Vo=12.0
Vbe=0.7

#Calculations
Ib1=Ie1/hFE1
Ib3=Ib1/hFE3
R1=(Vs-Vb3)/(Ic2+Ib3)
print("select I6=.5*10**-3")
I6=.5*10**-3
R6=(Vo+Vbe)/I6
Pd=(Vs-Vo)*Ie1

#Results
print(" peak power dissipated is %.3fnW " %Pd)

select I6=.5*10**-3
peak power dissipated is 1.680nW


## Example 18.5 Page No 769¶

In [29]:
import math
#initialisation of variables

Vr1=3.0
Ic2=1.0*10**-3
Ib3=0.21*10**-3
Vbe1=0.7
Vbe3=Vbe1
Vs=20.0

#Calculations
R1=Vr1/(Ic2+Ib3)
Vz2=Vo+Vbe1+Vbe3+Vr1
Ir7=5*10**-3
R2=(Vs-Vz2)/Ir7

#Results
print("The value of R2 is %.2f kohm" %(R2/1000))

The value of R2 is 0.72 kohm


## Example 18.6 Page No 770¶

In [30]:
import math

#initialisation of variables

Vc5=9.8
Vb2=Vc5
Vce5=3.0
Vbe=0.7
Vo=12.0

#Calculations
Vr9=Vc5-Vce5
Vz2=Vr9+Vbe
Ic5=1.0*10**-3
R8=(Vo-Vc5)/Ic5
Ir9=2*Ic5
R9=Vr9/Ir9
print(" Iz2>>Ib5 and Iz2> Izk for the zener diode ")
Iz2=10*10**-3
R7=(Vo-Vz2)/Iz2
I4=1*10**-3
Vb6=7.5
Vz2=Vb6
print(" when Vo=11V moving contact at top of R5 ")
Vo=11
R3=(Vo-Vb6)/I4
R3=3.3*10**3#use standard value
I4=(Vo-Vb6)/R3
R=Vb6/I4#R=R4+R5
print(" when Vo=13V moving contact at bottom of R5")
Vo=13.0
Vb6=7.5
I4=Vo/(R3+R)
R4=Vb6/I4
R5=R-R4

#Results
print("The value of R5 is %.2f kohm" %(R5/1000))

 Iz2>>Ib5 and Iz2> Izk for the zener diode
when Vo=11V moving contact at top of R5
when Vo=13V moving contact at bottom of R5
The value of R5 is 1.09 kohm


## Example 18.7, Page No 770¶

In [31]:
import math
#initialisation of variables

Isc=100.0*10**-3
Vr10=0.5
Vo=12.0

#Calculations
R10=Vr10/Isc
R10=4.7#use standard value
Il=200.0*10**-3
Vr10=Il*R10
Vr11=Vr10-.5
I11=1.0*10**-3
R11=Vr11/I11
R12=(Vo+Vr10-Vr11)/I11

#Results
print("The value of R12 is %.2f kohm" %(R12/1000))

The value of R12 is 12.50 kohm


## Example 18.8 Page No 778¶

In [32]:
import math

#initialisation of variables

Vo=12.0
hFE1=20.0
hFE2=50.0
Il=250.0*10**-3
Vz=0.75*Vo
Vz=9.1#use standard value for 1N757 diode
Iz1=10.0*10**-3

#Calculations
R1=(Vo-Vz)/Iz1
I3=1.0*10**-3
print(" when V0=12V(moving contact at top of R5)")
R3=(Vo-Vz)/I3
R=Vz/I3
print(" when Vo=15V moving contact at bottom of R5")
Vo=15
I3=Vo/(R+R3)
R4=Vz/I3
R5=R-R4
Ir6=.5*10**-3
R6=Vo/Ir6
print(" op-amp output current")
Ib2=Il/(hFE1*hFE2)

#Results
print("The value of Ib2 is %.2f mA" %(Ib2*10**3))

 when V0=12V(moving contact at top of R5)
when Vo=15V moving contact at bottom of R5
op-amp output current
The value of Ib2 is 0.25 mA


## Example 18.9 Page No 782¶

In [33]:
import math
#initialisation of variables

I2=1.0*10**-3
Vr2=7.15
Vref=Vr2
Vo=10.0
Pdmax=1000.0*10**-3

#Calculations
R2=Vref/I2
R2=6.8*10**3#use standard value and recalculate the I2
I2=Vref/R2
R1=(Vo-Vref)/I2
Vs=Vo+5#for satisfactory operation of series pass transistor
Iint=25*10**-3#internal circuit current
Pi=Vs*Iint
print("maximum power dissipated in series pass transistor")
Pd=Pdmax-Pi
Il=Pd/(Vs-Vo)

#Results
print("The value of Il is %.2f mA" %(Il*10**3))

maximum power dissipated in series pass transistor
The value of Il is 125.00 mA


## Example 18.10 Page No 785¶

In [34]:
import math

#initialisation of variables

I1=1.0*10**-3
Vref=1.25
Vo=6.0
Vs=15.0
Il=200.0*10**-3

#Calculations
R1=Vref/I1
R2=(Vo-Vref)/I1
Pd=(Vs-Vo)*Il

#Results
print("regulated power dissipation is %.2f W " %Pd)

regulated power dissipation is 1.80 W


## Example 18.11, Page No 788¶

In [35]:
import math

#initialisation of variables

Vo=10.0
Io=1.0
Vce=7.0
Vf=1.0

#Calculations
Po=Vo*Io
print(" linear regulator")
Pi=Po+(Vce*Io)
n=(Po*100.0)/Pi#efficiency
print(" switching regulator")
Vce=1
Pi=Po+Io*(Vce+Vf)
n=(Po*100.0)/Pi#efficiency

#Results
print("The value of n is %.2f " %(n))

 linear regulator
switching regulator
The value of n is 83.33


## Example 18.12, Page No 752¶

In [36]:
import math
#initialisation of variables

f=50.0*10**3
Vo=12.0
Vf=0.7
Vi=30.0
Vsat=1.0
Io=500.0*10**-3
Vr=100.0*10**-3

#Calculations
T=1.0/f
t=(Vo+Vf)/(Vi-Vsat-Vo)
toff=T/1.75
ton=T-toff
Ip=2*Io
L1=((Vi-Vsat-Vo)*ton)/Ip
C1=Ip/(8.0*f*Vr)

#Results
print("The value of C1 is %.2f pF" %(C1*10**6))

The value of C1 is 25.00 pF


## Example 18.13, Page No 799¶

In [37]:
import math
#initialisation of variables

print(" an MC34063 controller is for step down transformer")
Ib=-400.0*10**-3
I1=1.0*10**-3
Vref=1.25
V0=12.0
Ip=1.0

#Calculations
ton=8.6*10**-6
R1=Vref/I1
R1=1.2*10**3#use standard value
I1=Vref/R1
R2=(Vo-Vref)/I1
Rsc=.33/Ip
Ct=4.8*10**-5 *ton

#Results
print("The value of Ct is %.2f pF" %(Ct*10**6))

 an MC34063 controller is for step down transformer
The value of Ct is 0.00 pF