chapter01:Introduction to Electronics

Example E1 - Pg 8

In [1]:
#pg 8
#Find the range of tolerance
#soltion
#given
#color coding
orange=3.#
gold=5.#
yellow=4.#
violet=7.#
#band pattern
band1=yellow#
band2=violet#
band3=orange#
band4=gold#
#resistor color coding
r=(band1*10.+band2)*10.**(band3)#
tol=r*(band4/100.)#tolerance
ulr=r+tol##upper limit of resistance
llr=r-tol##lower limit of resistance
print 'The range of resistance =',llr/1000. ,'kOhm','to',ulr/1000,'kOhm'
The range of resistance = 44.65 kOhm to 49.35 kOhm

Example E2 - Pg 8

In [2]:
#Find the range of tolerance
#color coding
blue=6.#
gold=-1.#
gray=8.#
silver=10.#
#band pattern
band1=gray#
band2=blue#
band3=gold#
band4=silver#
#resistor color coding
r=(band1*10.+band2)*10.**(band3)#
tol=r*(band4/100.)#tolerance
ulr=r+tol##upper limit of resistance
llr=r-tol##lower limit of resistance
print 'The Range of resistance is',llr,'ohm','to',ulr,'ohm'
The Range of resistance is 7.74 ohm to 9.46 ohm

Example E3 - Pg 19

In [3]:
#Find the equivalent current source
#given
Vs=2.;#Volts             #dc voltage source
Rs=1.;#ohm               #internal resistance
Rl=1.;#ohm              #load resistance
Ise=Vs/Rs;#ampere      #equivalent current source

# In accordance to figure 1.23a
Il1=Ise*(Rs/(Rs+Rl));#using current divider concept
Vl1=Il1*Rl;
print "In accordance to figure 1.23a\n"
print "The Load current (current source Il=",Il1,'A'
print "The Load voltage (current source Vl=",Vl1,'V','\n'

# In accordance to figure 1.23b
Vl2=Vs*(Rs/(Rs+Rl));#using voltage divider concept
Il2=Vl2/Rl;
print "\nIn accordance to figure 1.23b"
print "\nThe Load voltage (voltage source) Vl=",Vl2,'V'
print "The Load current (voltage source) Il=",Il2,'A'
print "\nTherefore they both provide same voltage and current to load"
In accordance to figure 1.23a

The Load current (current source Il= 1.0 A
The Load voltage (current source Vl= 1.0 V 


In accordance to figure 1.23b

The Load voltage (voltage source) Vl= 1.0 V
The Load current (voltage source) Il= 1.0 A

Therefore they both provide same voltage and current to load

Example E4 - Pg 19

In [4]:
#Find percentage variation in load current and load voltage
#given
Vs=10.;#volt#Supply voltage
Rs=100.;#ohm#internal resistance

# In accordance to figure 1.24a
#For 1ohm - 10 ohm
Rl11=1.;#ohm#min extreme value of Rl
Rl12=10.;#ohm#max extreme value of Rl
Il11=Vs/(Rs+Rl11);
Il12=Vs/(Rs+Rl12);
Pi1=(Il11-Il12)*100./Il11;#Percentage variation in current
Vl11=Il11*Rl11;
Vl12=Il12*Rl12;
Pv1=(Vl12-Vl11)*100./Vl12;#Percentage variation in voltage
print '%s' %("In accordance to figure 1.24a \n");
print '%s %.2f %s' %("Percentage variation in Current(1-10 ohm)=",Pi1,'percent');
print '%s %.1f %s ' %("Percentage variation in Voltage(1-10 ohm)=",Pv1,'percent\n\n');

# In accordance to figure 1.24b
#For 1kohm - 10kohm
Rl21=1000.;#ohm#min extreme value of Rl
Rl22=10000.;#ohm#max extreme value of Rl
Il21=Vs/(Rs+Rl21);
Il22=Vs/(Rs+Rl22);
Pi2=(Il21-Il22)*100./Il21;#Percentage variation in current
Vl21=Il21*Rl21;
Vl22=Il22*Rl22;
Pv2=(Vl22-Vl21)*100./Vl22;#Percentage variation in voltage
print '%s' %("In accordance to figure 1.24b \n");
print '%s %.f %s' %("Percentage variation in Current(1-10 ohm)=",Pi2,'percent');
print '%s %.f %s ' %("Percentage variation in Voltage(1-10 ohm)=",Pv2,'percent \n');
print 'In book the percentage variation in voltage(1kohm-10kohm) is 9 percent due to' 
print 'the incorrect value of Il22 i.e. 0.000999 Amp correct value is 0.0009901 Amp'
In accordance to figure 1.24a 

Percentage variation in Current(1-10 ohm)= 8.18 percent
Percentage variation in Voltage(1-10 ohm)= 89.1 percent

 
In accordance to figure 1.24b 

Percentage variation in Current(1-10 ohm)= 89 percent
Percentage variation in Voltage(1-10 ohm)= 8 percent 
 
In book the percentage variation in voltage(1kohm-10kohm) is 9 percent due to
the incorrect value of Il22 i.e. 0.000999 Amp correct value is 0.0009901 Amp