Chapter2-Passive Components

Ex1-pg23

In [1]:
##Ex:2.1
import math
marked=220.;##in ohms
measured=207.;##in ohms
err=marked-measured;
tol=(err/marked)*100.;
print'%s %.2f %s'%("Tolerance = ",tol,"");
Tolerance =  5.91 

Ex2-pg23

In [3]:
##Ex:2.2
import math
r=39.;##in ohms
v=9.;##in volts
i=(v/r);##in Amps
print'%s %.2f %s'%("Current = ",i*1000," mA");
tol=0.1;##i.e, 10%
r_min=r-(tol*r);
i_max=v/r_min;
r_max=r+(tol*r);
i_min=v/r_max;
print'%s %.2f %s %.2f %s '%("\n  Max.Current = ",i_max*1000," mA " and "",i_min*1000," Min Current");
Current =  230.77  mA

  Max.Current =  256.41  209.79  Min Current 

Ex3-pg23

In [4]:
##Ex:2.3
import math
v=28.;##in volts
i=0.1;##in A
r=v/i;
p=v*i;
print'%s %.2f %s %.2f %s '%("Resistance Value = ",r," ohms & Power dissipated"" = ",p," W");
Resistance Value =  280.00  ohms & Power dissipated =  2.80  W 

Ex4-pg24

In [5]:
##Ex:2.4
import math
r=10*(10**2);
print'%s %.2f %s'%("Resistor value = ",r," ohm");
print("\nTolerance = 10 ");
Resistor value =  1000.00  ohm

Tolerance = 10 

Ex5-pg24

In [6]:
##Ex:2.5
import math
r=27.*(10**3);
print'%s %.2f %s'%("Resistor value = ",r," ohm");
print("\nTolerance = 5 ");
Resistor value =  27000.00  ohm

Tolerance = 5 

Ex6-pg24

In [7]:
##Ex:2.6
import math
r=56*(10);
print'%s %.2f %s'%("Resistor value = ",r," ohm");
print("\nTolerance = 5 ");
Resistor value =  560.00  ohm

Tolerance = 5 

Ex7-pg24

In [8]:
##Ex:2.7
import math
r=25.*(10**0);
print'%s %.2f %s'%("Resistor value = ",r," ohm");
print("\nTolerance = 20 ");
Resistor value =  25.00  ohm

Tolerance = 20 

Ex8-pg25

In [9]:
##Ex:2.8
import math
r=22.*(10**3);
print("Bands are Red, Red, Red, Red");
Bands are Red, Red, Red, Red

Ex9-pg25

In [10]:
##Ex:2.9
import math
print("Resistance = 4.7 ohm with 10%% tolerance");
Resistance = 4.7 ohm with 10%% tolerance

Ex10-pg25

In [11]:
##Ex:2.10
import math
print("Resistance = 330 ohms with 2%% tolerance");
Resistance = 330 ohms with 2%% tolerance

Ex11-pg26

In [12]:
##Ex:2.11
import math
print("Resistance = 0.22 ohm with 20%% tolerance");
Resistance = 0.22 ohm with 20%% tolerance

Ex12-pg26

In [13]:
##Ex:2.12
import math
r1=22.;##in ohms
r2=47.;##in ohms
r3=33.;##in ohms
r_ser=r1+r2+r3;
print'%s %.2f %s'%("Effective resistance in series = ",r_ser," ohms");
r_parel=((1./r1)+(1./r2)+(1./r3))**-1;
print'%s %.2f %s'%("\n Effective resistance in parallel = ",r_parel," ohms");
Effective resistance in series =  102.00  ohms

 Effective resistance in parallel =  10.31  ohms

Ex13-pg27

In [14]:
##Ex:2.13
import math
r1=4.7;##in ohms
r2=47.;##in ohms
r3=12.;##in ohms
r4=27.;##in ohms
r5=r3+r4;
r_parel=((1./r5)+(1./r2))**-1;
r_eff=r_parel+r1;
print'%s %.2f %s'%("Effective resistance = ",r_eff," ohms");
Effective resistance =  26.01  ohms

Ex14-pg27

In [15]:
##Ex:2.14
import math
print("Two 100 ohm resistor of 1 W");
Two 100 ohm resistor of 1 W

Ex15-pg28

In [16]:
##Ex:2.15
import math
temp_coeff=0.001;##in per degree centigrade
r_o=1500.;##in ohm
t=80.;##temperature diff.
r_t=r_o*(1.+(temp_coeff)*t)
print'%s %.2f %s'%("Resistance at ",r_t," degree = ohms");
Resistance at  1620.00  degree = ohms

Ex16-pg28

In [17]:
##Ex:2.16
import math
temp_coeff=0.0005;##in per degree centigrade
r_t1=680.;##in ohm
t1=20.;##temperature diff.
t2=90.;
r_o=r_t1/(1.+(temp_coeff)*t1);
r_t2=r_o*(1.+(temp_coeff)*t2);
print'%s %.2f %s %.2f %s '%("Resistance at ",t2," degree = ",r_t2," ohms");
Resistance at  90.00  degree =  703.56  ohms 

Ex17-pg29

In [18]:
##Ex:2.17
import math
r_o=40.;##resis at 0 degree
r_t=44.;##at 100 degree
t=100.;##temperature diff.
temp_coeff=(1./t)*((r_t/r_o)-1.);
print'%s %.2e %s'%("Temperature Coefficient = ",temp_coeff," per degree centigrade");
Temperature Coefficient =  1.00e-03  per degree centigrade

Ex18-pg33

In [19]:
##Ex:2.18
import math
V_1=50.;
V_2=10.;
dV=V_1-V_2;##in volts
dt=0.1;##in seconds
C=22.*10**-6;
i=C*(dV/dt)*1000.;##in mA
print'%s %.2f %s'%("Current flow = ",i," milliAmps");
Current flow =  8.80  milliAmps

Ex19-pg33

In [20]:
##Ex:2.19
import math
C=10.*10**-6;
V=250.;##in volts
Q=V*C*1000.;##in millicoulomb
print'%s %.2f %s'%("Charged stored =",Q," mC");
Charged stored = 2.50  mC

Ex20-pg33

In [21]:
##Ex:2.20
import math
C=47.*10**-6;##in farads
W=4.;##energy in joules
V=math.sqrt(W/(0.5*C));
print'%s %.2f %s'%("Voltage tht be applied = ",V," volts");
Voltage tht be applied =  412.57  volts

Ex21-pg34

In [22]:
##Ex:2.21
import math
E_o=8.85*10**-12;
E_r=5.4;
C=1*10**-9;
d=0.1*10**-3;
A=(C*d)/(E_o*E_r)*10**4;
print'%s %.2f %s'%("Required plate area = ",A," sq. cm");
Required plate area =  20.92  sq. cm

Ex22-pg34

In [23]:
##Ex:2.22
import math
E_o=8.85*10**-12;
E_r=4.5;
n=6.;##no. of plates
d=0.2*10**-3;##in meter
A=20.*10**-4;##in sq.meter
C=((E_o*E_r*(n-1.)*A)/d)*10**11;
print'%s %.2f %s'%("Capacitance = ",C," pF");
Capacitance =  199.12  pF

Ex23-pg36

In [24]:
##Ex:2.23
import math
print("Capacitance = 10000 pF of 10%%"); 
Capacitance = 10000 pF of 10%%

Ex24-pg36

In [25]:
##Ex:2.24
import math
print("Capacitance = 150 pF of 2%% tolerance at 100 V");
Capacitance = 150 pF of 2%% tolerance at 100 V

Ex25-pg37

In [26]:
##Ex:2.25
import math
C1=2.;##in nF
C2=4.;##in nF
C3=2.;
C4=4.;
C_a=C1+C2;
C_b=C_a*C3/(C_a+C3);
C_eff=C4+C_b;
print'%s %.2f %s'%("Capacitance = ",C_eff," nF");
Capacitance =  5.50  nF

Ex26-pg37

In [27]:
##Ex:2.26
import math
C=100.;##in uF
C_eff=C*C/(C+C);
print'%s %.2f %s'%("Two capacitors of  uF be in parallel used to make ",C_eff," uF capacitance");
Two capacitors of  uF be in parallel used to make  50.00  uF capacitance

Ex27-pg40

In [28]:
##Ex:2.27
import math
L=600.*10**-3;##in H
I1=6.;##in A
I2=2.;##in A
dI=I1-I2;
dt=250.*10**-3;##in sec.
E=-L*(dI/dt);
print'%s %.2f %s'%("Induced voltage = ",E," volts");
Induced voltage =  -9.60  volts

Ex28-pg40

In [29]:
##Ex:2.28
import math
E=2.5;##energy in joules
L=20.*10**-3;##in henry
I=math.sqrt(E/(0.5*L));
print'%s %.2f %s'%("Current = ",I," A");
Current =  15.81  A

Ex29-pg40

In [30]:
##Ex:2.29
import math
u_o=12.57*10**-7;
u_r=500.;
A=15.*10**-4;##area of cross-section in sq. meters
l=20.*10**-2;##length
L=100.*10**-3;##in henry
n=math.sqrt((L*l)/(u_r*u_o*A));
print'%s %.2f %s'%("Inductor requires ",n," turns of wire");
Inductor requires  145.65  turns of wire

Ex30-pg42

In [31]:
##Ex:2.30
import math
##L=(L1*L2)/(L1+L2)
L_eq=5.;##in millihenry
print'%s %.2f %s'%("Inductor of 10 mH wired in parallel would provide ",L_eq," mH");
Inductor of 10 mH wired in parallel would provide  5.00  mH

Ex31-pg42

In [32]:
##Ex:2.31
import math
L1=60.;##in mH
L2=60.;##in mH
L_a=L1+L2;
L3=120.;##in mH
L_b=L_a*L3/(L_a+L3);
L4=50.;##in mH
L_eq=L4+L_b;
print'%s %.2f %s'%("Equivalent Inductance = ",L_eq," mH");
Equivalent Inductance =  110.00  mH