Chapter 10 : Power Supplies

example 10.1, Page No. 416

In [6]:
# Voltage regulation and % change in output voltage per unit of load current

import math
#Variable declaration
Vfl = 24                # full load voltage
Vnl = 24.5              # no load voltage
Ifl = 2                 # full load current

#calculations
#(a)
VR = (Vnl-Vfl)/Vfl
#(b)
x = VR*100/Ifl

#Result
print("(a) Voltage regulation = %.4f or %.2f%%\n(b) %%tage change in output voltage per unit load current = %.2f%%"%(VR,VR*100,x))
(a) Voltage regulation = 0.0208 or 2.08%
(b) %tage change in output voltage per unit load current = 1.04%

example 10.2, Page No. 416

In [9]:
# Redulation in percent V


import math
Vout = 0.3             # change in output voltage when input change
Vin = 4                # input voltage change
V = 15                 # rated ouutput voltage

#calculations
lr = (Vout/V)*100/Vin
print("%% line regulation = %.1f%% V"%lr)
% line regulation = 0.5% V

example 10.3, Page No. 416

In [27]:
# output voltage, load current, zener curretn

import math
#variable declaration
Vi = 15.0                # input voltage
beta_dc = 50.0           # transistor gain
Rl = 1000.0              # load resistor
Vz = 6.0                 # zener voltage
Ri = 500.0               # input voltage
Vbe = 0.7                # voltage drop across transistor base-emitter

#Calculations
Vo = Vz-Vbe
Il = Vo/Rl
Vce = Vi-Vo
I = (V-Vz)/Ri
Ib = Il/beta_dc
Iz = I-Ib

#Result
print("Vo = %.1fV\nLoad current = %.1f mA\nZener current = %.3f mA"%(Vo,Il*1000,Iz*1000))
Vo = 5.3V
Load current = 5.3 mA
Zener current = 17.894 mA

example 10.4, Page No. 417

In [29]:
#output voltage(referring fig.10.2)

import math
Vz = 6.0               # zener voltage
R1 = 10.0*10**3        # resistance 1
R2 = 15.0*10**3        # resistance 2

#Calculations
Vo = (1+(R2/R1))*Vz

#Result
print("Vo = %d V"%Vo)
Vo = 15 V

example 10.5, Page No. 417

In [31]:
# finding Vo, Io, Ic (referring fig.10.1)

import math
#variable declaration
Vz = 9.0               # zener voltage
R1 = 1.5*10**3         # resistance 1
R2 = 3.0*10**3         # resistance 2, value used in calculations
Rl = 2.0*10**3         # load resistance
Rs = 200               # source resistance
Vin = 30               # input oltage

#Calculations
Vo = (1+(R2/R1))*Vz
Is =(Vin - Vo)/Rs
Io = Vo/Rl
Ic = Is -Io

#Result
print("Vo = %d V\nIo = %.1f mA\nIc = %.1f mA"%(Vo,Io*1000,Ic*1000))
Vo = 27 V
Io = 13.5 mA
Ic = 1.5 mA

example 10.6, Page No. 417

In [35]:
# Minimum and maximum output voltage

import math
# variable declaration
Iadj = 40*10**-6           # current
Vref = 1.25                # reference voltage
R1 = 2*10**3               # resistance R1
R2min = 0                  # minimum value of R2 resistor
R2max = 20.0*10**3         # maximum value of R2 resistor

#calculations
Vo1 = (Vref*(1+(R2max/R1)))+Iadj*R2max
Vo2 = Vref*(1+(R2min/R1))

#Result
print("When R2 = %d k-ohm\nVo = %.2f V"%(R2max/1000,Vo1))
print("\nWhen R2 = %d k-ohm\nVo = %.2f V"%(R2min/1000,Vo2))
When R2 = 20 k-ohm
Vo = 14.55 V

When R2 = 0 k-ohm
Vo = 1.25 V